Skip to content

NL2SQL 0.9.1

Better answers on large schemas: the right tables reach the planner, joins across partitioned tables work, a split question comes back as one result in the shape you asked for, and the eval scorer reads what a real database returns.

Released 2026-10-30.

Highlights

  • Large schemas find their tables. Past 15 tables, a model now picks the tables a question needs from a catalog, glossary terms bring in their tables, and the tables that join them are filled in from the foreign keys. The 0.9.0 smoke question on Pagila ("top 5 films by revenue in the top category") now reaches payment. On the keyed Pagila suite, answers passing went from 0 of 8 to 11 of 11.
  • Joins that work on real databases. A partitioned Postgres table takes its partitions' foreign keys. A rejected join names the joins that are declared between its tables, or the shortest declared path, and a declared join is accepted with its sides in either order. Plans can also take the days between two dates, compiled for each database.
  • A split question comes back as one result. The answer's columns follow the question, a column name shared by both joined sides is rejected before it can silently break the sort, and the decomposer splits only when one query cannot do the job. Answers quote figures exactly as the rows hold them.
  • A fairer eval scorer, and a Pagila suite. The scorer reads Decimal and date values, accepts extra columns and reordered columns, and scores a split question on its combined result. A new Pagila suite runs on CI with a model-free retrieval gate.

What's included

Features

  • A able_selector agent and a join-path fill for schemas past ull_snapshot_max_tables, with the glossary's tables sent too ((#378)).
  • A Pagila table-recall suite with gold tables and SQL ((#379)), its expected rows and a keyed recall run ((#382)).
  • A model-free Pagila retrieval baseline that CI gates ((#383)).

Fixes

  • A partitioned Postgres table takes its partitions' foreign keys, a rejected join names the allowed joins, and a declared join is accepted in either operand order ((#386)).
  • Plans can use DATE_DIFF('day', start, end), compiled per dialect; another unit or a - between two date columns is rejected at validation ((#387)).
  • The decomposer splits only when needed, and the answer quotes exact figures ((#388)).
  • The eval scorer reads Decimal cells and dates, accepts extra columns, derived differences and percentages, and the preview count ((#384)).
  • A split question is scored on its combined result ((#391)).
  • The decomposer rejects a column name both joined sides share ((#392)).
  • A split answer's columns follow the question ((#393)).
  • esult_match accepts reordered columns ((#394)).
  • The decomposer keeps the columns that say what the answer is about, and no prompt example is taken from an eval question; a guard test checks every prompt module ((#395)).

Docs

  • Wave D start screen: demo or your own database, with the multi-project platform deferred ((#381)).

Tests

  • Full-name alternatives, as reviewed lt_sql, for Pagila 002, 003 and 011 ((#389), (#390)).

Known limits

  • Some questions need a planner retry for an invented join, which roughly doubles their latency. This is tracked.
  • A plan is one flat SELECT per sub-query: no subqueries, CTEs or window functions. A question like "the top category, then its top 5 films" still takes two sub-queries.

Upgrading

pip install --upgrade "nl2sql-engine==0.9.1"

Breaking changes: none.

What's next

Next: Wave D, the apps.

Full changelog: v0.9.0...v0.9.1