CHS-SQL Boosts Text-to-SQL Accuracy with Small Language Models.

Minghao Yang, Yanjun Xu· July 28, 2026 View original

Summary

CHS-SQL is a new Text-to-SQL framework that efficiently fine-tunes Small Language Models (SLMs) to achieve state-of-the-art results. It introduces a confidence-guided heuristic search for schema linking, balancing precision and recall to improve SQL generation accuracy while maintaining data security and low computational costs.

Recent advancements in Text-to-SQL systems have shown that Small Language Models (SLMs) can achieve performance comparable to larger models, often requiring only a single high-end GPU and offering enhanced data security. A key challenge in these systems is Schema Linking, where redundant tables and columns are filtered to improve SQL accuracy. However, existing methods often overlook the critical precision-recall trade-off in this selection process. A new framework, CHS-SQL, addresses this by proposing an innovative Schema Linking phase. It employs a heuristic search combined with the model's internal confidence to optimize the precision-recall balance. This mechanism ensures that the most relevant schema candidates are prioritized for SQL generation while suppressing irrelevant noise, leading to more accurate queries. The same confidence-guided strategy is also applied during the SQL generation phase, helping the SLM refine candidate queries and avoid suboptimal solutions. This approach has enabled CHS-SQL to achieve state-of-the-art results for Text-to-SQL tasks using SLMs, demonstrating a significant leap in efficiency and accuracy for converting natural language into database queries.

Why it matters

This innovation allows organizations to deploy highly accurate Text-to-SQL solutions using smaller, more cost-effective, and secure language models. It democratizes access to advanced natural language database querying, reducing reliance on large, resource-intensive models.

How to implement this in your domain

  1. 1Evaluate current Text-to-SQL solutions for performance and resource consumption.
  2. 2Investigate fine-tuning SLMs for specific database schemas using CHS-SQL principles.
  3. 3Implement confidence-guided heuristic search in schema linking components of existing systems.
  4. 4Pilot the CHS-SQL approach on internal datasets to assess accuracy and efficiency gains.
  5. 5Train data teams on using natural language interfaces powered by such SLMs for data access.

Who benefits

BFSIRetailHealthcareGovernmentData Analytics

Key takeaways

  • SLMs can achieve SOTA Text-to-SQL performance with lower computational cost and better data security.
  • CHS-SQL optimizes schema linking by balancing precision and recall using confidence-guided heuristic search.
  • The method improves overall SQL generation accuracy by refining candidate queries.
  • This approach makes advanced natural language database querying more accessible and efficient.

Original post by Minghao Yang, Yanjun Xu

"arXiv:2607.22624v1 Announce Type: new Abstract: Recently, there have been several works in the Text-to-SQL domain that utilize Small Language Models (SLMs) for training. These approaches achieve performance close to that of large models in generating SQL, using only the computati…"

View on X

Originally posted by Minghao Yang, Yanjun Xu on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses