How I Used Atomic Agents to Make a Cheaper Model Work

Kenny Vaneetvelde
November 21, 2026

My app kept track of the answers. All I needed from the model was a question someone could answer with the buttons on the next screen.

For eight accepted questions each, the cheaper model used 20,685 tokens at an estimated $0.00592 and the higher-priced model used 20,665 tokens at $0.10928.

Across eight accepted questions per model. Costs are estimates from recorded usage at the API rates used in the comparison. Source: Eigenwise benchmark, November 2026.

I could use a much cheaper model for follow-up questions because of how I’d built the app with Atomic Agents. My code kept track of what the user had already answered and which options were still open. By the time I called the model, I needed one thing from it. What could I ask that this person could actually answer on the next screen?

In the final comparison, the cheaper model used 20,685 tokens and the more expensive one used 20,665. Each produced eight questions that passed review. At the API rates I used for the comparison, those eight questions would have cost about 18 times as much on the more expensive model.

What I Left to the Model

The model had one job. Given the user’s answers so far and the options still available, what should the app ask next? The app already handled the session, drew the buttons and knew what to do when someone clicked one. I could change the model behind that one call and keep the rest of the app as it was.

This is what I mean when I describe an agent as a function. With Atomic Agents, I can define an input and output type for that call, configure the model and client, and hand the resulting object back to ordinary Python. The frontend has no reason to care which model filled in the fields. That’s a useful place to run a comparison because I can change the model without changing the rest of the application. Control Is All You Need

In an early test, I asked the cheaper model for compact JSON. Only one of its four answers passed the format check. In a later round, the application sent a strict JSON Schema to the provider, validated each response and checked that the question referred only to sources the model was allowed to use. All 24 questions passed those checks. I’d also changed the instructions and the information the models saw, so I can’t say how much of the improvement came from the schema alone.

Two of those questions asked for information you couldn’t give with any of the buttons on screen. A third asked about something the user had already answered. I’d have missed the problem with the buttons if I’d only read the question text.

For the next comparison, each question had to make sense next to the user’s earlier answers and the choices the app would actually show. Could you answer it by clicking one of the buttons? Would your answer tell the app anything new?

Where the 18× Came From

The revised instructions made settled decisions explicit and narrowed which source material the model could use. On November 11, 2026, two configurations each saw the same four synthetic conversations twice. The questions were scored against the same criteria with the model identities hidden. Here are the counts for those 16 calls.

Across eight questions per configurationCheaper modelMore expensive model
Passed schema and source checks on the first attempt8/88/8
Accepted in the blind review8/88/8
Fresh input tokens18,45416,022
Cached input tokens read02,432
Total output tokens2,2312,211
Median time for the request4.75 s4.36 s
Estimated generation cost for all eight$0.00592$0.10928
Estimated generation cost per accepted question$0.000740$0.013660

The cheaper model’s 18,454 fresh input tokens were priced at $0.20 per million. Its 2,231 output tokens were priced at $1.00 per million. Its inputs came to $0.00369 and its outputs to $0.00223. The higher-priced configuration was valued at $4.00 and $20.00 for the same two categories, with a discounted $0.40 rate for cached input. The cache brought its total down a little. Different unit prices explain why two almost identical token totals produced such different estimates. These are API-equivalent figures from recorded usage. Actual subscription charges weren’t measured.

Eight questions cost very little either way. For a sense of scale, a thousand accepted questions with that same workload would come to roughly $0.74 versus $13.66 in generation. That’s an extrapolation. If half the cheaper model’s answers need another attempt, or somebody has to inspect every one, I’d want that on the same spreadsheet. Neither model needed a provider retry in this round. The earlier development calls and the separate review are outside the table.

The expensive model did answer about four tenths of a second sooner at the median. I wouldn’t buy that difference on these results alone. I’d give the cheaper one new conversations and keep the old failures as regression cases. Four conversations repeated twice are particularly easy to overfit when they’re also the conversations you used to improve the instructions.

A Public Example You Can Run

