arXiv:2610.09286cs.DBOct 2026

Manuscript Offprint

arXiv:2610.09286

No Trace, No Claim: Two Contracts for Database Agents

Xiaofei Zhang

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

Abstract

LLM agents can generate database operations and explain their results, but current interfaces often leave a gap between the generated plan, the conditions under which its results were produced, and the claims presented to a user. We argue that agent-facing data systems need two enforceable contracts. A plan contract defines what an agent may execute and reference, while an evidence contract records the belief state, completeness, and provenance under which a result supports a claim.

We instantiate these contracts in TGMS, a bi-temporal graph system in which an LLM plans over a fixed temporal operator interface. A static verifier checks plans before execution, and a claim verifier checks typed claims against content-addressed traces. Live model runs exposed two failures missed by input-only schemas and value-only grounding: models referenced nonexistent result fields and reported page-local counts as complete-result counts. Result-field checking turns the first into a repairable rejection. Completeness propagation detects the second in all 15 controlled cases and misses all 15 when disabled.

On the frozen CollegeMsg workload, TGMS reaches 0.408 typed-answer accuracy, compared with 0.064–0.284 for the evaluated baselines. On Bitcoin-OTC, direct SQL over the same bi-temporal store matches TGMS, showing that the fixed operator interface does not provide a universal accuracy advantage. On correction probes, TGMS and bi-temporal SQL answer historical-belief questions, while latest-state baselines cannot. Before claim gating, 21 of 220 emitted answers contain an unsupported gated claim; after gating, none of the 199 emitted answers does, at the cost of 21 fewer answers. These results show that the plan contract makes invalid plans rejectable and execution reproducible under recorded conditions, while the evidence contract makes gated claims faithful to their cited evidence. Neither contract guarantees correct interpretation of user intent.

1 Two failures, one missing layer

LLM agents are becoming an important class of database client. Recent work studies agent-first architectures, LLM query planners, and semantic operator pipelines [4, 12, 13]. Much of this work asks how to obtain useful plans and execute agent workloads efficiently. We study a complementary question: what must a data system record and enforce so that both an agent's execution and its resulting claims remain checkable? Two incidents from the development of TGMS [18], a bi-temporal graph system, frame the problem.

Example A: the belief state. On March 1, the database records that account a first contacted account b on February 9. On March 10, an ingest error is discovered, and the recorded contact time is corrected. An auditor later asks, “What did the system believe on March 1?” A latest-state store cannot answer this question after the correction. The limitation is not the expressiveness of SQL or Cypher. The earlier version was discarded when the record was overwritten. A system that must reproduce past decisions therefore needs to preserve the belief state under which each computation ran.

Example B: the truncated page. A reachability operator returns its default page: 100 rows from a 343-row result. The metadata records rows_total=343 and truncated=true, but the 14B Qwen model ignores both fields. It correctly counts the 100 returned rows and reports “100 reachable accounts.” The count is correct for the returned page but false as a claim about the complete database result. Value grounding alone cannot detect this error because the reported entities and the derived count are consistent with the visible page. The failure arises from ignoring a condition attached to the result: the page is incomplete.

The missing layer. These incidents expose two missing controls in the agent-database interface. Input schemas describe what may enter an operation, but they do not constrain how a generated plan reads the result (§3). Query results expose values, but they do not always expose belief state, completeness, and provenance in a form that downstream checking must respect. We therefore place one contract before execution and another after execution.

Position. Agent-facing data systems need two enforceable contracts. A plan contract defines the registered operations, legal references, typed arguments and result fields, grounded identifiers, and resource limits. An evidence contract records result identity, belief state, completeness, approximation status, and provenance. The first governs admissible execution. The second makes claim support auditable.

The contracts therefore cannot be enforced solely at the agent or prompting layer. The data system determines which belief state was read, whether a result is complete, and which operator produced it. It must record these execution conditions and expose them in a machine-checkable form. Middleware can use this information to validate plans and claims, but it cannot recover a belief state that the database discarded or infer completeness and provenance that the database never reported.

This paper makes three contributions. First, we define the plan and evidence contracts and state their guarantee envelope ( §2§2). Second, we instantiate them in TGMS, a bi-temporal property-graph system with a fixed operator interface, deterministic execution, and trace-checked answers ( §3§3). Third, we evaluate the design on frozen workloads, mechanism ablations, a same-information SQL baseline, and independently written questions ( §4§4). The bi-temporal graph setting stresses both contracts because plans compose several

Xiaofei Zhang

Table 1: Guarantee envelope of the two contracts.

FailureContract checkEnsuresDoes not ensure
Invalid result-field referenceResult schemaRejected before executionIntended operator choice
Ungrounded identifierGrounding ruleRejected before executionCorrect entity resolution
Complete-result claim over incomplete evidenceCompleteness propagationCannot be certified as completeComplete result enumeration
Unrecorded or mismatched execution stateExecution-state recordExecuted state is identifiable and checkableIntended state selection
Claim not entailed by cited resultsClaim verificationWithheld or marked unsupportedCorrectness of unchecked claim types

operations, records may be corrected, and partial results can change the meaning of an answer.