-- Ported from the SQLite migration of the same number. -- Quality suites run against a model (`llmgw ctl eval`, and the gate on -- `model update` and `model promote`): one row a run, filed under the model -- it is about, with the revision its weights came from when that is known, -- and the suite's hash, so two runs compare only when they asked the same -- questions. Each case's score and answer beside it. CREATE TABLE eval_runs ( id TEXT PRIMARY KEY, model TEXT NOT NULL, target TEXT NOT NULL DEFAULT '', repo TEXT NOT NULL DEFAULT '', revision TEXT NOT NULL DEFAULT '', suite TEXT NOT NULL, suite_hash TEXT NOT NULL, started_at BIGINT NOT NULL, took_ms BIGINT NOT NULL DEFAULT 0, score DOUBLE PRECISION NOT NULL, threshold DOUBLE PRECISION NOT NULL, passed BIGINT NOT NULL, cases BIGINT NOT NULL, below BIGINT NOT NULL DEFAULT 0, errors BIGINT NOT NULL DEFAULT 0, judge TEXT NOT NULL DEFAULT '', actor TEXT NOT NULL DEFAULT '', job TEXT NOT NULL DEFAULT '', error TEXT NOT NULL DEFAULT '' ); CREATE INDEX eval_runs_model ON eval_runs (model, started_at); CREATE TABLE eval_cases ( run_id TEXT NOT NULL REFERENCES eval_runs (id) ON DELETE CASCADE, idx BIGINT NOT NULL, case_id TEXT NOT NULL, kind TEXT NOT NULL, weight DOUBLE PRECISION NOT NULL, score DOUBLE PRECISION NOT NULL, passed BIGINT NOT NULL, answer TEXT NOT NULL DEFAULT '', detail TEXT NOT NULL DEFAULT '', error TEXT NOT NULL DEFAULT '', took_ms BIGINT NOT NULL DEFAULT 0, PRIMARY KEY (run_id, idx) );