Skip to content

TL;DR Agentic Text-to-SQL systems often decompose complex questions into intermediate sub-questions before SQL generation. However, the independent contribution of decomposition remains unclear, as existing approaches typically combine it with other architectural components. To address this gap, we...

Authors: Duoduo Liao, Sehaj Gill, Shubham Sandeep Nirgude et al.

Published: 2026-12-01

Categories: cs.AI, cs.DB, cs.IR

arXiv: 2611.38183

License: cc-by-4.0

PDF: download · download markdown

:material-format-quote: Cite this paper

@misc{arxiv_2611_38183,
  title        = {Rethinking Decomposition: A Controlled Pilot Study of Agentic Text-to-SQL},
  author       = {Duoduo Liao and Sehaj Gill and Shubham Sandeep Nirgude and Callie C. Liao},
  year         = {2026},
  eprint       = {2611.38183},
  archivePrefix = {arXiv},
  url          = {https://arxiv.org/abs/2611.38183}
}

Rethinking Decomposition: A Controlled Pilot Study of Agentic Text-to-SQL

Duoduo Liao1 , Sehaj Gill1 , Shubham Sandeep Nirgude1 , Callie C. Liao2 1School of Computing, George Mason University {dliao2, sgill27, snirgude}@gmu.edu 2Department of Computer Science, Stanford University [email protected]

Abstract—Agentic Text-to-SQL systems often decompose complex questions into intermediate sub-questions before SQL generation. However, the independent contribution of decomposition remains unclear, as existing approaches typically combine it with other architectural components. To address this gap, we propose a controlled experimental framework to isolate the effects of decomposition and conduct a controlled pilot study using this framework. The evaluation compares 100 humancrafted natural-language question–gold SQL pairs from a realworld database and 62 additional questions from selected BIRD benchmark databases. Specifically, we compare direct generation with Large Language Model (LLM)-based manager-orchestrated decomposition under selective and forced routing, while keeping databases, schema, prompts, verification mechanisms, and evaluation protocol fixed across multiple model families. The results show no statistically significant performance improvement from manager-orchestrated decomposition under the evaluated conditions. Direct generation achieves the highest execution accuracy (90% strict, 91% normalized, 92% LLM-judge-gated) while requiring substantially fewer inference calls. Although selective decomposition occasionally solves questions that direct generation fails, these improvements are offset by errors in other cases. Moreover, decomposition more than doubles end-to-end latency without improving accuracy. Human evaluation indicates that decomposition process generally produces valid intermediate sub-questions, suggesting that downstream SQL generation and composition remain key sources of error. These findings suggest that the decomposition should be applied selectively rather than assumed to provide consistent benefits, highlighting the need for more effective routing policies and SQL composition strategies to enhance the reliability and efficiency of agentic Text-to-SQL systems.

Index Terms—Text-to-SQL, Large Language Models, Agentic AI, Query Decomposition, Multi-Agent Systems, SQL Generation, LLM Reasoning, Controlled Evaluation

I. INTRODUCTION

Large Language Models (LLMs) have significantly advanced Text-to-SQL generation, enabling natural-language interfaces for databases [1], [2]. However, reliably translating complex user questions into executable SQL remains challenging, particularly for queries requiring multi-table reasoning, nested operations, and advanced SQL constructs. To address these challenges, recent agentic Text-to-SQL systems employ multi-stage workflows that incorporate decomposition, planning, refinement, and verification before generating final queries. These approaches build on the broader insight that decomposing complex tasks into structured intermediate steps can improve reasoning performance [3]–[5].

However, the independent contribution of decomposition in Text-to-SQL remains unclear. Existing agentic systems typically combine decomposition with other components, including schema linking, retrieval, candidate generation, and self-correction. As a result, reported improvements cannot be directly attributed to decomposition alone. Moreover, introducing additional reasoning stages may lead to coordination and composition errors while increasing inference cost and latency [3], [6]. This raises a fundamental question: When does decomposition improve Text-to-SQL generation over direct query generation?

To investigate this question, we propose a controlled experimental framework to isolate the effects of decomposition and conduct a pilot study within this framework. In this work, decomposition refers to workflows that introduce intermediate sub-question generation and SQL composition stages between the user question and final SQL generation. Specifically, we compare direct generation with LLM-based managerorchestrated decomposition under selective and forced routing, while keeping the database interface, schema representation, prompts, verification mechanisms, and evaluation protocol consistent across configurations. This study aims to investigate whether decomposition provides measurable end-to-end improvements and whether such improvements justify the associated computational overhead.

Our framework is evaluated on realistic relational databases with multiple interconnected tables, including a database derived from the U.S. Federal Highway Administration (FHWA) National Bridge Inventory (NBI) containing approximately 1.2 million rows across six tables [7] and two BIRD databases for cross-domain generalization [8]. The evaluation includes 100 human-crafted natural-language question–gold SQL pairs for the NBI database and 62 additional questions from the BIRD databases. Multiple LLM families and model tiers are evaluated under three reasoning policies: direct generation, selective decomposition, and forced decomposition. The system measures execution accuracy, judge-based semantic equivalence, inference cost, and end-to-end latency.

Results show that manager-orchestrated decomposition does not consistently outperform direct generation under the evaluation conditions. Direct generation reaches above 90% execution accuracies with OpenAI GPT-4o [9] while requiring substantially fewer inference calls. In contrast, forced decomposition increases latency by approximately 2–3× without reliable accuracy improvements. Human evaluation indicates that generated sub-questions are generally valid, suggesting that downstream SQL generation and composition remain important sources of error.

The main contributions are summarized as follows:

  • A controlled experimental framework and pilot study that isolates decomposition as an independent design choice in agentic Text-to-SQL, separating its effect from other architectural components.
  • A systematic comparison of direct generation, selective decomposition, and forced decomposition across multiple LLM families and relational databases under a unified evaluation protocol, assessing both accuracy and computational cost.
  • Analyses of routing behavior, sub-question validity through human evaluation, and failure modes, highlighting downstream SQL generation and composition as key remaining challenges.

LLM-Based and Agentic Text-to-SQL. Large language models have advanced Text-to-SQL generation through improved prompting, schema grounding, retrieval, and staged generation. DIN-SQL decomposes Text-to-SQL into schema linking, difficulty classification, SQL synthesis, and self-correction [3]. For in-context learning, DAIL-SQL investigates demonstration retrieval and ACT-SQL explores automated reasoning [10], [11], whereas CodeS focuses on fine-tuning strategies for SQL generation [12]. More recent agentic systems incorporate specialized components for decomposition, refinement, verification, and candidate selection [4], [5]. However, these approaches typically combine decomposition with other architectural improvements, making its independent contribution to end-to-end performance difficult to establish.

Reasoning Through Decomposition. Decomposition has been widely explored as a strategy for improving LLM reasoning. Chain-of-Thought (CoT), least-to-most prompting, decomposed prompting, and plan-and-solve demonstrate the potential of structured intermediate reasoning for complex tasks [13]–[15]. However, additional reasoning stages can increase computational cost and introduce opportunities for error propagation. Recent analyses of multi-agent LLM systems further show that failures may arise from coordination and integration between components rather than from individual reasoning steps alone [6]. Most directly related to our work, [16] find that least-to-most styled question decomposition provides little benefit for Text-to-SQL parsing on Spider [17], with finer-grained reasoning potentially increasing error propagation within a single-parser prompting framework. In contrast, our study investigates decomposition within an agentic pipeline comprising separate decomposer, solver, and composer components. We quantify its additional inference cost and use human evaluation of intermediate sub-questions to examine downstream failure sources.

Evaluation of Agentic Systems. Evaluating LLM agents requires examining not only final accuracy but also intermediate behaviors, coordination efficiency, and computational cost. Benchmarks such as AgentBench [18] and GAIA [19] assess multi-step reasoning and tool-use capabilities, while recent studies highlight that coordination overhead and additional failure modes that can accompany multi-agent architectures [6]. These findings motivate controlled evaluations that isolate individual architectural choices rather than comparing complete systems with multiple confounding factors. Accordingly, we investigate decomposition as a reasoning policy under a controlled framework, fixing the database, schema representation, prompts, models, verification procedure, and evaluation protocol. Our work complements agentic frameworks developed using the same FHWA data [20] and protocol-mediated multi-agent architectures [21] by focusing on the independent contribution, computational overhead, and limitations of decomposition.

III. METHODOLOGY

A. Overview

This pilot study introduces a controlled experimental framework for investigating decomposition as a reasoning policy in agentic Text-to-SQL systems (Figure 1). Given a database and a natural-language question, the framework constructs question-specific schema context, generates SQL through direct generation or LLM-based manager-orchestrated decomposition, applies a shared verification procedure, and executes the resulting query.

The reasoning policy is the primary experimental variable. Direct generation serves as the baseline, while decomposition introduces additional stages for sub-question generation, solving, and SQL composition. To isolate the contribution of decomposition, all policies use the same database interface, schema representation, prompts, LLMs, verification procedure, and evaluation protocol.

B. Schema Construction

This study employs dynamic schema-context construction to provide question-specific database information for SQL generation. For each natural-language question, the schema module retrieves relevant tables, columns, and relationships to construct a schema context shared across all reasoning policies. This design ensures that both direct generation and decomposition-based approaches receive identical schema information, allowing performance difference to be attributed to the reasoning policy rather than variations in schema grounding.

C. Reasoning Policies

Direct generation is compared with manager-orchestrated decomposition under the same schema context, verification procedure, and execution pipeline. In this study, decomposition

Fig. 1: Overview of the controlled framework. All reasoning policies share identical database context and schema construction. The LLM-based manager routes queries to direct generation or an orchestrated decomposition workflow involving sub-question generation, solving, and SQL composition. All final queries are evaluated under the same verification and benchmark metrics (strict, normalized, and LLM-judge execution accuracies).

refers to the introduction of intermediate sub-question generation, sub-query solving, and SQL composition stages between the original question and the final SQL generation.

  • 1) Direct Generation: Direct generation serves as the baseline policy. A single agent maps the original question and its question-specific schema context directly to one SQL query without explicit intermediate decomposition. Schema interpretation, reasoning, and query synthesis are performed within a single generation step. The resulting query then passes through the shared verification and execution pipeline.
  • 2) Manager-Orchestrated Decomposition: The decomposition policy introduces an LLM-based manager that routes questions through a multi-stage workflow consisting of decomposition, solving, and composition. The decomposer generates intermediate sub-questions and their dependency relationships. Solver agents generate SQL queries for individual sub-questions, and a composer integrates these intermediate solutions into one final SQL query. The generated query then passes through the same verification and repair pipeline as direct generation. For composition retries, an optional stronger model is used. The initial composition attempt always uses the

