Improve AI Agent Accuracy With Notes From Its Wrong Answers: Docs Scored 36%, Four Notes 76%
On 42 held-out questions, a Claude Haiku 5.5 data agent scored 36% with its company's docs and 76% with four short notes written from its own wrong answers. Write one rule per kind of mistake, and keep it only if it helps on questions it never saw.
A Claude Haiku 5.5 data agent faced 42 questions it had never seen. With only the database tables, it got 40% of its tries right. With the company's docs added, it got 36%.
With four short notes written from its own earlier wrong answers, it got 76%.
Those are the held-out results Contextflo published on its benchmark page in November 2026.
To improve AI agent accuracy, Contextflo's test points to a simple loop: read the agent's wrong answers, write one short rule for each kind of mistake, and keep a rule only if it helps on questions it was never written from. Company docs cut this agent's cost but did not raise its accuracy.
Reference docs tell an agent what your data is. They rarely say how your team answers questions about it.
The gap matters for whatever you have given an agent to read: a CLAUDE.md, a skill, a support bot's knowledge base, or a data agent's company docs. The instinct is to add more of it. This test suggests the next thing worth adding is smaller.
It also has to be tested like code.
How Contextflo tested docs against notes
The data came from DABstep, a benchmark built by Adyen and Hugging Face. It describes a fake payments company with realistic mess.
Contextflo's page lists 138,236 card payments, a 1,000-row price list and 30 shops, and the benchmark comes with a manual. The authors wrote that manual to distill "essential business knowledge".
The questions are hard.
When DABstep launched, the best agent scored 16% on its hard set.
Contextflo, a company that sells a tool for connecting AI agents to business data, ran the same agent three ways.
First it explored with 25 hard questions. It read the wrong answers and wrote four notes. Then it froze the notes, docs, instructions and scoring rules, and ran 42 new questions. Each got three tries.
Table: Held-out results, 42 new questions, 3 tries each
| What the agent had | Questions right on all 3 tries | Tries right | Model cost per try |
|---|---|---|---|
| Only the tables | 13 of 42 | 50 of 126 (40%) | about 5 cents |
| Tables and the company's docs | 9 of 42 | 45 of 126 (36%) | about 1.6 cents |
| Tables, docs and four notes | 31 of 42 | 96 of 126 (76%) | about 1.3 cents |
Source: Contextflo, DABstep Haiku benchmark. The docs changed the cost; the notes changed the accuracy.
Most of that gain came on familiar kinds of question. Contextflo's breakdown shows it. Ten of the 14 held-out question types had also come up in exploration. On those 30 questions, tries right rose from 26% to 70%. On the 12 questions of unseen types, they rose from 75% to 92%. Contextflo says it plainly: "Most of the gain is on the familiar types."
Every one of those numbers depends on grading. DABstep keeps its answers secret, so Contextflo built its own answer sheet from the public scoreboard. Its first headline number for exploration was 77%. That was too generous. The sheet had accepted -9.4166 where the official answer is -9.42, and the official scoring marks that wrong.
After re-checking every try against the public scoreboard, the exploration headline fell to 63%. The gain from the notes still held: docs alone got 16%, and all four notes got 63%.
Some held-out tries could only be graded against the rebuilt sheet: 12 with only the tables, 19 with docs and 2 with notes, out of 126 each. Count every one of those as wrong for the notes and right for the other two setups. The notes still have at least 94 of 126 right. Tables alone would have at most 62, and docs at most 64.
The result holds.
Why didn't the company docs help?
The docs described the data well. According to Contextflo, they covered what the five tables and most of their columns mean, plus seven business rules from the manual.
With them, the agent stopped running query after query to guess what a column held, so its model cost fell from about 5 cents a try to about 1.6.
Knowing what a column means did not tell it how to answer.
Contextflo puts it this way: with docs the agent "stops guessing what the data is. But it still doesn't know how the business uses it."
A note fills that gap. Contextflo wrote each of the four by reading a wrong answer and asking one question: "what would a teammate have told it?"
What a note written from a wrong answer looks like
The notes are short.
Here is each rule in the benchmark page's own words, trimmed to the rule itself:
1. A blank in a price row means "any". A blank card type means any card, not no card.
2. One payment can match several rows of the price list, and it pays all of them.
3. "Month" means January, February and so on, not the last 30 days,
and you count money, not number of payments.
4. For questions like "if we moved shoppers to another way of paying,
which is cheapest", work it out over the shop's actual payments,
one option at a time.
Two of them say something the docs never said, and the other two clarify a rule the docs already had.
Note 1 is one of the clarifications. The manual explained that a null price field means "any". But the price list also uses empty lists [], and the agent read those as "doesn't apply".
The agent had the rule and still got the answer wrong.
Note 2 was new. Without it, the agent found one matching price row. Then it stopped. A restaurant does the same when it adds the service charge to a bill and forgets the large-group charge that also applies.
In the exploration round, that one note moved accuracy from 31% to 59%, and runs got about 40% faster because the agent stopped going in circles.
Can a correct note make the agent worse?
A correct note can do harm. Note 2 shows how. The note is right for nearly every question in the set. It is wrong for questions about the most expensive option in general.
Before it was added, the agent answered "the most expensive way to pay for a €10 GlobalCard payment" correctly on all three tries.
After it, the agent got it right zero times.
The work log shows why. The agent worked out the right answer, then changed it to follow the note.
Contextflo draws the lesson in one line: "Agents trust what you tell them more than their own reasoning."
The held-out test repeated it. Four questions asked for the most expensive option "in general". The notes made two of them worse, each from 2 of 3 tries right to 0 of 3.
A rule that is true most of the time does damage in the cases it does not fit. Nothing in the agent's answer flags it. Only a before-and-after run of the same question shows the damage.
Coding agents show the same harm. A study of context files found that "unnecessary requirements from context files make tasks harder."
Does this hold outside one benchmark?
A skeptic has three good reasons to doubt it. The test uses one dataset, with synthetic data. It uses one small model. And a company that sells the context layer the agent used ran it.
The exact numbers belong to DABstep. Do not expect them anywhere else.
The direction holds up, though. Studies Contextflo had nothing to do with show it too.
Researchers at ETH Zurich and LogicStar.ai tested context files such as AGENTS.md and CLAUDE.md with four agent and model pairs, including Claude Code with Sonnet 4.5 and Codex with GPT-5.2. Developer-written files raised success by 4% on average. Files generated by the agent lowered it by 3%. Context files also raised inference cost by more than 20%.
Their reading matches the payments test. The agents followed the instructions in the files, but "repository overviews, although popular and recommended by model providers, are not helpful." The files were useful "for specifying non-standard coding practices", which is the coding version of a rule only the team knows.
The authors' advice is that any attempt to improve performance this way "should be rigorously evaluated before deployment."
Two more results point the same way. The Agentic Context Engineering paper grew an agent's context from its own execution feedback, item by item. Without labeled supervision, it beat strong baselines by 10.6% on agent tasks and 8.6% on finance tasks.
On the same DABstep data, the data tool Dot reported a mixed picture.
A data dictionary took it from 67% to 73% and example queries to 80%, so description helped Dot where it did not help Contextflo's agent. Business rules then took it to 85% and instructions for edge cases to 90%.
It is a vendor's own account, with no held-out split described.
The ACE paper also warns against "brevity bias", where optimizing for a short prompt drops the failure modes that matter.
The warning does not contradict the notes. Each note worked because it answered a mistake the agent had made. Each note is as long as the mistake it answers.
Anthropic's own guide to context engineering describes the same order: start minimal, then "add clear instructions and examples to improve performance based on failure modes found during initial testing."
How do you test a note without an answer sheet?
DABstep had a scoreboard. Your agent does not.
But you know the right answer to questions about your own data, product, or codebase. Error analysis relies on that knowledge. Hamel Husain and Shreya Shankar call it "the most important activity in evals". Its first step is reading the agent's output yourself.
- Collect at least 30 tasks you can grade. Questions your support agent got, queries your data agent ran, changes your coding agent made. Pick ones where you know the right result. Husain and Shankar suggest annotating at least 30 yourself before letting a model help.
- Split them before you write anything. Keep some aside. No note may be written from those, the same way Contextflo froze its notes before the 42 new questions. Include some kinds of question you never explored. Contextflo's notes helped most on familiar types.
- Read each miss and write down the first thing that went wrong. The error analysis guide advises noting the first failure in a trace, because later errors often follow from it.
- Group the misses by cause and count them. Write one note per recurring cause, in a teammate's words, saying the rule the agent lacked. Stop when new reviews turn up no new cause. "A blank means any" is a rule; a note that contains one question's expected number is an answer key.
- Add notes one at a time and rerun both sets. Record which tasks each note fixed and which it broke. A task a note broke tells you where the rule needs a limit.
- Keep every confirmed failure in a set you rerun. Husain's evals guide says to "Add confirmed failures as you find them" and adds: "Run this set when you change your application."
- Delete notes that move nothing. Every line in a context file costs something. The Claude Code best practices page says a CLAUDE.md line "takes a little of Claude’s attention on every task", and suggests the file hold "Anything you’ve had to correct twice already".
Docs that save the agent rediscovery can earn their place on cost, as Contextflo's did. Notes earn theirs on accuracy. The Claude Code page gives one filter for both: "Only write down what Claude can’t find by reading the repo, or what it would otherwise spend time rediscovering every session."
Build to Launch's Claude Code token optimization guide covers how to keep that file under 200 lines once the notes start adding up.
Where the notes should stop
Contextflo stopped at four notes on purpose, with 11 of the 42 held-out questions still not right on every try.
Getting the rest right "would mean writing the answers into the notes, and that's cheating the test."
Note 4, the how-to for one question type, was already the closest it came to writing an answer in. Its gain, from 60% to 63%, was too small to count.
Keep that boundary at home too. Anthropic advises against stuffing "a laundry list of edge cases into a prompt". A note that fixes only one question belongs on that list.
After a few good notes, the questions your agent still gets wrong show which rule your team should write next.
FAQ
Do company docs make an AI agent more accurate?
In Contextflo's held-out test, the docs did not. A Claude Haiku 5.5 agent got 40% of tries right without its company's docs and 36% with them. The docs did cut the model cost per try from about 5 cents to about 1.6. The saving came because the agent stopped guessing what each column meant (Contextflo).
Should I generate my CLAUDE.md or AGENTS.md with /init?
An ETH Zurich study found that agent-generated context files lowered task success by 3% on average, and context files raised inference cost by more than 20%. Developer-written files raised success by 4% (Gloaguen et al.). The Claude Code docs say the work after /init is "mostly removing lines" (Claude Code Docs).
How many notes should an agent's context have?
As many as you can show help on questions they were not written from.
Contextflo stopped at four because more would have meant writing the answers in, and each note was tested before it was kept (Contextflo).
Can a rule in an agent's instructions make it worse?
Yes. In the same benchmark, a note that was right for nearly every question still turned one answer from right on 3 of 3 tries to 0 of 3. The agent dropped its own correct reasoning to follow the note (Contextflo).
Sources
- Contextflo, Giving business context to AI agents - does it help? Does it save money?, November 2026
- Adyen and Hugging Face, DABStep: Data Agent Benchmark for Multi-step Reasoning, February 2025
- Gloaguen et al., ETH Zurich and LogicStar.ai, Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?, February 2026
- Zhang et al., Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models, October 2025
- Anthropic, Effective context engineering for AI agents, September 2025
- Claude Code Docs, Best practices for Claude Code, accessed November 2026
- Hamel Husain and Shreya Shankar, Why is error analysis so important in AI evals, and how is it performed?, June 2025
- Hamel Husain, AI Evals: Everything You Need to Know, September 2026
- Dot, GetDot on DABStep, November 2026
- Build to Launch, Claude Code Token Optimization: Full System Guide (2026)
Links
- Contextflo: Giving business context to AI agents - does it help? Does it save money? (documentation)
- Adyen and Hugging Face: DABStep: Data Agent Benchmark for Multi-step Reasoning (documentation)
- Gloaguen et al.: Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents? (documentation)
- Zhang et al.: Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models (documentation)
- Anthropic: Effective context engineering for AI agents (documentation)
- Claude Code Docs: Best practices for Claude Code (documentation)
- Hamel Husain and Shreya Shankar: Why is error analysis so important in AI evals, and how is it performed? (article)
- Hamel Husain: AI Evals: Everything You Need to Know (article)
- Dot: GetDot on DABStep (article)
- Build to Launch: Claude Code Token Optimization: Full System Guide (2026) (article)
Every Friday: what builders launched this week, and one guide to help you ship yours.
More guides
Did Claude Code Get Worse? Read Your Session Logs Before You Turn Effort to Max
Your Claude Code session logs show whether your setup changed and whether the model is skipping work or ignoring work it already did. Higher effort fits only the first.
Your AI-Built Contact Form Says "Message Sent!" 27 of 105 Sent Nothing. Test the Inbox
A study of 105 Lovable and Bolt contact forms found 27 that showed "Message sent!" and sent nothing. Even a form that does send can fail after the click, so the only test that proves a form works is a real message arriving in the inbox you read.
Fable 5.2 vs Opus 5.5: Raise Effort Before You Switch Models
Anthropic says to start on Opus 5.5 and switch models last. Give Claude a check, raise effort one level, then try Fable 5.2, which costs about the same as Opus at max in independent tests, not half.