For a look at how this works outside my own projects, the European Environment Agency publishes a fact-checker for answers generated from source documents. It can split an answer into claims and check each claim against the documents the chatbot retrieved. In its Instructor-backed path the project defines a typed Atomic Agent for extraction and another for verification. The checker also has a batch path. You can read exactly where each one is called. EEA fact-checker · Agent setup and verifier dispatch

I’d try a cheaper model on verification first. Keep the extracted claims and retrieved passages fixed and give both models the same pairs. If you swap the extractor at the same time, an apparent improvement might just mean it stopped extracting the difficult claims.

Here’s a smaller version you can run locally. Install Atomic Agents with python -m pip install "atomic-agents==2.16.2". The EEA checker can return several quotes, the index of the document they came from and an explanation. For this example, one passage and one quote are enough. EEA input and output schemas

from typing import Literal

from atomic_agents import AgentConfig, AtomicAgent, BaseIOSchema
from pydantic import Field


class ClaimCheck(BaseIOSchema):
    """Check one factual claim against a single source passage."""

    passage: str = Field(description="The source text to check.")
    claim: str = Field(description="A claim taken from the generated answer.")


class Finding(BaseIOSchema):
    """Whether the passage supports the claim, contradicts it, or leaves it open."""

    verdict: Literal["SUPPORTED", "CONTRADICTED", "NOT_ENOUGH_INFO"] = Field(
        description="Decide using only the supplied passage."
    )
    quote: str | None = Field(
        description="Copy the relevant words exactly. Use null if there is no evidence."
    )

Atomic Agents uses the class docstrings as schema descriptions. I can put an instruction right on quote saying that I want the words copied exactly. I also have the passage in memory, so there’s no need to ask another model whether those words exist. Atomic Agents schema implementation

def check_quote(passage: str, finding: Finding) -> None:
    if finding.quote is None:
        if finding.verdict != "NOT_ENOUGH_INFO":
            raise ValueError("This verdict needs a quote")
    elif not finding.quote.strip() or finding.quote not in passage:
        raise ValueError("Quote missing from source passage")


def check_claim(case: ClaimCheck, config: AgentConfig) -> Finding:
    agent = AtomicAgent[ClaimCheck, Finding](config=config)
    finding = agent.run(case)
    check_quote(case.passage, finding)
    return finding

The caller supplies an AgentConfig with its chosen model and Instructor client. Inside run, Atomic Agents passes Finding to that client as the response model. You still need to check how the client sends it. The EEA agent factories configure Instructor’s Markdown JSON mode. The question experiment above used a route that forwarded a native strict schema. The same Python pattern can sit on top of either. AtomicAgent.run · EEA agent factories · Runnable client setup

There’s a reason this function creates an agent for each independent case. An Atomic Agents instance keeps its conversation history. Reuse it across the evaluation and the second claim can go to the provider along with the first claim and its verdict. An easy way to catch this in a test is to put a distinctive word in the first passage and inspect the messages sent for the second. For independent cases, use a fresh agent with a fresh history, as above, or call reset_history() on an idle instance to restore its initial state. A follow-up in an actual conversation is where I’d keep that history. How the agent adds turns and sends messages

You can test what check_quote accepts without calling a model. Give it the following claim and passage.

case = ClaimCheck(
    passage="PM10 concentrations fell at four stations and rose at two.",
    claim="PM10 concentrations fell at all six stations.",
)
finding = Finding(verdict="SUPPORTED", quote=case.passage)
check_quote(case.passage, finding)
print(finding.verdict)
SUPPORTED

The example prints SUPPORTED because that’s the verdict we gave it. The words in quote appear in the passage, so check_quote lets it through. But the claim says pollution fell at all six stations, and the passage says it rose at two. The correct verdict is CONTRADICTED.

The illustrative claim shows PM10 falling at all six stations. The passage shows four decreases and two increases, contradicting the claim.

Each arrow represents one station in the example. Two increases are enough to rule out “all six.” Illustration by Eigenwise.

