← Latest papers
💬 NLP

Spider 2.0-AIFunc: Extending Real-World Text-to-SQL to AI-Native SQL Workflows

This paper introduces Spider 2.0-AIFunc, a new benchmark of 465 verified instances across 125 real-world databases designed to evaluate large language models' ability to generate AI-native SQL queries on the Snowflake platform, revealing that while top proprietary models achieve 67-70% accuracy, current agent frameworks optimized for traditional text-to-SQL tasks do not effectively transfer to this emerging setting.

Original authors: Tianyang Liu, Canwen Xu, Fangyu Lei, Nikki Lijing Kuang, Jixuan Chen, Tao Yu, Julian McAuley, Zhewei Yao, Yuxiong He

Published 2026-07-08
📖 5 min read🧠 Deep dive

Original authors: Tianyang Liu, Canwen Xu, Fangyu Lei, Nikki Lijing Kuang, Jixuan Chen, Tao Yu, Julian McAuley, Zhewei Yao, Yuxiong He

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 massive, high-tech library (a cloud database) where people store everything from customer reviews to sales records. For years, asking questions about this library required speaking a very strict, robotic language called SQL. It was like trying to order a complex meal at a restaurant by only speaking in a code of numbers and symbols.

Recently, the library owners (like Snowflake) added a new feature: AI Functions. Think of these as "smart assistants" built right into the ordering system. Now, instead of just asking for "all red apples," you can ask the system to "read the reviews of these apples and tell me if people are happy or angry," or "find reviews that sound similar to this one." This turns the database into an AI-Native system, where you can mix standard data commands with smart, language-based thinking in a single sentence.

The Problem: The Old Map Doesn't Work

The researchers noticed that while these new "smart assistants" are powerful, the tests used to train and check computer brains (AI models) were outdated. The old tests only checked if the computer could speak the strict robotic language. They didn't check if the computer could use the new "smart assistants." It was like testing a driver only on a straight, empty road, when the real world now has traffic, pedestrians, and construction zones.

The Solution: Spider 2.0-AIFunc

To fix this, the team created a new, tougher driving test called Spider 2.0-AIFunc.

  1. The Transformation: They took 513 existing "driving tests" (questions about data) and rewrote them. They forced the questions to require the new "smart assistants."
    • Old Question: "Show me all negative reviews." (Requires a human to read them first).
    • New Question: "Show me all reviews where the AI assistant says the sentiment is negative." (The AI does the reading inside the database).
  2. The Construction Crew: They used a team of AI agents (digital workers) to rewrite these questions. These agents acted like editors and mechanics:
    • They checked that the instructions were clear (e.g., "What exactly do you mean by 'negative'?").
    • They made sure the "smart assistant" had all the right tools (parameters) to do the job.
    • They ran the tests over and over again to make sure the answers were stable and didn't change just because the AI assistant had a bad day.
  3. The Final Exam: The result is a benchmark of 465 verified questions across 125 different databases. It covers six types of "smart assistant" tasks, like sorting reviews by emotion, finding similar text, or extracting specific details from a paragraph.

The Results: Who Passed the Test?

The researchers put 10 different AI models (the "drivers") through this new exam to see how well they could write these complex, AI-powered queries.

  • The Top Drivers (Proprietary Models): The big, closed-source models (like Claude Opus and Gemini) did the best. They got about 67% to 70% of the answers right. They were good at figuring out which "smart assistant" to use and how to ask it the right question.
  • The Open-Source Drivers: The best open-source models (like Kimi K2.5) scored around 58%. They were decent, but they made more mistakes.
  • The Gap: The main reason the open-source models struggled wasn't that they couldn't write the basic code. They stumbled on the "smart" parts:
    • Misunderstanding the rules: Picking the wrong table or column.
    • Bad instructions: Forgetting to tell the AI assistant exactly what to look for (e.g., not listing all the possible categories for a classification task).
    • Logic errors: Mixing up the order of operations (e.g., filtering data after asking the AI instead of before).

The Surprising Discovery: Less is More

The researchers also tested whether using complex "agent frameworks" (elaborate toolkits that help the AI plan its steps) helped.

  • The Finding: Surprisingly, the most complex toolkits didn't help much. In fact, a minimal setup—just a simple tool to look at the database and a tool to run the query—performed just as well as, or even better than, the fancy frameworks.
  • The Metaphor: It's like giving a master chef a tiny, simple knife versus a massive, complicated Swiss Army knife. For this specific type of cooking (AI-Native SQL), the master chef didn't need the extra gadgets; they just needed to know how to use the knife. The complex frameworks designed for old-school data tasks actually got in the way or didn't add value for these new, smart tasks.

Summary

This paper introduces a new, realistic test for AI models that checks if they can use modern "AI-powered" database features. It found that while the best AI models are getting good at this, there is still a gap between the top-tier models and the open-source ones. The key to success isn't using more complex planning tools, but rather getting the basic instructions and parameters for the AI functions exactly right.

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 →