same model as the decomposer and solver agents. The stronger model is invoked only when composed query is rejected and requires recomposition.

Three routing conditions are evaluated: direct, where all questions are solved without decomposition; selective decomposition, where the manager decomposes questions requiring two or more distinct computational stages; and forced decomposition, where the manager is instructed to decompose by default, reserving single-step plans for trivial lookups. The selective and forced policies use identical prompts except for the routing policy instructions. Although forced routing increases decomposition frequency, the manager still makes the final routing decision and may produce single-step plans. In practice, the two policies differ substantially as forced routing decomposes 72–97 of the 100 questions, compared with 10–36 under selective routing (Table I).

D. Verification and Execution

Generated SQL queries from all policies pass through the same SQL validation and repair procedure before execution. The validator checks SQL validity, executes the query, and provides execution feedback for up to two repair attempts. Decomposition-based policies additionally apply referencefree semantic checks to intermediate sub-questions and final query alignment. These checks do not access gold SQL or reference answers.

After validation and any necessary regeneration attempts, the final SQL query is executed against the database and evaluated using the shared benchmark protocol. Applying the same verification, repair, execution, and evaluation procedures across policies ensures that observed performance differences primarily reflect the reasoning strategy rather than variations in downstream processing.

E. Evaluation Protocol

The framework is evaluated using accuracy and efficiency metrics under a consistent scoring procedure across all reasoning policies. Gold SQL or reference answers are withheld from the generation and verification stages and only reserved for evaluation. The evaluation consists of execution-based correctness, judge-gated semantic recovery, and computational efficiency.

