arXiv:2608.26036cs.AIAug 2026

Manuscript Offprint

arXiv:2608.26036

Trace Integrity for LLM Data Agents: A Vision for Auditable Structured Reasoning in Real-World Systems

Srimonti Dutta, Akshata Kishore Moharir

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

Abstract

Answer accuracy is an insufficient reliability signal for LLM data agents. In structured-data tasks, a benchmark-correct answer can be produced by an invalid trace. This paper introduces Trace Integrity, a deployment reliability criterion for evaluating whether the computation recorded behind an answer is explicit, executable, schema-valid, operator-faithful, replayable, answer-consistent, and auditable. We identify the Structure Gap as the deployment failure mode that makes Trace Integrity necessary: natural-language reasoning and free-form rationales do not reliably specify the operator-level programs required by real-world systems. We operationalize Trace Integrity with execution contracts, structured artifacts that bind user intent to schema elements, operator plans, assumptions, executable queries, verification status, and final-answer linkage. We also introduce CAIT (Correct Answer / Invalid Trace) Rate, which measures how often answer-only evaluation counts computationally unsupported outputs as successes. In an empirical demonstration on BIRD Mini-Dev, Direct SQL, Operation Summary + SQL, and Contract-First SQL achieve answer accuracies of 20%, 22%, and 24%, while their Trace Integrity Pass Rates are 39%, 43%, and 40% and their CAIT Rates remain high at 55%, 59.1%, and 45.8%, showing that answer accuracy, trace validity, and silent-failure risk are distinct evaluation signals. Real-world LLM data agents should, therefore, be evaluated not only by whether their outputs match a reference answer, but by whether those outputs are backed by auditable computation.

1 Introduction

LLM data agents are becoming interfaces to operational data. They inspect schemas, generate SQL, call tools, execute queries, summarize results, and present conclusions to analysts, operators, clinicians, auditors, and customers. This makes databases, spreadsheets, logs, records, and enterprise analytics systems easier to query, but it also changes the reliability problem. The question is no longer only whether the system returns the expected value. A data agent may return a plausible or benchmark-correct answer while the computation behind that answer applies the wrong filter, join, aggregation, time window, grouping key, or schema binding.

Consider a business analyst asking, Which region had the highest average revenue per active customer last quarter, excluding trial accounts? A system can return a confident region name while silently computing total revenue instead of average revenue, including trial accounts, grouping by sales office rather than customer region, using a calendar quarter instead of the fiscal quarter, or joining customer and revenue records on a brittle name field rather than a stable identifier. Answer-only evaluation cannot distinguish a faithful computation from an accidental success. A deployment team needs to know not only what answer was produced, but what computation was actually performed.

This is a deployment problem, not only a benchmark problem. In operational workflows, the answer is often consumed by someone who cannot reconstruct the query: a BI user, compliance reviewer, data engineer, or domain expert. These users do not need only a fluent explanation, but need an inspectable artifact showing which schema elements, filters, joins, aggregations, assumptions, and execution results support the answer.

This paper argues that real-world LLM data agents need a reliability criterion that treats the computation trace as a first-class object. We call this criterion Trace Integrity. A trace has integrity when the recorded computation behind an answer is explicit, executable, schema-valid, operator-faithful, replayable, answer-consistent, and auditable. The claim is deliberately narrower than general trustworthiness. Trace Integrity does not certify that the underlying data are complete, fair, or appropriate for a downstream decision. It addresses a specific deployment risk: answer correctness is not sufficient evidence that the system performed the computation requested by the user.

The need for trace-level evaluation follows from a broader Structure Gap. Language models express reasoning as token sequences, while structured-data tasks require operator-level programs with well-defined semantics. A valid answer may depend on projection, filtering, joining, grouping, aggregation, sorting, ranking, temporal constraints, and schema binding. Text-to-SQL and table-reasoning benchmarks expose this pressure because success depends on mapping a natural-language request to an executable computation, not merely producing a plausible explanation (Zhong et al., 2017; Yu et al., 2018; Pasupat and Liang, 2015; Chen et al., 2019, 2020). Recent LLM-driven Text-to-SQL systems further show this problem matters in business intelligence and inventory-management settings, where natural-language access to operational databases is important as non-specialists need to query structured data (Zhu et al., 2023).

Existing methods address adjacent parts of the problem but do not make Trace Integrity a first-class evaluation target. Chain-of-thought prompting can elicit intermediate text, but natural-language rationales are not executable and may not faithfully describe the computation that produced the answer (Wei et al., 2022; Kojima et al., 2022; Lanham et al., 2023). Program-aided and tool-using methods improve task performance by delegating computation to external systems (Gao et al., 2023; Chen et al., 2023; Yao et al., 2023; Schick et al., 2023), yet execution alone does not show if the generated program matches the user's intended computation. An SQL query can run successfully and still answer the wrong question.

The central hidden-failure case is a correct answer with an invalid trace. Such an output receives credit under answer-only evaluation, yet it is not a reliable data-agent response because the recorded computation does not support the answer. We call this case Correct Answer / Invalid Trace and measure it with CAIT Rate. CAIT asks: among the answers a system gets right, what fraction are backed by invalid computations? A high CAIT Rate means that answer-only evaluation is counting computationally unsupported outputs as successes.

This work develops the vocabulary, artifact, and measurement protocol for that hidden quadrant. The Structure Gap names the deployment failure mode in which natural-language reasoning fails to specify operator-level computation, Trace Integrity gives the reliability criterion, execution contracts make the criterion operational, the Isolation Principle provides a default planning discipline, and CAIT Rate turns correct-answer/invalid-trace failures into a metric that can be reported across systems and datasets.

We include a proof-of-concept to show that this deployment risk appears in measurable system behavior. On 100 BIRD Mini-Dev examples, we compare Direct SQL, Operation Summary + SQL, and Contract-First SQL. The three methods achieve answer accuracies of 20.0%, 22.0%, and 24.0%, while their Trace Integrity Pass Rates are 39.0%, 43.0%, and 40.0%. Their CAIT Rates remain high at 55.0%, 59.1%, and 45.8%. These results show that answer accuracy, trace validity, and silent-failure risk are distinct signals that deployment teams should monitor together. The intended contribution is a practical evaluation frame for LLM data agents: if LLM data agents are to serve as reliable interfaces to operational data, they should be evaluated not only by what answer they return, but by whether the computation behind that answer can be inspected, replayed, and trusted.