arXiv:2610.27720cs.CLOct 2026

Manuscript Offprint

arXiv:2610.27720

Tracing Recurrent and Emergent Hallucination Patterns in Decomposed Text-to-SQL Generation

Hayden Moore, Abhinav Verma, Anshuman Dutt

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models can achieve strong Text-to-SQL benchmark performance while still producing schema and query-logic errors. Most evaluations characterize such failures only in the final generated query, making it difficult to determine whether a related error was also observed in an earlier, simpler step or appears only at the final stage. We present a drill-down evaluation framework that decomposes Text-to-SQL queries into progressively more complex executable sub-queries and corresponding natural-language questions, allowing rule-based hallucination categories to be examined across a generation path. We distinguish recurrent hallucinations, in which the same rule-based category is observed in an earlier step and again in the final query, from emergent hallucinations, in which the category is observed at the final step without an earlier detection in the same path. Across five LLMs evaluated on an expanded BIRD-mini benchmark, several categories show appreciable recurrence probabilities, while clause abuse shows comparatively higher conditional emergence. Under the conversational-history condition, recurrence probabilities are generally higher and emergence probabilities are generally lower. These observations indicate that the two conditional measures do not move uniformly in the same direction under additional context and motivate trajectory-level analysis in addition to final-output evaluation. Code and evaluation artifacts are available in the project repository. 1^{1}

1 Introduction

Text-to-SQL systems allow users to query structured databases through natural language rather than directly writing SQL. LLM-based approaches are increasingly used for this task because they can map natural-language requests to executable programs (Li et al., 2023, 2024; Hong et al., 2025). Even when benchmark performance is relatively strong, generated SQL can still contain schema, value, join, clause, or other logic errors (Huang et al., 2025; Qu et al., 2024; Zhang et al., 2024). In this paper, we operationalize a subset of these errors as hallucination categories using explicit rule-based comparisons against the database schema and reference SQL. Such errors can matter functionally because a syntactically valid query may execute while returning a result different from the reference query.

Most Text-to-SQL evaluation focuses on the final generated query. This provides a useful measure of task success but does not describe whether the same rule-detected error category was also present in earlier decomposed steps. A final-step hallucination may be preceded by an earlier instance of the same category, or it may be observed only at the final stage. Distinguishing these cases provides an additional descriptive view of hallucination behavior across a structured generation trajectory.

We therefore study hallucinations descriptively across progressively more complex structured-generation steps. We decompose executable SQL queries from BIRD-mini into drill-down paths and pair each sub-query with a corresponding natural-language sub-question (Fig. 1). We then evaluate five LLMs at each step and annotate hallucination categories using deterministic structural rules. Building on the hallucination taxonomy of Qu et al. (2024), we use a complementary temporal characterization: recurrent hallucinations are observed earlier in the path and again in the final query, whereas emergent hallucinations are observed only at the final step.

This framing is relevant to uncertainty-aware generation, but our experiments do not measure uncertainty itself. We do not estimate calibrated confidence, epistemic uncertainty, or predictive uncertainty, and we do not treat hallucination as a

1^{1}https://github.com/HaydenMM/bird-mini-drilldown direct estimator or necessary consequence of uncertainty. Instead, we examine a reliability failure phenomenon that is relevant to uncertainty-aware systems and ask how its rule-based recurrence and emergence measures differ across progressive query steps and a conversational-history condition.

Our contributions are threefold:

  1. We present a drill-down evaluation framework for examining rule-based hallucination categories across progressively more complex Text-to-SQL generation steps.

  2. We use recurrent and emergent labels to distinguish categories observed both earlier and at the final step from categories observed only at the final step.

  3. Across five evaluated LLMs, we observe non-uniform temporal patterns: several categories show appreciable recurrence, clause abuse shows comparatively higher emergence, and the history condition is generally associated with higher recurrence and lower emergence.