source docs/techniques/sql-technique-backlog.md · view on GitHub ↗

SQL Technique Backlog

This is the SQL-specific ledger of methods, recipes, status, and next smallest tests. It exists to prevent the roadmap from looking complete just because broad method names are present.

Current Evidence

Recipe / AttemptStatusEvidenceDecision
Toy SQL SFT, rank 4Worked as a factory proofexecution 0.167 -> 0.833 on 6 rowsretry-data because train/eval overlap
Expanded synthetic SQL SFT, rank 4Workedexecution 0.160 -> 0.860, exact 0.140 -> 0.840 on 50 rowscurrent synthetic specialist
Public b-mc2 SFT v1Failedexact 0.344 vs T5-small 0.484reject
Public b-mc2 SFT v2Failed badlyexact 0.031reject
Public b-mc2 SFT v3Improved but failed gateexact 0.422reject
Public b-mc2 SFT v4, join/group weightedWorked on public exactexact 0.531 vs T5-small 0.484not shippable; synthetic regression
Public v4 synthetic regressionFailedsynthetic execution 0.240 vs incumbent 0.860route or compose
Public+synthetic blended SFTFailed/interferedpublic 0.297, synthetic execution 0.560reject
Static multi-LoRA compositionFailed to pass both gatesbest public pass still had synthetic failurereject
Routed public + synthetic adaptersBest current candidatepublic exact 0.531, synthetic execution 0.860report-ready, not package-ready
Hygiene SimPO/DPO adapterFailed hardexecution 0.860 -> 0.080, degenerate outputretry-training

Not Yet Tried

TechniqueMethodConcrete SQL recipeWhy It Might HelpSmallest Next Test
Candidate-selection curriculumsupervised selection / RLVR bridgeBuild rows with 4-6 candidate SQL strings, train/eval the model to pick the executable/gold-equivalent answer before open generationSQL generation is sparse-reward; selecting among candidates is easier and creates denser learning signalUse scripts/build_sql_candidate_choice.py on existing candidate predictions, create a tiny SFT/eval slice, compare selection accuracy by join/filter/group slices
Reference-anchored hygiene DPODPORetry the failed hygiene goal with a reference anchor, lower LR, fewer steps, and composed eval against the SFT adapterRef-free SimPO over-optimized and collapsed; reference anchoring should preserve generation qualitySame 108 pairs, frozen 50-row eval, require no execution regression and clean-SQL lift
One-step offline rollout updateOAPL/ReST-style batch loopGenerate N rollouts per prompt, score offline by execution/gold/format, train one adapter update, evaluate heldoutKeeps the loop batch-first and avoids moving-target on-policy instabilityRender a batch plan with scripts/render_batch_posttrain_plan.py, then run only after candidate-selection evidence
Policy lag / stale referenceRL regularizationKeep rollout policy fixed for a batch or compare against a stale reference during preference/RL updatePrevents the optimizer from chasing its own malformed outputsAdd as a variant only after a first offline rollout update exists
Controlled LoRA rank sweepLoRA/DoRASweep rank {1,2,4,8} on the same frozen SQL data with fixed seed/steps/LRExisting ranks were confounded with different data/recipes; successful adapters have low effective stable rankRun no more than one small sweep after the next target is frozen; report slice metrics and geometry
LoRA geometry decision checkdiagnosticsCompare successful, failed, and retry adapters by effective-update norm/stable rank/module concentrationExplains whether a failure learned too little, too diffusely, or in the wrong layersRun scripts/lora_geometry.py on every meaningful adapter and attach lora-geometry.json
Slice-gated reportingeval disciplineRequire overall, join, single-table, filter, aggregate, format, and clean-output slicesOverall hides the known join weakness and hygiene failureGenerate slice-metrics.json for every SQL report
Trace review as data sourcefailure analysisClassify failures into hallucinated schema, missing join, wrong filter, prose/fence wrapping, no-select collapseConverts failed attempts into targeted data or preferencesGenerate trace_review.md for every SQL report

Priority Order

  1. Candidate-selection curriculum. This is the cheapest new recipe and directly addresses sparse SQL reward.
  2. Reference-anchored hygiene DPO. This retries the known hygiene failure with a safer recipe.
  3. Public execution gate. This changes the eval from exact string match to a more serious SQL claim.
  4. Controlled rank sweep + geometry. Run after the next target is frozen so the sweep is not confounded.
  5. Offline rollout update / OAPL-style loop. Run only after candidate-selection creates a clean reward surface.

Enforcement

No SQL candidate should be reported as improved unless the run folder contains:

No SQL candidate should be packaged unless the decision is ship and the public execution gate is present or explicitly waived in the report.