1) Execution Accuracy: Execution accuracy is the primary evaluation metric, measuring the percentage of questions for which the generated SQL produces the same result as the gold SQL when executed on the database. Result comparison is permutation-invariant, which ignores row ordering, tolerates column aliasing and column ordering differences, and allows an α% relative tolerance for numerical values. This pilot study reports two execution accuracy: i) Strict execution accuracy, EXstrict, uses column-name matching with 1% relative tolerance for numerical values; and ii) Normalized execution accuracy, EXnorm, applies the same comparison with value-based column matching with a 5% relative tolerance, accommodating difference in column aliases and ordering. Both metrics use deterministic result comparators. Questions

Accuracy (%)
Policy Base Retry Route ndec EXstrict EXnorm +Gated +All Judge Avg
D gpt-4o – – – 90 91 92 93 91.5
D gpt-4.1 – – – 83 89 89 89 86.0
D gpt-4.1-mini – – – 86 88 88 88 87.0
D gpt-4o-mini – – – 82 82 84 85 83.5
M gpt-4o – SD 36 85 87 88 89 87.0
M gpt-4o – FD 85 86 87 88 89 87.5
M gpt-4.1 gpt-4o SD 23 80 89 89 90 85.0
M gpt-4.1 gpt-4o FD 84 76 87 88 89 82.5
M gpt-4.1-mini gpt-4o SD 10 85 88 88 88 86.5
M gpt-4.1-mini gpt-4o FD 72 85 88 89 90 87.5
M gpt-4o-mini gpt-4.1-mini SD 79 79 80 82 85 82.0
M gpt-4o-mini gpt-4.1-mini FD 97 73 77 79 80 76.5

TABLE I: Accuracy on the 100-question NBI benchmark under dynamic schema construction. Policy: D = direct generation, M = LLM-based manager-orchestrated decomposition. Route: SD = selective decomposition, FD = forced decomposition. ndec reports the number of questions routed through decomposition. EXstrict is strict execution accuracy (1% numeric tolerance, columns matched by name); EXnorm applies the same comparison with value-based column matching and a 5% tolerance to account for column aliasing and reordering. Both are deterministic comparators. +Gated only adds judge rescues that the row judge confirms or the semantic judge attributes to a mechanical mismatch, while +All Judge adds every accepted rescue and so upper-bounds the judge contribution. Avg is the mean of EXstrict and +All Judge.

with non-executable gold SQL are excluded from evaluation across all policies because no valid reference result can be obtained.

  • 2) Judge-Gated Accuracy: Judge-gated accuracy extends execution accuracy by recovering cases that fail strict comparison but may be semantically equivalent to the gold answer. It applies two LLM-based rescue checks [22]: i) a result level judge, which compares the generated and gold result sets in the context of the natural-language question; and ii) an SQL judge, which assesses the semantic equivalence of the generated and gold queries. A failed case is recovered only when the result-level judge confirms that the generated results correctly answer the question, or when the SQL judge confirms query equivalence and the remaining differences fall into predefined categories, such as column ordering, additional projected columns, alias naming, value formatting or row ordering. Judge-based recovery applies only to cases that fail strict execution comparison and never overrides an executioncorrect prediction. Both measures are reported separately. To reduce self-agreement bias, the judge model is selected from a different model family than the SQL generator.
  • 3) Efficiency Measurement: Computational efficiency is evaluated using LLM call volume and end-to-end latency to quantify the computational overhead introduced by additional reasoning stages. Since verification, repair, execution, scoring, and cost accounting are consistent across all conditions, these metrics capture the computational trade-offs associated with each reasoning policy.

IV. EXPERIMENTAL RESULTS AND ANALYSIS

This section presents a pilot evaluation of decomposition under controlled reasoning policies. It compares direct generation with selective and forced decomposition, examining routing behavior, failure modes, computational cost, and preliminary cross-domain generalization.

A. Experimental Setup

  • 1) Benchmarks: The primary evaluation uses a benchmark derived from the FHWA's NBI. NBI provides a realistic testbed for analytical Text-to-SQL workloads, combining a large, normalized government database with domain-specific classification codes maintained in lookup tables, reflecting characteristics of enterprise databases. Furthermore, its specialized domain is relatively underrepresented in existing public Text-to-SQL benchmarks. The benchmark contains 100 hand-crafted natural-language questions with corresponding gold SQL queries over a six-table relational database, including BRIDGES (569,864 records) and INSPECTIONS (624,193 records). Questions were manually authored and verified by database experts, and the gold SQL queries and their execution results were checked for consistency. The questions are evenly distributed across five SQL difficulty levels, from singletable aggregation (L1) to window functions and common table expressions (L5). Appendix B provides detailed database statistics. Additional experiments on two BIRD databases, CAL-IFORNIA SCHOOLS (30 questions) and FINANCIAL (32 questions), provide cross-domain evaluation.
  • 2) Models and Policies: The NBI experiments evaluate four OpenAI models: GPT-4o, GPT-4.1, GPT-4.1 mini, and GPT-4o-mini [9], [23], with Claude Sonnet 4.6 serving as the judge for judge-gated accuracy. For BIRD, the model-family roles are reversed: Claude models [24], [25] generate SQL and OpenAI models serve as judges. All models are evaluated under three reasoning policies: direct generation, selective decomposition, and forced decomposition. Direct generation produces SQL directly from the question and schema, while

