Skip to main content
QUICK REVIEW

[Paper Review] Both Ends Count! Just How Good are LLM Agents at "Text-to-Big SQL"?

Germán T. Eizaguirre, Lars Tissen|arXiv (Cornell University)|Feb 25, 2026
Advanced Database Systems and QueriesComputer Science0 citations
TL;DR

The paper introduces a text-to-Big SQL benchmark with new metrics that jointly evaluate SQL generation, agent interaction latency, and end-to-end cost in Big Data environments, using zero-shot LLM agents and Spark SQL to study execution-time and cost trade-offs at scale.

ABSTRACT

Text-to-SQL and Big Data are both extensively benchmarked fields, yet there is limited research that evaluates them jointly. In the real world, Text-to-SQL systems are often embedded with Big Data workflows, such as large-scale data processing or interactive data analytics. We refer to this as "Text-to-Big SQL". However, existing text-to-SQL benchmarks remain narrowly scoped and overlook the cost and performance implications that arise at scale. For instance, translation errors that are minor on small datasets lead to substantial cost and latency overheads as data scales, a relevant issue completely ignored by text-to-SQL metrics. In this paper, we overcome this overlooked challenge by introducing novel and representative metrics for evaluating Text-to-Big SQL. Our study focuses on production-level LLM agents, a database-agnostic system adaptable to diverse user needs. Via an extensive evaluation of frontier models, we show that text-to-SQL metrics are insufficient for Big Data. In contrast, our proposed text-to-Big SQL metrics accurately reflect execution efficiency, cost, and the impact of data scale. Furthermore, we provide LLM-specific insights, including fine-grained, cross-model comparisons of latency and cost.

Motivation & Objective

  • Motivate the need for evaluating text-to-SQL in Big Data contexts where execution cost and data scale matter.
  • Propose new metrics that jointly capture SQL correctness, agent reasoning latency, and end-to-end cost.
  • Evaluate frontier LLMs in a ReAct-style agent to understand latency and cost dynamics across stages (Thought, Action, Observation).
  • Examine how data scale affects performance and cost, guiding scalable text-to-Big SQL research.

Proposed method

  • Propose a novel evaluation framework (text-to-Big SQL) that extends VES with column-level precision and end-to-end time considerations.
  • Introduce VES*, a metric combining end-to-end time, partial correctness (via P(S, S_hat)), and output validity.
  • Introduce VCES, a cost-aware derivative of VES* that incorporates per-token pricing and execution cost.
  • Define CVQ as the expected cost per valid query under a retry-until-success model.
  • Implement a ReAct-style agent controlling a controller (LLM) and an executor (Spark-based tools) to perform text-to-Big SQL tasks.
  • Use Spark SQL as the downstream engine and four zero-shot tools (list_tables, get_schema, check_query, run_query) to interact with data catalogs and execute queries.

Experimental results

Research questions

  • RQ1How do traditional text-to-SQL metrics fail to capture the realities of Big Data execution and cost?
  • RQ2Can new metrics (VES*, VCES, CVQ) better reflect end-to-end performance and cost in text-to-Big SQL?
  • RQ3How do latency, cost, and accuracy trade-offs manifest across frontier LLMs in a ReAct-style agent within Big Data workloads?
  • RQ4How does data scale influence the effectiveness and risk (cost, latency) of generated queries?
  • RQ5What design choices in agent-tool orchestration impact practical interactive analytics performance?

Key findings

  • Text-to-SQL accuracy alone is insufficient to discriminate models in Big Data settings; execution cost and latency vary meaningfully across models with similar accuracy.
  • VES* provides stronger discrimination than VES by accounting for both partial correctness (via column precision) and end-to-end time, highlighting latency-cost trade-offs among models.
  • VCES aligns with cost-aware model ranking, showing that fast-but-expensive models and slower-but-cheaper models trade off differently across stages and data scales.
  • Data scale amplifies the cost of incorrect queries; CVQ captures the increasing risk of cost when accuracy deteriorates at larger scale factors.
  • GPT-4o often achieves top execution speed but may have lower cost-efficiency than cheaper models like Gemini 3 Flash, illustrating latency-cost trade-offs.
  • Per-stage analysis reveals that the check_query stage dominates end-to-end time, suggesting opportunities for stage-specific model allocations and optimizations.
  • At small scales, agent interaction dominates latency; at large scales, actual query execution becomes the bottleneck, underscoring the need for scale-aware optimization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.