A new text-to-SQL system needs a fraction of the training data to beat models several times its size.
DualSQL uses two AI agents built on the same underlying model instead of training separate ones: one maps a plain-English question to the right database tables and columns, the other writes the actual SQL query. The two agents were trained together with reinforcement learning, using three tools that let them test their reasoning against a real database as they work. The researchers also built a new accuracy check called robust execution match to judge whether generated SQL actually returns the right answer, not just whether it looks plausible. Trained on only 3755 examples, the 4-billion-parameter version scored 68.0% accuracy on the BIRD benchmark, matching earlier 7-billion-parameter models, while an 8-billion-parameter version reached 71.1%, beating previous best single-model systems built with 32 billion parameters.
Text-to-SQL is the technology behind features that let people ask a database questions in plain English instead of writing queries by hand. Most existing systems bolt together separate models for each step, which is costly to train and stops one step from learning from the other. DualSQL's results suggest that letting two specialized agents share one model and train together can outperform simply adding more parameters.
BIRD is a widely used benchmark, but it is still a curated one. The real test is whether this efficiency holds up on the sprawling, undocumented databases most companies actually run.