What agent traces do not record
An AI data agent answers a question about data in steps. A step is one short program, for example one that reads a table and counts its rows. In each step, the AI model writes the program, and other software, the harness, runs it and records the program and its result. The record of all the steps for one question is the trace.
Researchers compare AI models by counting the mistakes recorded in their traces. I checked whether each recorded mistake was really the model's.
- Data: the published traces of two test suites for data agents, DataAgentBench and DABstep: 273,090 steps.
- How I found it: while counting how often agents ask for data that does not exist, I found steps that the trace recorded as working although the program asked for a field that the data did not have. For example, a program read the field payment_types, which the data did not contain. The agent library, smolagents, silently swapped a missing field for the most similar one, here account_type, so the trace showed a working step that computed on a field the model never asked for.
- Why it matters: if the harness causes a mistake and the trace blames the model, the ranking of models is wrong, and developers change the model or the prompt instead of fixing the harness.
In DataAgentBench, the harness caused 36.8% of the failed steps that the traces show as the model's (16,293 of 44,277).
- The models wrote valid Python, for example print("\n".join(rows)).
- The harness put the code inside a text string before it ran it. Python turned the \n into a real line break, so the step failed with SyntaxError: unterminated string literal.
- The trace showed the model's valid code next to that error.
- Ranked by failed steps per run (fewest first), gpt-5.1 is second with these failures and fourth without them.
My checker stopped almost every program that named a missing file or column, but the share of correct answers rose only a little.
- Test: QRData, 411 data-analysis questions, each run 10 times, with two models.
- gpt-oss:120b: these mistakes fell from 3,316 to 2. Correct answers rose from 55.9% to 57.3%.
- gemma4:31b: these mistakes fell from 343 to 0. Correct answers did not change measurably.
- A plain error message that lists the files and columns that exist helped about as much as the checker. The difference between the two was too small to measure.
The main finding was a deliberate design choice, and the general idea was already published.
- Deliberate: DataAgentBench's prompt says the code "will be quoted by triple double-quotes and passed as a string", and its authors confirmed this is on purpose. The prompt does not say that \n becomes a line break.
- Already published: at least seven studies from 2026 show that changing the harness changes agents' scores and rankings.
What I keep — smolagents (A popular agent library)
- It quietly replaces a variable name that does not exist with a similar one, and the trace says the step worked.
- All 11 versions I tested, from 1.0.0 to 1.26.0, do this.
- Why it is worse than the DataAgentBench (DAB) problem: In DAB, the step fails and the trace shows the error. Here, nothing fails, so a wrong answer looks right.
- It affects any agent built with the library, not one test suite.
My research
I study which changes to AI-powered data systems make their answers complete and up to date, or clear about what they lack, and at what cost.
In plain words: when an AI agent answers a question from data, I study how the system can make the answer say when it is incomplete or out of date, and what that costs.
Three parts of the question
Does the answer say which data it covered, including rows the user may not see?
Studied in my hidden-rows study, September 2026 (Open problems tab).Does the record of how an answer was made show what actually ran?
Studied in the paper I stopped (Summary tab).Which answers already given become wrong when data, definitions or access rules change?
Planned; no result yet.Scope and Change ask the same question about two versions of the data: all rows against the rows the user sees, and today's data against the data the answer used. Both can be decided by comparing the rows an answer read with the rows that differ. Evidence supplies the record of what each answer read. In all three, the fact that decides whether an answer is right is outside the model, so the system must supply it.
Open problems I am exploring
Hidden rows (Scope)
An AI model cannot tell whether rows the user may not see change its answer. The database system can, but telling the user can reveal those rows.
Details below.Records that hide what ran (Evidence)
A trace does not show what the harness changed, so a reader cannot tell who caused a failure.
Measured in the paper I stopped: the harness caused 36.8% of DataAgentBench's failed steps.Answers that go out of date (Change)
I found no system that re-checks answers already given when data, definitions or access rules change.
Planned; no result yet.
Focus: what I found and tested
- The evidence: in my hidden-rows study, on five BIRD databases under PostgreSQL row-level security, three cheaper models gave partial answers as complete in 70% to 95% of the cases where hidden rows changed the answer.
- Why the model cannot solve it alone: it sees only the visible rows. On a 40-pair sample, Claude Opus never hid a partial answer, but it doubted 8 of 16 complete answers.
| Property | Check A | Check B |
|---|---|---|
| Uses | The SQL query and the access rule, never the hidden rows | The query, run on all rows |
| Mistakes | Labelled 633 of 1,419 complete answers (45%) as possibly incomplete | None: always right about whether the hidden rows change the result |
| Reveals | Nothing about the hidden rows | A script that read only its yes-or-no output recovered hidden totals in 17 to 23 queries each, such as the bank's 4,500 accounts when the user sees 778 |
A possible solution: checks between A and B that write the scope into the final answer, for example "778 accounts in your region; other regions are hidden". They would be measured by two costs: complete answers labelled incomplete, and how much a script can learn about the hidden rows.
How this differs from related ideas
| Idea | What it does | What is different here |
|---|---|---|
| Non-Truman access controlRizvi et al., 2004 | Rejects a SQL query when hidden rows could change its result, so the user gets no answer. | The agent still answers, and the answer states its scope. |
| Query auditingKenthapadi et al., 2005 | Answers or refuses each query so that no private value can be worked out, and proves that a refusal computed from the hidden data leaks. | The decision is a scope label on the agent's final answer, which can combine several queries. The same leak applies, so it is measured. |
| Differential privacy | Adds random noise to answers to limit what anyone can learn about one record. | The answer for the visible rows must stay exact. Noise could be added to the scope label only, as one possible check between A and B. |
| Access-control checks for text-to-SQLFei et al., 2026 | Tests whether the generated SQL stays inside the data a role may read. | The SQL is allowed; the question is whether the answer says that it is partial. |
| Model abstentionTraining a model to say "I don't know" | Changes how the model writes. | The fact that decides the answer is in the hidden rows, which the model cannot see. |
| Partial Evidence BenchTallam, 2026 | Measures the same failure for documents. | The data are in databases, and what the scope label reveals is measured. |
Evidence
How each number on the Summary was measured. "pts" is the gap between two percentages: 55.9% to 57.3% is +1.4 pts; "CI" is the 95% confidence interval. Sources: paper draft (13 Oct 2026), experiment log (1 Nov 2026), hidden-rows study (26 Sep 2026).
Four harness effects
in the published traces of DataAgentBench and DABstep · 2 of 4 inferred| # | Effect | What the harness does | Size in the traces |
|---|---|---|---|
| 1 | String embeddingDataAgentBench · source code | Puts the code in a string, so Python decodes \n first | 21.6% of Python steps fail |
| 2 | Dropped variables6 DABstep submissions · inferred | Appears to run each step in a fresh process | 6,799 failed steps |
| 3 | Replaced keyssmolagents 1.0–1.4 · inferred | Returns the most similar key for a missing one | 23 reads logged as working |
| 4 | Cut resultsDataAgentBench · source code | Returns at most 5 MongoDB documents, no marker | 85.9% of 6,306 rerun queries cut |
Experiments
all pre-registered except the probes and the note check| Experiment | Set-up | Result | Verdict |
|---|---|---|---|
| Rerun, gpt-oss:120b | 54 tasks × 10 runs, released vs fixed harness | Syntax errors 23.7% → 0%. Accuracy −1.0 pts (CI −5.7 to +3.4) | fix works |
| Rerun, gpt-5-mini | 54 tasks × 5 runs, same two harnesses | Syntax errors 26.8% → 0%. Accuracy 44.7% → 35.1% (CI −14.2 to −5.1) | unexplained |
| 2×2 rerun, gpt-5-mini | Code fix vs the prompt sentence it changed | Stopped at 212 runs, 1 of 5 rounds: API credit ran out | not finished |
| Checker vs error message | QRData, 411 questions × 10 runs, 2 models | Checker +0.68 pts, message +1.00 pts. Difference −0.32 (CI −0.84 to +0.19) | same as message |
| Harness probes | 6 small programs × 5 harnesses | smolagents 1.0.0–1.26.0 swaps undefined names. LangChain, AutoGen: as Python | new finding |
| Hidden-rows study | BIRD, 5 databases, 131 affected questions, 3 models | Partial answers shown as complete: 70–95%. Opus (40 pairs): 0 of 16, but doubted 8 of 16 complete | open problem |
My notes
Background
Currently, people use natural language to interact with the data e.g. databases, instead of manually writing SQL queries. In research, we have benchmarks to score and rank models. Models can only generate code/text; however, to execute/run, we build software (harness) around the models. Therefore, we build an agent: model + harness. A record of each run or execution (the trace) is kept so we can review the performances of the models, and we tend not to review that of the agent (because there could be different model + harness combinations).
Problem
When there is a mistake made, for example, an agent can search for nonexistent data in a database, we tend to attribute that failure/mistake to the model. This led me to check how often this happens by looking at the traces. I discovered that the model tends to be blamed for failures also caused by the harness i.e. the software put around the model.
Finding
In one of the benchmarks for measuring how agents perform when interacting with databases (DataAgentBench), the authors built a harness that surrounded the code generated by the model with triple quotes. This actually caused some of the generated code to fail and flagged the model's performance. I asked them and they said they did it on purpose because they believed the model should be smart enough to solve that string literal issue.
What I tried doing
I tried building a simple solution (a checker) that we can put between the model and the harness. Its role is to statically check if a file or column does not exist in a data record e.g. a CSV file or folder, and it notifies the model with the ones available/present, so the model can make the right choices.
The result
This improved one model's accuracy, but not by much, because even without it, most models will spend an extra step retrieving the available records and then making the right decision. Also, just having a clearer error message that stated what was present and absent even did a good job.
Conclusion
This forced me to stop the research because:
- since the choice made by the authors was deliberate, there was no need to challenge it.
- there were at least 7 other papers released this year that claimed the same thing I did i.e. ‘harnesses can affect the result’.