Strict execution accuracy on NBI by SQL difficulty level for each reasoning policy

Fig. 2: Strict execution accuracy, EXstrict, (%) on NBI by SQL difficulty level (20 questions per level; L1 is the simplest and L5 the most complex), with one panel per reasoning policy.

manager-orchestrated policies introduce decomposition, subquery solving, and composition stages.

  • 3) Evaluation Protocol: All policies use consistent databases, schema representations, prompts, and verification procedures. Performance is measured using execution accuracy and judge-gated accuracy, while efficiency is measured through LLM call volume and end-to-end latency. Statistical significance is evaluated using McNemar's exact test on paired strict execution accuracy with 95% confidence intervals reported for paired accuracy differences.
  • 4) Human Evaluation: Human evaluation examines the quality of sub-questions generated by forced decomposition. It covers 258 sub-questions from 82 decomposed queries, assessing their validity and relevance to the original questions. Detailed evaluation procedures and inter-annotator agreement statistics are provided in Appendix A.

B. Overall Comparison of Reasoning Policies

Table I compares direct generation with managerorchestrated decomposition under selective and forced routing. Direct generation achieves the strongest overall performance, with GPT-4o reaching 90% strict execution accuracy and 93% judge-gated accuracy.

  • 1) Limited Gains from Decomposition: Neither selective nor forced decomposition yields a statistically significant improvement over direct generation. Selective decomposition underperforms the direct baseline across all models. For GPT-4o, for example, strict accuracy decreases from 90% with direct generation to 85% with selective decomposition. Forced decomposition increases decomposition coverage but does not improve accuracy, with the best configurations reaching 86% strict accuracy. These findings suggest that additional reasoning stages do not consistently translate into better SQL generation under the evaluated conditions.
  • 2) Effects of Judge-Gated Evaluation: Judge-based evaluation recovers semantically equivalent outputs that fail strict

comparison, increasing accuracy by 2-4 percentage points across configurations. However, these recoveries do not change the relative ranking of reasoning policies, with direct generation remaining the strongest approach.

3) Model Capability Versus Additional Reasoning: Performance improvements are more consistently associated with stronger base models than additional decomposition stages. Direct generation improves from 82% accuracy with GPT-4omini to 90% with GPT-4o, whereas selective decomposition improves from 79% to 85%. These results suggest that, under the evaluated configurations, increasing model capability provides more consistent performance gains than introducing additional coordination stages.

C. Routing Behavior and Effectiveness

  • 1) Complexity-Aware Routing: Figure 3a shows that selective routing generally aligns with SQL difficulty. Stronger models concentrate decomposition on L4–L5 queries and rarely decompose simpler ones, whereas GPT-4o-mini applies decomposition more broadly. Decomposition is primarily assigned to structurally complex queries involving nested subqueries, window functions, and common table expressions. However, overall coverage remains limited, with only 10–36 questions decomposed depending on the model (Table I).
  • 2) Routing Effectiveness: Despite aligning decomposition strategies with query complexity, difficulty-aware routing does not consistently improve execution accuracy. Figure 2 shows relatively comparable performance across policies on L1– L3 (from 85% to 100%) but large differences emerge on more difficult queries (L4–L5). For GPT-4.1 mini, forced decomposition improves L5 accuracy from 60% to 65%, while selective decomposition reduces to 55%. However, overall accuracy remains slightly lower than direction generation (85% vs 86%). For GPT-4o, both decomposition strategies reduce L5 accuracy from 80% to 70% and overall accuracy from 90% to 85% and 86%, respectively. These results suggest that

Fig. 3: Decomposition routing by SQL difficulty level across models (20 questions per level). A question is counted as decomposed when its generated plan contains multiple sub-questions. (a) Selective routing. (b) Forced routing (decompose by default). Since routing remains model-driven, forced routing does not achieve full coverage, decomposing 72–97 of 100 questions depending on the model.

decomposition provides limited benefits on complex queries and does not consistently improve overall performance.

3) Limits of Complexity-Based Routing: Increasing decomposition coverage does not improve performance. Forced routing decomposes 72–97 questions depending on the model (Figure 3b; Table I), yet does not outperform direct generation. These results show that query complexity is insufficient to predict when decomposition will improve SQL generation. Effective routing must therefore consider the expected benefit of additional reasoning rather than relying only on complexity.

D. Reasoning Policy Complementarity

Table II compares direct generation and managerorchestrated decomposition at the question level using strict execution accuracy, highlighting recovered questions and newly introduced errors.

  • 1) Selective Decomposition: Selective decomposition shows strong agreement with direct generation. Both policies produce correct SQL for 84 questions and fail on the same 13 questions, agreeing on 97 of 100 questions. Decomposition recovers one additional question but introduces two new failures, providing limited complementary benefit.
  • 2) Forced Decomposition: Forced decomposition increases disagreement without improving overall accuracy. It corrects five questions incorrectly answered by direct generation, but introduces six failures on questions where direct generation succeeds, leaving the manager correct on 85 questions despite substantially increasing decomposition usage.
  • 3) Paired Question-Level Analysis: Since all policies are evaluated on the same questions, comparisons are paired at the question level. Most predictions are identical across policies (97% for selective routing and 89% for forced routing), with aggregate performance differences driven by the relatively few
