← TinyGPT · docs · devlog · roadmap · speedup
source: docs/specialists/b1-sql.md · view on GitHub ↗

B1 — second specialist: text-to-SQL

Cookie-cuts the A1 recipe onto a second domain to prove platform generality. Domain decision (V1): SQL (over shell) — SQLite gives a clean, dependency- free execution-accuracy metric; shell needs sandboxing (deferred).

Eval (shipped + verified)

tinygpt eval-sql scores a predictions file by execution accuracy (run predicted vs gold SQL on the DB, compare result sets order-insensitively) plus normalized exact-match — the Spider metric, self-contained via sqlite3:

tinygpt eval-sql preds.jsonl --db-dir ./dbs --out sql-rows.jsonl
# preds.jsonl rows: {predicted_sql, gold_sql, db}

Verified by evals/eval-sql-smoke.sh (exec 0.667 / exact 0.333 on a fixture). Core comparison + aggregation are unit-tested (SqlEvalTests).

Remaining (needs a GPU)

Status

Eval infra + domain decision shipped (2026-06-20); training + generation pending a GPU. B1 was fully not-started; the scoring half now exists and is the reusable piece (E0-schema rows feed eval-compare/eval-gate).