From 41 to 97 Percent: What Actually Moves Agent Accuracy

When an AI agent underperforms, the instinct is usually to swap the model. Try a newer one, a bigger one, a different provider. It feels like the right lever — the model is doing the work, so the model must be the problem.

A case study from Brainbase Labs, shared at the AI Engineer conference, is worth sitting with because it runs directly against that instinct. A pricing intelligence agent built for Domino’s started at 41 percent accuracy. It reached 97 percent over eleven versions. The model never changed. Every improvement came from better instructions and rules.

What the agent was actually doing

The task was competitive pricing intelligence: scrape competitor pizza apps and websites, find the lowest available price including promotions, and fill a spreadsheet. A human analyst had been doing this manually — roughly two hours a day, every cell verified by hand. The agent needed to match that output automatically.

Version one shipped with a narrow scope on purpose: one app, one item, one city. The philosophy behind that choice is worth noting — “V1’s job is to be measured, not to be good.” Before anything else, there had to be a baseline to improve against.

The anthology: where most of the accuracy lived

The highest-leverage part of the framework was what Brainbase calls the anthology — a structured rules file that defines every term the agent needs and every decision it must make consistently.

The key insight is simple: when a term is undefined, the agent guesses. And it guesses wrong. Some of the rules that turned out to matter most sound almost obvious in retrospect: use the checkout price, not the struck-through display price. Delivery and takeaway are different products with different prices. Apply promotion math correctly. If a price cannot be verified, write “gap” — never guess.

None of these rules were invented upfront. They were discovered from failures. Each wrong output became a rule. Each rule was added to the anthology and linked back to the source URL that exposed the gap.

Fixing before swapping

The iteration loop followed a consistent discipline: score the current version, identify the highest-frequency failures, fix one thing at a time, check whether the fix increased cost or run time, and decide whether the tradeoff was acceptable.

Two examples show how instructable the failures actually were. In the first, the agent was stopping at the section of the page it had been directed to and missing cheaper deals further down. The fix was a single rule: scan the entire page, not just the linked section.

The second was more expensive: the agent was finding promotional prices embedded in images rather than structured text, looping through 26 images, zooming in repeatedly, and running for fifteen minutes without finishing. The fix told the agent to check the HTML DOM first — image titles, alt text — before attempting to read pixel images, and to stop zooming past a threshold. That single instruction reduced image reads by two-thirds and cut costs by more than half.

Both fixes were instruction changes. Neither required a new model.

Evaluating beyond a single LLM call

A good eval setup turned out to be essential — without it, iteration was blind. The team built three layers. Deterministic checks handled the mechanical questions: were all cells filled? Did the discount math add up? Did any price deviate more than 20 percent from the prior run? An LLM-as-judge layer (a model scoring the agent’s output against criteria) handled interpretation: was the right item selected? Was the right promotion applied?

The third layer is the more unusual one — an agent-as-judge, where a separate agent takes multiple tool-call turns to verify flagged outputs. For tasks with concrete, verifiable results, this proves more thorough than a single scoring call. It also surfaces failure modes that a one-shot judge misses.

One thing the automated evals alone did not catch: some failures only surfaced when engineers read through raw traces by hand. That still mattered.

Handing off the whole loop

The final step was handing off not just the agent but the system around it: who runs it, who reviews exceptions, who converts corrections into new benchmark cases, who signs off on a new version. At Domino’s, analysts now review flagged outputs only. Each correction automatically generates a new test case for the eval suite. The agent improves from production use.

The framework is specific to a pricing task but the structure generalises. Any agent that transforms a messy data source into structured output — web scraping, document extraction, form filling — faces the same challenge: the model is capable enough, but the instructions haven’t told it what “correct” actually means in this context. That gap is almost always closable before the model needs to change.

The question worth asking before the next model upgrade is whether the anthology has been written yet.

Text summarized and optimized using Anthropic’s models and reviewed by a human.