Selective routing: 10 decomposed, all at level 4
Questions (n=100) Mgr correct Mgr wrong Total
Direct correct 84 2 86
Direct wrong 1 13 14
Total 85 15 100
Forced routing: 72 decomposed, GPT-4o composer retry
Questions (n=100) Mgr correct Mgr wrong Total
Direct correct 80 6 86
Direct wrong 5 9 14
Total 85 15 100

TABLE II: Per-question agreement between direct generation and manager policies on 100 questions with GPT-4.1-mini under strict execution accuracy for selective and forced decomposition. For forced routing, GPT-4o, a more capable model, is used to recompose the output if the initial attempt fails.

questions whose outcomes change. Overall, decomposition occasionally recovers failures from direct generation, but these gains are not consistently larger than the failures it introduces.

4) Statistical Significance: McNemar's exact tests indicate no significant difference between direct generation and either policy. For GPT-4.1 mini, selective and forced decomposition both reduce accuracy by 1 percentage point with (95% confidence interval of [−4.4, +2.4]) and ([−7.5, +5.5]) relative to direct generation, respectively. These intervals show that decomposition does not produce a large improvement in accuracy.

Overall, decomposition provides limited complementary benefits, with recovered failures offset by newly introduced errors.

E. Failure Analysis

This section examines whether decomposition failures originate from intermediate reasoning or downstream SQL generation and composition.

  • 1) Intermediate Decomposition Quality: Human evaluation indicates that invalid decomposition is not the primary source of errors. Across 258 generated sub-questions from 82 forceddecomposition questions, 96.9% were judged valid, and only 92.7% of decomposed questions contained valid sub-questions (Table V). This indicates that the manager generally produces meaningful intermediate tasks, although valid decomposition does not guarantee correct final SQL. Errors may still arise during intermediate query generation, integration, or scoping.
  • 2) Surface-Form Divergence: Some failures arise from output differences rather than semantic errors. The composition stage may introduce additional columns or alternative projections that fail the strict execution comparison. For example, a query asking "which states have an average bridge age older than the national average" returns an additional STATE CODE column. Although semantically equivalent, this result fails strict comparison and is recovered through judge-gated evaluation.
  • 3) Semantic Errors in Composition: Other failures involve incorrect global semantics that persist after judge evaluation. For example, a question requesting the top 15 states by bridge count together with rankings by average bridge age and total deck area requires rankings to be computed across all states before selecting. Instead, the manager computes rankings after filtering to the top 15 states, producing an incorrect result. Although the decomposition identifies the necessary sub-tasks, the composition stage fails to preserve global semantics.

Overall, these findings suggest that decomposition quality is not the primary bottleneck. The greater challenge lies in generating and composing intermediate SQL solutions while preserving global semantics.

F. Accuracy-Efficiency Trade-off

Table III compares inference cost across reasoning policies using GPT-4.1 mini. Direct generation requires one generation call per question with an average latency of 6.1 seconds. Selective and forced decomposition increase latency to 12.8 seconds (2.1×) and 20.3 seconds (3.3×), respectively, due to additional routing, sub-question generation, SQL generation, composition, and verification stages. However, the computational overhead does not yield consistent accuracy improvements, indicating an unfavorable accuracy-cost tradeoff under the evaluated settings. These results suggest applying decomposition selectively rather than as a default Text-to-SQL pipeline.

Configuration Latency vs. direct Gen. calls/ques.
Direct 6.1 s 1.0× 1
Manager (Selective) 12.8 s 2.1× ≥2 (+ decomp.)
Manager (Forced) 20.3 s 3.3× ∼N+2

TABLE III: Inference cost comparison on the NBI using GPT-4.1-mini.

G. Cross-Domain Generalization

To assess generalization, all three reasoning policies are evaluated on two BIRD databases, reversing the modelfamily roles by using Claude generators and an OpenAI judge. Table IV shows that NBI findings extend across additional database domains and model families. Direct generation with Claude Sonnet achieves the highest accuracy on both databases, while decomposition matches or underperforms its direct-generation baseline across all configurations. Model capability dominates routing policy: replacing Claude Haiku with Claude Sonnet under direct generation improves strict execution accuracy by 13.3 and 15.6 percentage points on the two databases, respectively, exceeding the gains associated with any routing change.

A stronger composer also improves decomposition performance: on CALIFORNIA SCHOOLS, using a stronger model for composition raises Claude Haiku's accuracy from 36.7% to 43.3%, although it remains below direct generation with Claude Sonnet. This suggests that additional model capability at the composition stage can partially mitigate decomposition errors, but does not eliminate the overall advantage of direct generation.

V. DISCUSSION

Decomposition and End-to-End Performance. Decomposition often produces valid sub-questions, but this does not guarantee correct intermediate SQL or final query composition. Additional reasoning stages introduce opportunities for errors that can offset the benefits. These findings highlight downstream SQL generation and composition as important challenges in agentic pipelines.

Conditional Benefits of Decomposition. The effectiveness of decomposition depends on model capability and query complexity. It may benefit weaker models on complex queries, while stronger models perform more consistently through direct generation. Cross-domain experiments also suggest that stronger composition capabilities can mitigate decomposition errors. However, decomposition offers no consistent advantage, as its effectiveness depends on the ability of models to solve and integrate intermediate tasks reliably.

Implications for Agentic Text-to-SQL Design. Decomposition should not be treated as a default component of agentic Text-to-SQL systems. Direct generation offers a more efficient approach when models can adequately handle queries, whereas decomposition may be useful when its expected benefits justify additional inference costs. Effective routing should consider not only query complexity but also the likelihood that additional reasoning improves the final result. Improving SQL composition and preserving global query semantics remain important directions for more reliable agentic systems.

