BEAVER: An Enterprise Benchmark for Text-to-SQL
The paper introduces BEAVER, the first text-to-SQL benchmark derived from private enterprise data warehouses featuring 9,128 real-world queries across 19 domains, which reveals a significant performance gap for state-of-the-art models and proposes a fine-grained evaluation framework to diagnose complex challenges like domain knowledge and advanced function usage.
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 giant, messy library where the books aren't organized by title or author, but by a secret code only the librarians know. The shelves are labeled with cryptic symbols like "FCLT_ROOMS" instead of "Classrooms," and the books are scattered across thousands of different rooms.
Now, imagine you want to ask a librarian, "Show me the top 10 classes in the Arts building that meet in rooms bigger than 400 square feet." In a normal library, you'd just say that, and they'd find it. But in this secret library, the librarian (an AI) has to:
- Guess which 5 different rooms to look in.
- Figure out that "Stata building" is actually code for "Room 32."
- Connect the dots between books that don't seem related at all.
- Do complex math to rank the classes.
This is the problem BEAVER is trying to solve.
The Problem: The "Too Clean" Library
For years, scientists have been training AI to turn human questions into database commands (called Text-to-SQL). They tested these AIs using "practice libraries" (public benchmarks like Spider or BIRD). These practice libraries are like toy sets: the shelves are neat, the labels are clear, and the questions are simple.
In these toy sets, the AIs are geniuses, getting 80%+ of the answers right. But the authors of this paper say, "That's like testing a race car on a smooth track and assuming it can drive through a muddy swamp." Real company databases are the muddy swamp: huge, messy, full of secret codes, and the questions people ask are incredibly complicated.
The Solution: BEAVER (The Swamp Simulator)
The team created BEAVER, the first "test drive" for AIs using real, messy data from private company databases.
- The Data: They gathered 9,128 real questions and answers from three different companies (a university, a research lab, and a housing facility).
- The Scale: These aren't toy sets. The average database has over 100 tables (shelves) and nearly 900 columns (rows of data). The questions are long and require deep thinking.
- The Expansion: Since they couldn't get enough real data due to privacy rules, they built a "template machine." They took the structure of real questions (like "Find the top 10...") and mixed them with different company details to create thousands of new, realistic practice questions.
The Five Hidden Steps (Subtasks)
The paper argues that getting the final answer right isn't just one big jump. It's like baking a cake; if you mess up one step, the whole cake fails. They broke the AI's job down into five specific steps to see where it fails:
- Finding the Right Rooms (Multi-table retrieval): Which 5 shelves do I need to look at?
- Connecting the Dots (Join key detection): How do I link the "Room" shelf to the "Class" shelf when they don't have matching labels?
- Decoding the Labels (Column mapping): Does "Stata building" mean column X or column Y?
- Knowing the Secrets (Domain knowledge): I know "Stata building" is actually "Building Key 32," even though that fact isn't written in the question.
- Breaking it Down (Query decomposition): This question is too hard to do in one go. I need to solve part A, then part B, and then combine them.
The Results: A Reality Check
When they tested the smartest AIs available (including the latest models from OpenAI and others) on BEAVER, the results were shocking.
- The Score: Instead of 80%, the best AI only got 10.8% of the answers right.
- The "Cheat Sheet" Test: The researchers then gave the AI a "cheat sheet" (the correct answers for those 5 hidden steps). Even with the cheat sheet, the AI's score only jumped to 30.1%.
What does this mean?
It means the AI is failing at two main things:
- The Basics: It can't even find the right shelves or connect the right dots (the 5 subtasks).
- The Math: Even when it knows what to do, it struggles with the complex math and logic required to build the final answer (like using advanced functions or organizing the data correctly).
The Conclusion
The paper concludes that we can't just keep training AIs on neat, toy databases. To build AI that can actually work in real companies, we need to stop pretending the data is clean. BEAVER is a new, harder test that forces AI developers to fix these specific, messy problems before their tools can be trusted in the real world.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.