AutoLink: Autonomous Schema Exploration and Expansion for Scalable Schema Linking in Text-to-SQL at Scale

Ziyang Wang, Yuanlei Zheng, Zhenbiao Cao, Xiaojin Zhang, Zhongyu Wei, Pei Fu, Zhenbo Luo, Wei Chen, Xiang BaiarXiv 2025 · DOI

Introduction

Text-to-SQL systems are vital for natural language data interfaces, yet they face a critical bottleneck: schema linking. This process involves identifying the specific tables and columns required to answer a query. While manageable in small academic datasets, industrial databases with thousands of columns present significant challenges, including context window limitations and performance degradation due to "noise" from irrelevant schema elements. Traditional retrieval methods often fail to maintain high recall as schema size scales, leading to incorrect queries.

AutoLink addresses these challenges by reframing schema linking as an iterative, exploratory process. Instead of a single-pass retrieval, an autonomous agent interacts with two specialized environments: a Database Environment ($E_{DB}$) for live SQL probes and a Schema Vector Store ($E_{VS}$) for semantic search.

The Agentic Schema Linking Process in AutoLink.

The agent utilizes a specialized action space—including @explore_schema, @retrieve_schema, and @verify_schema—to refine its understanding of the database. By attempting draft queries and interpreting execution feedback (e.g., "column not found" errors), the agent can autonomously discover missing schema elements, mimicking the workflow of a human database engineer. This iterative loop allows the system to recover from initial misses and build a precise, minimal schema subset.

Evaluation and Benchmarks

The framework was evaluated on two major benchmarks: BIRD-Dev and Spider 2.0-Lite. Spider 2.0-Lite is particularly challenging, featuring databases with an average of 800 columns and some exceeding 3,000, reflecting the complexity of real-world enterprise environments across multiple SQL dialects like BigQuery and Snowflake.

Key Results and Scalability

AutoLink demonstrates superior scalability and efficiency compared to established baselines. It achieved a Strict Recall Rate (SRR) of 97.4% on BIRD-Dev and 91.2% on Spider 2.0-Lite. Crucially, while baseline performance drops sharply as database size increases, AutoLink remains robust.

Performance metrics (SRR, Token Usage, EX) across varying database sizes.

As shown in the experimental results, AutoLink maintains high recall (SRR) and execution accuracy (EX) even in databases with over 3,000 columns. Furthermore, it achieves these results with nearly 90% fewer tokens than full-schema reasoning methods by focusing only on relevant schema subsets. On the official Spider 2.0-Lite leaderboard, AutoLink ranked 2nd overall with an Execution Accuracy of 34.9%.

Conclusion

AutoLink provides a scalable solution for Text-to-SQL in large-scale environments. By leveraging an iterative agentic approach, it bridges the gap between semantic retrieval and precise schema identification, significantly reducing token costs while maintaining high accuracy. Future work will focus on reducing latency and enhancing the agent's reasoning capabilities for even more complex data exploration scenarios.

Summary updated

BibTeX
@misc{wang2025autolink,
  author = {Ziyang Wang and Yuanlei Zheng and Zhenbiao Cao and Xiaojin Zhang and Zhongyu Wei and Pei Fu and Zhenbo Luo and Wei Chen and Xiang Bai},
  title = {{AutoLink: Autonomous Schema Exploration and Expansion for Scalable Schema Linking in Text-to-SQL at Scale}},
  year = {2025},
  eprint = {2511.17190},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.17190},
}
Figure