← Latest papers
💬 NLP

Residual Skill Optimization for Text-to-SQL Ensembles

The paper introduces DivSkill-SQL, a residual skill optimization framework that constructs complementary Text-to-SQL ensembles by iteratively training new skills on previous failures without model fine-tuning, thereby significantly improving Pass@K accuracy and reducing hallucinations across diverse SQL dialects and tasks.

Original authors: Jiongli Zhu, Haoquan Guan, Parjanya Prajakta Prashant, Nikki Lijing Kuang, Seyedeh Baharan Khatami, Canwen Xu, Xiaodong Yu, Yingyu Lin, Zhewei Yao, Yuxiong He, Babak Salimi

Published 2026-05-22
📖 5 min read🧠 Deep dive

Original authors: Jiongli Zhu, Haoquan Guan, Parjanya Prajakta Prashant, Nikki Lijing Kuang, Seyedeh Baharan Khatami, Canwen Xu, Xiaodong Yu, Yingyu Lin, Zhewei Yao, Yuxiong He, Babak Salimi

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 are trying to solve a very difficult puzzle, like translating a complex human question into a specific computer language called SQL. You have a super-smart AI assistant (a Large Language Model) that can try to solve it.

Usually, if you ask this AI once, it might get it right, or it might get it wrong. To improve the odds, many systems try a "shotgun approach": they ask the AI to generate eight different answers at once and then pick the best one. This is called an ensemble.

However, the paper argues that the current "shotgun approach" has a major flaw. It's like asking the same person to write eight different essays on the same topic by just telling them to "write faster" or "change their mood." They will likely write eight essays that are all very similar, and if they make a mistake in the first one, they will probably make that same mistake in the other seven. They are all failing in the same way.

The Solution: The "Specialized Team" (DIVSKILL-SQL)

The authors of this paper, DIVSKILL-SQL, propose a smarter way to build a team of AI assistants. Instead of just asking for random variations, they train a team of eight distinct specialists, each with a unique "skill set" or personality.

Here is how they do it, using a simple analogy:

1. The "Residual" Training Method (Learning from Failure)

Imagine you are a coach training a soccer team.

  • The Old Way: You tell all eight players to practice the same drill. If they keep missing the goal, you just tell them to try harder or run faster. They keep missing in the exact same spot.
  • The DIVSKILL-SQL Way: You watch the game. You see that Player A keeps missing the goal because they are too aggressive. So, you don't just tell Player A to try again; you create a new, specific training drill just for Player A that fixes that specific weakness.
  • Then, you look at the remaining problems. Maybe Player B is great at shooting but bad at passing. You create a new drill just for Player B to fix the passing.

In the paper, this is called Residual Skill Optimization. The system looks at the questions the current team failed to solve, and then "optimizes" a new skill specifically to solve those remaining difficult cases. It doesn't try to make every player perfect at everything; it tries to make each player perfect at fixing the specific holes left by the others.

2. The "Skill Cards" (No Heavy Lifting)

The paper emphasizes that they don't need to retrain the entire AI brain (which is expensive and slow). Instead, they just change the instruction card (the prompt) given to the AI.

  • One card might say: "Be a careful explorer. Check the data first, then write the code."
  • Another card might say: "Be a fast coder. Write the code immediately, run it, and fix errors as they happen."
  • A third might say: "Break the problem into tiny pieces before building the big picture."

By giving the AI different "personality cards" for each of the eight attempts, they ensure that the eight answers are truly different from each other. If one approach fails, the others are likely to succeed because they are thinking about the problem differently.

3. The "Tournament" (Picking the Winner)

Once the team of eight specialists has generated their eight answers, the system needs to pick the winner.

  • Instead of just guessing or picking the first one, they use a pairwise tournament.
  • Imagine a boxing match: Answer A fights Answer B. The AI judge picks the winner. Then the winner fights Answer C.
  • The one with the most "wins" gets to be the final answer. This is more reliable than just picking one randomly.

What Did They Find?

The authors tested this on real-world database problems (using benchmarks like Spider2-Lite and BIRD-Critic). Here are the key takeaways:

  • Better Accuracy: Their "Specialized Team" solved significantly more problems than the best existing methods. On some difficult databases, they improved accuracy by over 11 points.
  • Fewer Hallucinations: Because the skills are focused on solving specific types of errors, the AI made fewer "wild guesses" (like inventing fake database tables that don't exist).
  • True Diversity: The paper shows that the eight answers weren't just slightly different versions of the same sentence. They were generated using completely different reasoning paths (e.g., one checked the data first, another wrote code immediately). This meant they covered more ground.
  • Transferable Skills: Interestingly, a team trained on one type of database (Snowflake) worked just as well on completely different databases (BigQuery, SQLite) without needing to be retrained. The "skills" (like "break the problem down") were useful everywhere.

Summary

The paper introduces a method to make AI teams smarter not by making them bigger, but by making them more diverse. Instead of asking the AI to guess eight times in a row, they teach the AI eight different ways to think, ensuring that if one way fails, another way is likely to succeed. It's the difference between asking one person to try eight times, versus asking eight different experts with unique strengths to solve the problem together.

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 →