EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQL

Huawei Zheng, Sen Yang, Zhaorui Yang, Yuhui Zhang, Haozhe Feng, Haoxuan Li, Xuan Yi, Chao Hu, Defeng Xie, Chen Hou, Danqing Huang, Wei Chen, Yingcai Wu, Peng Chen, Dazhen DengarXiv 2026

TL;DR

EviLink reframes the critical Text-to-SQL step of "schema linking" from a deterministic, single-path selection problem into an uncertainty-aware, multi-path inference process. By exploring multiple plausible SQL execution paths and dynamically acquiring database evidence only where uncertainty exists, EviLink achieves a 90.15% strict recall rate on the enterprise-scale Spider2-Snow benchmark while dramatically reducing token overhead.

What Problem Does This Paper Address?

Translating natural language questions into executable SQL queries (Text-to-SQL) becomes exceptionally difficult when dealing with massive enterprise databases. Before an LLM can generate a query, it must perform schema linking—identifying the exact subset of tables and columns required to answer the question.

Existing methods typically treat schema linking as a binary, deterministic choice centered around a single assumed SQL structure. However, complex questions often have multiple valid SQL realizations that utilize entirely different join paths, bridge tables, or filtering fields. Committing to a single path too early causes the system to prematurely discard fields needed by alternative valid solutions, leading to irreversible information loss. Conversely, keeping every potentially relevant column floods the LLM context window with noise and drives up token costs.

Figure 1: From single-path schema linking to uncertainty-guided multi-path reasoning. (A) Many existing formulations rely on a single SQL path, deterministic schema decisions, and static evidence provision. (B) Human engineers instead consider multiple plausible SQL paths, separate required from uncertain schema items, and inspect evidence selectively. (C) We reframe schema linking as uncertainty-guided multi-path reasoning, which preserves multiple solution paths, models schema uncertainty, and uses targeted evidence to resolve uncertain schema needs.

Methods

The authors introduce EviLink, a two-stage framework designed to balance schema completeness (recall) with context cleanliness (precision):

  1. Multi-Hypothesis Schema Grounding: Instead of guessing one "correct" query path, EviLink generates a diverse set of structured SQL hypotheses ($H$). It runs independent, recall-oriented schema grounding for each hypothesis. The results are aggregated via a cross-voting mechanism smoothed by a uniform Beta prior. This splits the schema items into three distinct buckets:
  2. Required Set ($S_{req}$): Items consistently supported across paths (locked and kept).
  3. Uncertain Set ($S_{unc}$): Path-dependent items that might be needed.
  4. Candidate Set ($Scand$): Items with zero initial support (ignored by default but retrievable).
  5. Uncertainty-Guided Agentic Refinement: An LLM agent focuses exclusively on resolving the items in the Uncertain Set. It interacts with the database using an Evidence Hierarchy that scales from lightweight to expensive data:
  6. L0/L1: Schema skeletons and basic structural profiles (types).
  7. L2: Semantic profiles (descriptions, sample values).
  8. L3: Detailed statistical profiles (histograms, value distributions).

The agent uses targeted tools (like get_field_stats and probe_sql) to inspect L3 data or run diagnostic queries only for highly uncertain fields, deciding whether to keep or discard them. Unresolved items default to "keep" to preserve a recall-first safety net.

Figure 1: From single-path schema linking to uncertainty-guided multi-path reasoning. (A) Many existing formulations rely on a single SQL path, deterministic schema decisions, and static evidence provision. (B) Human engineers instead consider multiple plausible SQL paths, separate required from uncertain schema items, and inspect evidence selectively. (C) We reframe schema linking as uncertainty-guided multi-path reasoning, which preserves multiple solution paths, models schema uncertainty, and uses targeted evidence to resolve uncertain schema needs.

Datasets

The framework was evaluated on two major Text-to-SQL benchmarks:

  • BIRD-Dev: A widely used large-scale database benchmark.
  • Spider2-Snow: A highly challenging benchmark targeting real-world enterprise cloud data workflows (Snowflake). Because the original Spider2-Snow only features 120 public gold SQL queries, the authors engineered and verified an additional 398 gold queries using an agentic coding pipeline followed by rigorous human cross-checking, establishing a robust 518-example evaluation set.

Key Insights and Ideas

  • The Multi-Path Reality: Complex enterprise questions rarely map to a single unique SQL query. Different query strategies (e.g., wide vs. long data formats, or different operationalizations of a ratio) yield entirely different "gold" schemas.
  • The "Oracle Schema" Fallacy: Surprisingly, EviLink out-performed the standard Oracle Schema (the exact schema used in the ground-truth query) in downstream generation accuracy. A minimal oracle schema can strip away helpful contextual signals or lock the LLM into a path it struggles to generate, whereas a multi-path context provides a safer, more expressive canvas.
  • Adaptive Profiling Saves Tokens: Providing detailed database statistics (L3 data) for an entire enterprise schema is prohibitively expensive. By restricting L3 data acquisition to the agent's uncertainty loop, EviLink achieves high accuracy without blowing past context windows.

Key Results

EviLink was benchmarked against leading Text-to-SQL and schema-linking frameworks (including APEX-SQL, AutoLink, and RSL-SQL):

  • Superior Recall on Enterprise Data: On Spider2-Snow, EviLink achieved a 90.15% field-level Strict Recall Rate (SRR), significantly outperforming the next best baseline, RSL-SQL (83.20%).
  • Drastic Token Reductions: Compared to APEX-SQL, EviLink improved strict recall by nearly 9% while cutting average token consumption by over 78% (from 574.53K down to 123.30K tokens).
  • Downstream SQL Gains: When paired with a fixed downstream generator (Qwen3.6-27B), the schema context provided by EviLink led to the highest execution accuracy (43.75%), even edging out the ground-truth Oracle Schema (42.50%).
Field-level schema linking performance.

Limitations and Future Work

EviLink is explicitly optimized for large-scale, ambiguous enterprise environments. For simpler, small-scale databases where query paths are deterministic, its multi-hypothesis generation and agentic loops represent unnecessary overhead. Furthermore, the refinement agent heavily relies on the quality of the database's underlying metadata; if schema descriptions are missing or data statistics are highly noisy, the agent's ability to resolve uncertainty degrades.

Future work could explore tighter integration between the multi-hypothesis generation phase and the downstream execution feedback loops to dynamically correct paths during generation.

Summary updated

BibTeX
@misc{zheng2026evilink,
  author = {Huawei Zheng and Sen Yang and Zhaorui Yang and Yuhui Zhang and Haozhe Feng and Haoxuan Li and Xuan Yi and Chao Hu and Defeng Xie and Chen Hou and Danqing Huang and Wei Chen and Yingcai Wu and Peng Chen and Dazhen Deng},
  title = {{EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQL}},
  year = {2026},
  eprint = {2605.29670},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.29670},
}
Figure