← Latest papers
🤖 AI

UniQL: Towards Dialect-Universal Benchmarking for Text-to-SQL

The paper introduces UniQL, a human-verified benchmark comprising 1,534 natural language questions aligned with 24,544 executable SQL queries across 16 dialects, which reveals that current text-to-SQL models struggle to generalize beyond SQLite and highlights the critical need for dialect-aware evaluation methods.

Original authors: Jianling Gao, Chongyang Tao, Jiayuan Bai, Liu Yang, Xuanguang Pan, Jinrui Liu, Shihao Xing, Xiaohan Xu, Jie Liang, Shuai Ma

Published 2026-06-09
📖 5 min read🧠 Deep dive

Original authors: Jianling Gao, Chongyang Tao, Jiayuan Bai, Liu Yang, Xuanguang Pan, Jinrui Liu, Shihao Xing, Xiaohan Xu, Jie Liang, Shuai Ma

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

The Big Problem: One Language, Many Dialects

Imagine you are a chef who speaks "English." You want to order ingredients from a grocery store.

  • In New York, you say, "I need a bag of flour." The clerk hands you exactly that.
  • In London, if you say the same thing, the clerk might hand you a different type of flour because they use different measuring cups.
  • In Tokyo, the clerk might not understand "flour" at all and ask for the Japanese word for it, or they might give you rice instead because their system thinks "flour" means something else.

In the world of computers, SQL is the language used to talk to databases (the digital warehouses where data lives). Just like human languages, SQL has many "dialects" (versions) like MySQL, Oracle, PostgreSQL, and SQLite. They all look similar, but they have different rules, different vocabulary, and different ways of doing things.

The Current Situation: Only Testing in New York

For years, researchers have been testing AI models (the "chefs") on a benchmark called SQLite. This is like only testing the AI in New York.

  • The AI learns to order ingredients perfectly in New York.
  • Researchers say, "Great! The AI is smart!"
  • But the paper argues: We don't know if the AI can actually order ingredients in London or Tokyo. It might fail miserably because it only learned the New York rules.

The paper calls this a "blind spot." Current tests make AI look smarter than it really is because they don't check if the AI can handle the messy reality of different database systems.

The Solution: UNIQL (The Universal Menu)

The authors created a new test called UNIQL. Think of UNIQL as a Universal Menu that has been translated into 16 different languages (16 different SQL dialects).

  • The Setup: They took 1,534 real-world questions (like "Show me the top 5 schools with the lowest enrollment").
  • The Translation: For every single question, they created 16 different versions of the correct answer (SQL code), one for each of the 16 database systems.
  • The Goal: They want to see if an AI can look at the question and write the correct code for any of those 16 systems, not just the one it was trained on.

How They Built It (The Factory)

Building this test was hard. You can't just ask a computer to translate the code because it often makes mistakes. So, they built a "factory" with a human-in-the-loop:

  1. The Robot Translator: First, they used a standard tool to translate the code automatically.
  2. The Trial Run: They ran the translated code on the actual database. If it crashed or gave the wrong answer, they caught it.
  3. The AI Fixer: If the robot failed, they asked a powerful AI (like a senior translator) to try again, showing it the error message.
  4. The Rule Book: If the AI kept failing in the same way, they wrote a new "rule" to fix that specific problem for the future.
  5. The Human Inspector: Finally, for the hardest cases that the machines couldn't fix, human experts manually checked and corrected the code to ensure it was perfect.

What They Found (The Results)

They tested many famous AI models (like GPT-4, Claude, and open-source models) on this new 16-dialect test. The results were a reality check:

  1. The "New York" Illusion: An AI might get 60% of the questions right in SQLite (New York), but when you switch to Teradata or Druid (Tokyo or London), its score might drop to 30%.
  2. No True "Universal" Chef: Even the smartest AI models only got about 50-55% of the answers right on average across all 16 dialects. They are far from being "dialect-universal."
  3. The "All-or-Nothing" Problem: A model might get the answer right for 8 out of 16 dialects, but fail on the other 8. It hasn't truly learned the intent of the question; it's just memorizing specific dialect tricks.
  4. Size Matters (Sort of): Bigger AI models generally did better, but even the biggest models still struggled with the hardest dialects.

The Conclusion

The paper concludes that we cannot just test AI on one database system and assume it works everywhere. The "Universal" dream of talking to any database in plain English is not yet a reality. The AI is currently too sensitive to the specific "dialect" of the database it is talking to.

To fix this, we need:

  • Better Tests: Like UNIQL, which checks all dialects, not just one.
  • Smarter Models: AI that understands the meaning of the question deeply, rather than just memorizing the syntax of one specific database.

In short: The paper built a rigorous 16-language test to prove that current AI is still a "one-trick pony" when it comes to talking to different types of databases.

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 →