The EEA checker can also find a quote that a model attributed to the wrong document. One of the project’s test cases puts the Louvre in Berlin, while the source puts it in Paris. In an offline test of the checker, a stand-in for the model returned the Paris quote, the wrong document index and a verdict of SUPPORTED. The checker found the right document and repaired the citation. It still gave the claim about Berlin 10/10. Supplying CONTRADICTED with the same quote dropped the claim’s score to 0/10. You can use this case to test a replacement model by giving it the claim and passage and checking which verdict it actually returns. Upstream test case · Evidence matching · Report scoring

Would a Small Fact-Checker Be Good Enough?

In MiniCheck, Liyan Tang, Philippe Laban and Greg Durrett tested a 770-million-parameter fact-checker on ten datasets. Without tuning a threshold for each dataset, it averaged 74.7% balanced accuracy, a measure that gives supported and unsupported claims equal weight. The same model scored 86.2% on REVEAL and 59.0% on ExpertQA. I’d want to know which of those workloads my documents resemble before making much of the average. MiniCheck, Table 2

MiniCheck’s benchmark asks whether the evidence supports a claim. Our verifier also has to distinguish “the source contradicts this” from “the source doesn’t say.” In one example from RAGTruth, a restaurant listing confirms that the restaurant offers takeout. The generated description adds that it offers delivery. The listing gives you no way to tell whether the restaurant delivers. Marking delivery as false would be as much of a guess as marking it true. RAGTruth, Appendix A, Table 8

For my comparison I’d keep all three verdicts represented. Some cases should have a real but misleading quote, like the stations example. Others should contain the information needed to verify only half a sentence, like the restaurant example. Set aside documents before tuning the prompts so a rewritten claim from yesterday’s example can’t sneak into today’s test. Have someone label the claim against the supplied passages without seeing either model’s answer.

For each model I’d count how many wrong claims it marked as supported and how many supported claims it sent for manual review. If it sends everything for review, someone still has to do all the reading. I’d include retries and fallbacks in the generation cost per accepted result and track the time people spent reviewing it.

Two Other Places the Money Goes

Once a single call is cheap, it’s tempting to do more in it. In a separate 28-call experiment with the cheaper configuration, seven cases were tried under four settings. At low reasoning effort, generating the question alone took 4.61 seconds at the median and all seven questions passed review. Asking for a short explanation of the decision as well brought the median to 6.87 seconds and six of seven passed. All seven paired calls with the explanation took longer. The explanation was visible output that the application could inspect. On these cases the extra work didn’t improve the questions.

I’d keep the explanation available for debugging. I wouldn’t make every user wait for it on these results. Three of the seven cases were held out from the earlier tuning, and each setting ran only once per case.

The other expense is easier to overlook because the user doesn’t see it. If I know the possible answers on a screen, I can prepare likely follow-ups while the person is reading. Atomic Agents exposes an async call for this kind of application code. The application still has to decide how many branches to start and when a result can be reused. If a person selects a different combination or types their own answer, the prepared question was generated for a conversation that never happened. Using it would discard what they actually said. AtomicAgent.run_async

Suppose I prepare three follow-ups and one is ready when the user clicks. They get the next screen immediately, but I may have paid for all three generations. If all three miss and I make a fresh call, that’s potentially four paid calls for one screen. Before preparing more branches, I’d measure how often the app actually used a prepared question and how much waiting it saved.

Before I’d spend more on a model for a feature like this, I’d look at what I’m asking it to figure out. My app already knows which buttons it’s going to show and what the user has settled. With Atomic Agents I can pass those facts into one call and look at exactly what comes back. On the four conversations I tested, the cheaper model could do that job. Next I’d try a fresh conversation where the user changes their mind and see what question it asks them.


I’m Kenny, the developer behind Atomic Agents. I build and review AI applications through Eigenwise.

Kenny Vaneetvelde, the developer behind Eigenwise

Kenny Vaneetvelde

Share this article

Want this kind of analysis in your inbox once a month?

Your email goes to Buttondown. Unsubscribe any time. Privacy notice.

Prefer a feed? Subscribe via RSS.

Keep reading

All writing