VI. CONCLUSION

This work proposes a controlled experimental framework for evaluating manager-orchestrated decomposition as a reasoning policy in agentic Text-to-SQL and conducts a pilot

Execution accuracy (%)
Policy Base Retry Route ndec EXstrict EXjudge +Gated +All Judge Avg
CALIFORNIA SCHOOLS (30 questions)
D sonnet – – – 50.0 56.7 76.7 80.0 65.0
D haiku – – – 36.7 50.0 56.7 66.7 51.7
M sonnet – SD 6 43.3 50.0 73.3 73.3 58.3
M sonnet – FD 29 43.3 50.0 63.3 73.3 58.3
M haiku – SD 18 36.7 50.0 56.7 66.7 51.7
M haiku – FD 29 33.3 36.7 50.0 66.7 50.0
M haiku sonnet SD 18 43.3 50.0 60.0 63.3 53.3
M haiku sonnet FD 29 36.7 40.0 53.3 66.7 51.7
FINANCIAL (32 questions)
D sonnet – – – 62.5 68.8 68.8 78.1 70.3
D haiku – – – 46.9 53.1 59.4 62.5 54.7
M sonnet – SD 14 50.0 59.4 62.5 62.5 56.3
M sonnet – FD 32 53.1 59.4 59.4 65.6 59.4
M haiku – SD 20 37.5 43.8 46.9 56.2 46.9
M haiku – FD 32 37.5 46.9 46.9 56.2 46.9
M haiku sonnet SD 19 37.5 43.8 50.0 59.4 48.5
M haiku sonnet FD 32 37.5 40.6 40.6 56.2 46.9

TABLE IV: Cross-Domain Evaluation on BIRD. Generalization evaluation on two databases from the BIRD benchmark using Claude-based generators and an OpenAI judge. Policy: D = direct generation, M = manager-orchestrated decomposition. Retry indicates the stronger model used for composer retry when enabled; "–" indicates no retry. Route: SD = selective decomposition, FD = forced decomposition. ndec reports the number of questions routed through decomposition. EXstrict denotes strict execution accuracy; EXjudge, +Gated, and +All Judge report accuracy under increasingly permissive judge-based equivalence criteria.

study using this framework. This framework isolates the decomposition effects by holding the database interface, schema representation, verification procedure, and evaluation protocol fixed. Under the evaluated settings, decomposition does not significantly outperform direct generation, which achieves the highest execution accuracy (90% strict, 91% normalized, and 92% LLM-judge-gated), compared with 85% for selective and 86% for forced decomposition under strict execution accuracy. Although decomposition occasionally corrects errors made by direct generation, these gains are offset by newly introduced failures. Moreover, decomposition increases inference cost, resulting in a 2–3× increase in end-to-end latency without consistent accuracy improvements. Human evaluation indicates that intermediate sub-questions are generally valid, suggesting that downstream SQL generation and composition remain key sources of error. Additional experiments on BIRD provide preliminary support for these findings across database domains and model families. Overall, decomposition should be applied only when its expected benefits justify the computational cost and potential failure risks, motivating more effective routing and SQL composition strategies.

LIMITATIONS

This pilot study provides a controlled analysis of reasoning policies for agentic Text-to-SQL, but several limitations define the scope of the conclusions.

Benchmark Scope. The primary evaluation uses 100 naturallanguage questions over a relational database derived from the FHWA's NBI. Although the benchmark covers SQL patterns from simple aggregation to window functions and common table expressions, it does not represent the full diversity of enterprise-scale analytical workloads. Experiments on two BIRD databases provide additional cross-domain evidence, but broader evaluations are needed to establish generalizability.

Schema and Architecture Scope. The study maintains a consistent schema-context construction across reasoning policies to isolate the decomposition effect. However, larger databases may introduce additional challenges in schema retrieval, context selection, and grounding. It also evaluates only one manager-based framework, leaving alternative approaches, such as using decomposed questions as context for direct generation, unexplored.

Model Coverage. The experiments evaluate proprietary models from OpenAI (GPT-4o, GPT-4.1, and GPT-4.1 mini) and Anthropic (Claude Sonnet 4.6 and Claude Haiku 4.5). The findings may not generalize to open-weight models or Text-to-SQL-specialized systems, which may exhibit different capabilities and cost-performance characteristics.

Evaluation Limitations. Execution accuracy is the primary metric, supplemented by judge-gated evaluation for semantically equivalent outputs that fail strict comparison. However, execution against a single database instance cannot guarantee equivalence across all possible database states, and LLMbased judges may introduce additional evaluation uncertainty. Therefore, strict execution accuracy and judge-gated accuracy are reported separately.

Statistical Uncertainty. The benchmark contains 20 questions per SQL complexity category, with selective routing evaluated on smaller subsets. Despite paired evaluation on identical questions, the limited benchmark size reduces statistical power. The 95% confidence intervals for paired differences span approximately ±3–7 percentage points, limiting the ability to detect small effects. Thus, differences between configurations should be interpreted cautiously.

Computational Transparency and Model Accessibility. Because the evaluated models are accessed through commercial API's, their parameter counts and serving infrastructure are unavailable. We therefore report observable computational metrics, including API calls, latency, and model usage per pipeline stage.

ETHICAL CONSIDERATIONS

This work evaluates Text-to-SQL generation using publicly available datasets without personally identifiable information, including the FHWA's National Bridge Inventory and BIRD benchmarks. Human evaluation was limited to modelgenerated decomposition outputs, with no access to private databases or sensitive data. Experiments used commercial LLMs via API without transmitting confidential information. As generated SQL may contain errors, practical deployment should incorporate appropriate validation, particularly for high-impact applications. This work aims to advance reliability and responsible use of agentic Text-to-SQL systems.

