← Latest papers
🤖 AI

Agent-Agnostic Evaluation of SQL Accuracy in Production Text-to-SQL Systems

This paper introduces STEF, a schema-agnostic evaluation framework that enables continuous, production-native monitoring of Text-to-SQL systems by generating interpretable accuracy scores from natural language inputs and generated SQL without requiring database schemas or ground-truth queries.

Original authors: Taslim Jamal Arif, Kuldeep Singh

Published 2026-05-01
📖 4 min read☕ Coffee break read

Original authors: Taslim Jamal Arif, Kuldeep Singh

Original paper dedicated to the public domain under CC0 1.0 (http://creativecommons.org/publicdomain/zero/1.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 robot assistant that speaks "Human" (like "Show me sales from last year") and translates it into "Database Language" (SQL code) to pull information from a company's records.

The big problem this paper tackles is: How do you know if the robot is doing a good job when it's working for real people in a real company?

The Old Way: The "Answer Key" Problem

In the past, to test these robots, researchers used a method like grading a math test with an answer key.

  • The Scenario: You give the robot a question, it gives an answer, and you compare it to a "Gold Standard" answer written by a human expert.
  • The Flaw: In the real world, you don't have an answer key for every single question a customer asks. Also, the company's database is often a secret, changing, or too complex to share with the testing team.
  • The Result: Once the robot is deployed in a real office, nobody knows if it's getting worse over time. It's like driving a car with a broken speedometer; you don't know if you're speeding until you crash.

The New Solution: STEF (The "Smart Translator" Inspector)

The authors created a new system called STEF (Schema-agnostic Text-to-SQL Evaluation Framework). Think of STEF as a super-intelligent editor who doesn't need the original book or the database to check if the translation is good.

Here is how STEF works, using simple analogies:

1. The "No-Reference" Rule

STEF doesn't need the "Gold Standard" answer or the database map. It only looks at three things:

  • What the human asked.
  • How the robot rephrased that question internally.
  • The code the robot wrote.
    It's like a translator checking if a French sentence makes sense in English, without needing to know the original Spanish source text.

2. The "Deconstruction" (Taking the Soup Apart)

Instead of just comparing the code string-for-string (which is like checking if two sentences have the exact same letters), STEF breaks the request down into ingredients:

  • What are we looking for? (The columns)
  • What are we counting or adding? (The math)
  • What are we filtering out? (The "only show me active users" part)
  • How are we grouping it? (By country, by year, etc.)

STEF checks if the robot included the right ingredients. If the human asked for "Active Users" and the robot forgot to filter out "Inactive" ones, STEF spots the missing ingredient immediately.

3. The "Human" Judge (The LLM)

STEF uses another AI (a "Judge") to look at the ingredients and decide: "Does this code actually answer the question?"

  • The Confidence Score: The Judge doesn't just say "Yes" or "No." It says, "I'm 90% sure this is right," or "I'm only 50% sure."
  • The Penalty: If the Judge is unsure, the final score gets a little penalty. This stops the system from giving a perfect score to a guess.

4. The "Real-World" Rules (Normalization)

This is the cleverest part. In the real world, robots sometimes add extra steps that are actually helpful, not wrong. STEF knows this.

  • The "Sort" Rule: If a robot sorts the results from highest to lowest (even if the human didn't ask), STEF says, "That's a nice touch, not a mistake."
  • The "Safety" Rule: If a robot adds a limit like "Show me the top 10,000 results" just to prevent the computer from crashing, STEF says, "Good job, that's safe," instead of "Wrong, you didn't ask for 10,000."
  • The "Group" Rule: If the math requires grouping data to make sense, STEF accepts that even if the human didn't explicitly say "group by."

5. The "Company Customization" (The Rulebook)

Every company is different. One company might call a column "Region," while another calls it "Territory."
STEF has a configurable rulebook. You can tell STEF: "Hey, in this company, 'Region' and 'Territory' mean the same thing," or "Always ignore the 'Status' filter because it's automatically added." This lets STEF adapt to any company without needing to be reprogrammed.

The Final Score

STEF gives a score from 0 to 100.

  • 90-100: Excellent. The robot is ready for prime time.
  • 50-75: Marginal. The robot is guessing too much; humans should check it.
  • Below 50: Poor. The robot is failing and needs immediate help.

Why This Matters

Before STEF, companies were flying blind with their AI assistants. They couldn't tell if the AI was slowly getting dumber or if it was making dangerous mistakes. STEF acts like a continuous health monitor for these AI agents. It lets companies fix problems before they affect real business decisions, all without needing to peek inside the secret database or write new answer keys for every question.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →