What Predicts Correctness in Text-to-SQL? A Selective-Prediction Study
This study demonstrates that while basic self-consistency and log-probability signals struggle to predict Text-to-SQL correctness beyond a 0.68 AUROC ceiling, verification-based approaches—particularly ensembles of large language model judges—achieve superior performance (up to 0.82 AUROC) and robust generalization across schemas, whereas fine-tuned verifiers fail to transfer effectively to unseen schemas.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very smart, but sometimes overconfident, robot assistant. You ask it a question in plain English, and it writes a complex computer command (called a SQL query) to find the answer in a giant database.
The big problem is: How do you know if the robot is right or just making things up?
This paper is like a detective story investigating different "lie detectors" to see which one can actually tell if the robot's answer is correct. The researchers tested these lie detectors on two very difficult puzzles (datasets called BIRD and Spider) where the robot often gets things wrong.
Here is what they found, explained through simple analogies:
1. The "Echo Chamber" Lie Detector (Self-Consistency)
The Idea: One way to check the robot is to ask it the same question 8 times. If it gives you the exact same answer 8 times, you assume it must be right. It's like asking a friend the same question repeatedly; if they say the same thing every time, you trust them.
The Result: This didn't work well. The robot was very good at being consistent, even when it was wrong. It would confidently repeat the same wrong answer 8 times.
The Score: It was only slightly better than flipping a coin (about 67% accurate at spotting the truth).
2. The "Grammar Police" Lie Detector (Log-Probability)
The Idea: This checks how "smooth" the robot's sentence feels. If the robot says something that sounds very natural and grammatically perfect, maybe it's right.
The Result: Also didn't work well. The robot could write a perfectly smooth sentence that was completely nonsense.
The Score: Similar to the echo chamber, it hit a "ceiling" and couldn't get much better.
3. The "Expert Judge" Lie Detector (Verification)
The Idea: Instead of asking the robot to check itself, you show the question, the database rules, and the robot's answer to a different, super-smart AI (a "Judge"). You ask the Judge: "Does this answer actually solve the problem?"
The Result: This was the winner. The Judge didn't just look for repetition; it actually read the logic. It checked if the math was right, if the conditions matched the question, and if the grouping made sense.
The Score: This jumped the ceiling, reaching about 77–78% accuracy.
4. The "Two-Headed" Lie Detector (Ensemble)
The Idea: The researchers realized that even smart Judges make different mistakes. So, they used two different Judges (one from OpenAI and one from Anthropic) and asked them both. If they both agree, you trust the answer even more.
The Result: This was the best method. Because the two Judges made different errors, combining them covered each other's blind spots.
The Score: This reached 82% accuracy and was very reliable. It was the only method that could safely say, "I'm not sure, I'll skip this question," without skipping too many easy ones.
5. The "Student" vs. The "Professor" (Training Verifiers)
The Idea: Can we train a cheaper, smaller AI to be the Judge? They tried teaching a small AI by showing it thousands of examples of right and wrong answers.
The Result:
- In the Classroom (Same Database): The student did great! If the database was the same one it studied, it was almost as good as the Professor.
- On the Real World (New Database): When they gave the student a new database it had never seen, it failed miserably. It had just memorized the patterns of the old database rather than learning how to reason.
- The Professor (Frozen Model): The big, pre-trained "Professor" AI (which wasn't fine-tuned on specific data) was the only one that could handle new, unseen databases effectively.
The Big Takeaway
The paper concludes that for hard computer tasks, repetition isn't proof of correctness. Just because a robot says the same thing twice doesn't mean it's right.
To know if an AI is telling the truth, you need a reasoning expert who actually understands the logic of the question and the answer.
- If you are working on a fixed, known system, a trained "student" verifier is cheap and effective.
- If you are working in the real world with new, unknown data, you need a powerful, "frozen" reasoning model (a Professor) to act as the judge.
The paper also notes that simply asking the robot to "fix its own work" (self-correction) didn't help much; it just made the robot more confident in its mistakes. You still need an outside judge to decide if the final answer is safe to use.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.