ACKNOWLEDGMENTS

The authors acknowledge the Federal Highway Administration (FHWA) for providing public datasets that were essential to the testing and evaluation of this work.

REFERENCES

  • [1] Z. Hong, Z. Yuan, Q. Zhang, H. Chen, J. Dong, F. Huang, and X. Huang, "Next-generation database interfaces: A survey of LLM-based Text-to-SQL," IEEE Transactions on Knowledge and Data Engineering, vol. 37, no. 12, pp. 7328–7345, 2025.
  • [2] L. Shi, Z. Tang, N. Zhang, X. Zhang, and Z. Yang, "A survey on employing large language models for text-to-sql tasks," ACM Comput. Surv., vol. 58, no. 2, Sep. 2025.
  • [3] M. Pourreza and D. Rafiei, "DIN-SQL: Decomposed in-context learning of Text-to-SQL with self-correction," in Proceedings of the 37th Annual Conference on Neural Information Processing Systems. Neural Information Processing Systems Foundation, Inc. (NeurIPS), 2023, pp. 36 339–36 348.
  • [4] B. Wang, C. Ren, J. Yang, X. Liang, J. Bai, L. Chai, Z. Yan, Q.- W. Zhang, D. Yin, X. Sun, and Z. Li, "MAC-SQL: A multi-agent collaborative framework for Text-to-SQL," in Proceedings of the 31st International Conference on Computational Linguistics. Abu Dhabi, UAE: Association for Computational Linguistics, Jan. 2025, pp. 540– 557.
  • [5] M. Pourreza, H. Li, R. Sun, Y. Chung, S. Talaei, G. T. Kakkar, Y. Gan, A. Saberi, F. Ozcan, and S. Arik, "CHASE-SQL: Multipath reasoning and preference optimized candidate selection in Text-to-SQL," in Proceedings of the 13th International Conference on Learning Representations, 2025.
  • [6] M. Cemri, M. Z. Pan, S. Yang, L. A. Agrawal, B. Chopra, R. Tiwari, K. Keutzer, A. Parameswaran, D. Klein, K. Ramchandran, M. A. Zaharia, J. Gonzalez, and I. Stoica, "Why do multi-agent LLM systems fail?" in Proceedings of the 39th Annual Conference on Neural Information Processing Systems, 2025.
  • [7] Federal Highway Administration, "FHWA InfoTechnology portal," 2026, accessed: 2026-11-03. [Online]. Available: https://infotechnology .fhwa.dot.gov/

  • [8] J. Li, B. Hui, G. Qu, J. Yang, B. Li, B. Li, B. Wang, B. Qin, R. Geng, N. Huo, X. Zhou, C. Ma, G. Li, K. Chang, F. Huang, R. Cheng, and Y. Li, "Can LLM already serve as a database interface? a big bench for large-scale database grounded Text-to-SQLs," in Proceedings of the 37th Annual Conference on Neural Information Processing Systems, vol. 36. Curran Associates, Inc., 2023, pp. 42 330–42 357.

  • [9] OpenAI, "GPT-4o system card," https://openai.com/index/gpt-4o-syste m-card/, OpenAI, Aug. 2024, accessed: 2026-11-17.
  • [10] D. Gao, H. Wang, Y. Li, X. Sun, Y. Qian, B. Ding, and J. Zhou, "Text-to-SQL empowered by large language models: A benchmark evaluation," Proceedings of 2024 VLDB Endowment, vol. 17, no. 5, p. 1132–1145, Jan. 2024.
  • [11] H. Zhang, R. Cao, L. Chen, H. Xu, and K. Yu, "ACT-SQL: Incontext learning for Text-to-SQL with automatically-generated chain-ofthought," in Findings of the Association for Computational Linguistics: EMNLP 2023. Singapore: Association for Computational Linguistics, Dec. 2023, pp. 3501–3532.
  • [12] H. Li, J. Zhang, H. Liu, J. Fan, X. Zhang, J. Zhu, R. Wei, H. Pan, C. Li, and H. Chen, "CodeS: Towards building open-source language models for Text-to-SQL," Proceedings of ACM on Management of Data, vol. 2, no. 3, May 2024.
  • [13] J. Wei, X. Wang, D. Schuurmans, M. Bosma, b. ichter, F. Xia, E. Chi, Q. V. Le, and D. Zhou, "Chain-of-thought prompting elicits reasoning in large language models," in Proceedings of the 36th Annual Conference on Neural Information Processing Systems, vol. 35, 2022, pp. 24 824– 24 837.
  • [14] D. Zhou, N. Scharli, L. Hou, J. Wei, N. Scales, X. Wang, D. Schuurmans, ¨ C. Cui, O. Bousquet, Q. Le, and E. H. Chi, "Least-to-most prompting enables complex reasoning in large language models," in Proceedings of the 11th International Conference on Learning Representations, 2023.
  • [15] L. Wang, W. Xu, Y. Lan, Z. Hu, Y. Lan, R. K.-W. Lee, and E.-P. Lim, "Plan-and-solve prompting: Improving zero-shot chain-of-thought reasoning by large language models," in Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). Toronto, Canada: Association for Computational Linguistics, Jul. 2023, pp. 2609–2634.
  • [16] C.-Y. Tai, Z. Chen, T. Zhang, X. Deng, and H. Sun, "Exploring chain of thought style prompting for text-to-SQL," in Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Singapore: Association for Computational Linguistics, Dec. 2023, pp. 5376–5393.
  • [17] T. Yu, R. Zhang, K. Yang, M. Yasunaga, D. Wang, Z. Li, J. Ma, I. Li, Q. Yao, S. Roman, Z. Zhang, and D. Radev, "Spider: A largescale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task," in Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Brussels, Belgium: Association for Computational Linguistics, Oct.-Nov. 2018, pp. 3911–3921. [Online]. Available: https://aclanthology.org/D18-1425/
  • [18] X. Liu, H. Yu, H. Zhang, Y. Xu, X. Lei, H. Lai, Y. Gu, H. Ding, K. Men, K. Yang, S. Zhang, X. Deng, A. Zeng, Z. Du, C. Zhang, S. Shen, T. Zhang, Y. Su, H. Sun, M. Huang, Y. Dong, and J. Tang, "AgentBench: Evaluating LLMs as agents," in Proceedings of the 12th International Conference on Learning Representations, vol. 2024, 2024.
  • [19] G. Mialon, C. Fourrier, T. Wolf, Y. LeCun, and T. Scialom, "GAIA: A benchmark for general AI assistants," in Proceedings of the 12th International Conference on Learning Representations, vol. 2024, 2024, pp. 9025–9049.
  • [20] S. S. Gadiraju, D. Liao, and Z. He, "A conversational agent framework for multimodal knowledge retrieval: A case study in FHWA InfoHighway web portal queries," in Proceedings of the 1st Workshop for Research on Agent Language Models (REALM 2025). Vienna, Austria: Association for Computational Linguistics, Jul. 2025, pp. 250–258. [Online]. Available: https://aclanthology.org/2025.realm-1.17/
  • [21] C. C. Liao, D. Liao, and S. S. Gadiraju, "AgentMaster: A multiagent conversational framework using A2A and MCP protocols for multimodal information retrieval and analysis," in Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. Suzhou, China: Association for Computational Linguistics, Nov. 2025, pp. 52–72. [Online]. Available: https://aclanthology.org/2025.emnlp-demos.5/
  • [22] L. Zheng, W.-L. Chiang, Y. Sheng, S. Zhuang, Z. Wu, Y. Zhuang, Z. Lin, Z. Li, D. Li, E. Xing, H. Zhang, J. Gonzalez, and I. Stoica, "Judging llm-as-a-judge with mt-bench and chatbot arena," in Proceedings of the 37th Annual Conference on Neural Information Processing Systems, ser.

  • NIPS '23. Neural Information Processing Systems Foundation, Inc. (NeurIPS), 2023, pp. 46 595–46 623.

  • [23] OpenAI, "Introducing gpt-4.1 in the api," https://openai.com/index/gpt -4-1/, OpenAI, Apr. 2025, accessed: 2026-11-17.
  • [24] Anthropic, "Introducing the next generation of claude," https://www. anthropic.com/news/claude-3-family, Anthropic, Mar. 2024, accessed: 2026-11-17.
  • [25] ——, "Introducing claude 4," https://www.anthropic.com/news/claud e-4, Anthropic, May 2025, accessed: 2026-11-17.

