|
10 | 10 | # |
11 | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 |
|
13 | | -ActiveRecord::Schema[8.0].define(version: 2025_12_15_161508) do |
| 13 | +ActiveRecord::Schema[8.0].define(version: 2025_12_16_092915) do |
14 | 14 | # These are extensions that must be enabled in order to support this database |
15 | 15 | enable_extension "citext" |
16 | 16 | enable_extension "pg_catalog.plpgsql" |
|
20 | 20 | # Note that some types may not work with other database engines. Be careful if changing database. |
21 | 21 | create_enum "answer_completeness", ["complete", "partial", "no_information"] |
22 | 22 | create_enum "answer_status", ["answered", "clarification", "error_answer_guardrails", "error_answer_service_error", "error_jailbreak_guardrails", "error_non_specific", "error_question_routing_guardrails", "error_timeout", "guardrails_answer", "guardrails_forbidden_terms", "guardrails_jailbreak", "guardrails_question_routing", "unanswerable_llm_cannot_answer", "unanswerable_no_govuk_content", "unanswerable_question_routing"] |
| 23 | + create_enum "auto_evaluation_metric_name", ["answer_relevancy", "answer_coherence", "context_relevancy", "faithfulness"] |
23 | 24 | create_enum "conversation_source", ["web", "api"] |
24 | 25 | create_enum "guardrails_status", ["pass", "fail", "error"] |
25 | 26 | create_enum "question_routing_label", ["about_mps", "advice_opinions_predictions", "character_fun", "genuine_rag", "gov_transparency", "greetings", "harmful_vulgar_controversy", "multi_questions", "negative_acknowledgement", "non_english", "personal_info", "positive_acknowledgement", "vague_acronym_grammar", "unclear_intent", "requires_account_data", "about_chat"] |
|
103 | 104 | t.index ["question_id"], name: "index_answers_on_question_id", unique: true |
104 | 105 | end |
105 | 106 |
|
| 107 | + create_table "auto_evaluation_metric_aggregates", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
| 108 | + t.enum "metric_name", null: false, enum_type: "auto_evaluation_metric_name" |
| 109 | + t.float "score", null: false |
| 110 | + t.uuid "answer_id", null: false |
| 111 | + t.datetime "created_at", null: false |
| 112 | + t.datetime "updated_at", null: false |
| 113 | + t.index ["answer_id"], name: "index_auto_evaluation_metric_aggregates_on_answer_id", unique: true |
| 114 | + t.index ["metric_name", "answer_id"], name: "index_metric_aggregate_on_metric_name_and_answer_id", unique: true |
| 115 | + end |
| 116 | + |
| 117 | + create_table "auto_evaluation_metric_runs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
| 118 | + t.float "score", null: false |
| 119 | + t.string "reason", null: false |
| 120 | + t.jsonb "llm_responses" |
| 121 | + t.jsonb "metrics" |
| 122 | + t.uuid "auto_evaluation_metric_aggregate_id", null: false |
| 123 | + t.datetime "created_at", null: false |
| 124 | + t.datetime "updated_at", null: false |
| 125 | + t.index ["auto_evaluation_metric_aggregate_id"], name: "idx_on_auto_evaluation_metric_aggregate_id_c079941d7e" |
| 126 | + end |
| 127 | + |
106 | 128 | create_table "base_path_versions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| |
107 | 129 | t.string "base_path", null: false |
108 | 130 | t.bigint "payload_version", default: 0, null: false |
|
172 | 194 | t.datetime "updated_at", null: false |
173 | 195 | end |
174 | 196 |
|
| 197 | + create_table "solid_cable_messages", force: :cascade do |t| |
| 198 | + t.binary "channel", null: false |
| 199 | + t.binary "payload", null: false |
| 200 | + t.datetime "created_at", null: false |
| 201 | + t.bigint "channel_hash", null: false |
| 202 | + t.index ["channel"], name: "index_solid_cable_messages_on_channel" |
| 203 | + t.index ["channel_hash"], name: "index_solid_cable_messages_on_channel_hash" |
| 204 | + t.index ["created_at"], name: "index_solid_cable_messages_on_created_at" |
| 205 | + end |
| 206 | + |
175 | 207 | add_foreign_key "answer_feedback", "answers", on_delete: :cascade |
176 | 208 | add_foreign_key "answer_sources", "answer_source_chunks", on_delete: :restrict |
177 | 209 | add_foreign_key "answer_sources", "answers", on_delete: :cascade |
178 | 210 | add_foreign_key "answer_topics", "answers", on_delete: :cascade |
179 | 211 | add_foreign_key "answers", "questions", on_delete: :cascade |
| 212 | + add_foreign_key "auto_evaluation_metric_aggregates", "answers", on_delete: :cascade |
| 213 | + add_foreign_key "auto_evaluation_metric_runs", "auto_evaluation_metric_aggregates", on_delete: :cascade |
180 | 214 | add_foreign_key "conversations", "signon_users", on_delete: :restrict |
181 | 215 | add_foreign_key "questions", "conversations" |
182 | 216 | add_foreign_key "settings_audits", "signon_users", column: "user_id", on_delete: :nullify |
|
0 commit comments