APPENDIX A

HUMAN EVALUATION OF DECOMPOSITION QUALITY

Execution accuracy checks only the final SQL result, so it cannot show whether an error comes from decomposition or from later SQL generation. We therefore evaluated the generated sub-questions separately from SQL execution.

The evaluation uses a forced decomposition run with a GPT-4.1-mini decomposer, which decomposed 82 of 100 questions into 258 sub-questions. These 82 questions cover all difficulty levels. Annotators independently labeled each sub-question as valid or invalid. A sub-question was valid if it was relevant and logically correct step toward answering the original question, regardless of whether its SQL executed. Annotators agreed on 248 of 258 labels, and a third annotator resolved the remaining disagreements. Of the 258 sub-questions, 250 (96.9%) are judged valid, and 76 of the 82 questions (92.7%) contain valid sub-questions (Table V). The validity is greater than 94% at each difficulty level, and the six questions with an invalid step were spread over L2 - L5. Invalid decomposition is unlikely to be primary error source. However, valid subquestions may still be incomplete, misordered, or combined at the wrong scope during composition, leading to errors in final SQL composition.

APPENDIX B NBI BENCHMARK

Database. The database is derived from the U.S. Federal Highway administration's National Bridge Inventory. The original release is a single wide table, which we split into six related tables with 1,197,381 rows and 34 columns in total (Table VI). BRIDGES is the main table, INSPECTIONS records

Question Sub-question
Level n/N % n/N %
L1 Easy 5/5 100.0 12/12 100.0
L2 Moderate 16/18 88.9 48/51 94.1
L3 Intermediate 19/20 95.0 68/69 98.6
L4 Advanced 19/20 95.0 61/62 98.4
L5 Expert 17/19 89.5 61/64 95.3
All 76/82 92.7 250/258 96.9

TABLE V: Human evaluation of decomposition quality by difficulty level. Question: plans in which every sub-question was judged valid. Sub-question: individually valid sub-questions. n/N is count over total; % is the corresponding rate. Two annotators reached 96.1% raw agreement, with disagreements adjudicated by a third.

inspection events, and the other four are inspection tables linked by foriegn keys.

Questions. The benchmark questions were authored and verified by database experts. Each question was manually reviewed to verify alignment between the natural-language question, the intended analytical task, the gold SQL query, and the executed query results.

Coverage. The questions use all six tables and 32 of the 34 columns. BRIDGES appear in 96 queries, STATES appear in 43, INSPECTIONS in 23, OWNER AGENCIES in 9, FUNC-TIONAL CLASS in 4 and COUNTIES in 5.

Table Rows Cols Queries
BRIDGES 569,864 17 96
INSPECTIONS 624,193 7 23
COUNTIES 3,216 4 5
STATES 56 2 43
OWNER AGENCIES 40 2 9
FUNCTIONAL CLASS 12 2 6
Total 1,197,381 34 –

TABLE VI: NBI benchmark database. Queries is the number of the 100 gold queries referencing each table; a query may reference several.