Blog

Cheap models with good context beat frontier models

M-1 set state-of-the-art memory scores on Gemini 3 Flash while rivals ran on a model 4 to 6 times pricier. What that says about context, model choice and cost.

Jonathan Bree

A smaller, cheaper model given the right context will often outperform a frontier model given a long, noisy prompt, and it will do so at a fraction of the cost per query. The clearest evidence we have is our own: Exabase's M-1 memory engine set state-of-the-art results on both leading memory benchmarks while running on Gemini 3 Flash, and the competing systems it beat reported their results on Gemini 3 Pro, a model 4 to 6 times more expensive. The practical conclusion is to fix what reaches the prompt first and choose the model second.

This piece walks through what the result shows, what it does not show, why context quality carries so much weight, and how to make model choices once the context layer is in order.

What the benchmark result shows

M-1 was evaluated on LongMemEval and on BEAM, the two benchmarks most often cited for long-term agent memory. The table summarises the published numbers.

Benchmark

M-1 on Gemini 3 Flash

Previous best

LongMemEval

96.4%

94.8%

BEAM, 100K tokens

76.9%

Lower at every tier

BEAM, 1M tokens

75.0%

Lower at every tier

BEAM, 10M tokens

68.0%

Lower at every tier

Two details matter for the argument. The model underneath M-1 was the cheaper one, while competing systems used Gemini 3 Pro. And M-1 used about 20% fewer tokens per query than the next-best system. BEAM is designed so that putting everything into the context window does not work, and M-1’s lead is widest at 10M tokens, where the gap between selecting context and dumping it is largest. The full write-ups are on the research pages for LongMemEval and BEAM, and the blog post on state of the art with a smaller model covers the LongMemEval run.

What it does not show

It is worth being precise. The comparison is between complete memory systems, each paired with the model its authors chose. It is not a controlled experiment that holds the context fixed and swaps the model. What it shows is that a system with a better context layer on a cheaper model scored higher than systems with weaker context layers on a more expensive one. In other words, the context layer moved the result more than the model tier did.

These are also memory benchmarks. They test whether a system can recall, update and combine facts across long histories, including facts that change over time. They do not test hard multi-step reasoning, novel code generation or open-ended synthesis, where model capability does more of the work. Our own notes on what LongMemEval measures and where it breaks down apply here too. A single AI benchmark is a strong signal for its task, not a general ranking of models.

Why context quality outweighs model tier

A model answers from what it is given. If the prompt contains the current fact, stated once, near the question, most capable models will use it correctly. If the prompt contains the old fact and the new one, three loosely related documents and forty turns of chit-chat, the model has to do retrieval work inside the prompt before it can answer. Larger models are better at that filtering, which is part of why they cost more. They still pay for every token they read past, and they still miss things.

The research summarised on the reduce token costs page explains the mechanism. A model’s effective context is roughly 50 to 65% of its advertised window, accuracy drops by more than 30% when the relevant passage sits in the middle of a long input, and in a study of 18 production LLMs every model lost accuracy as input length grew. Those effects hit small and large models alike. Distractors cause context distraction, outdated or wrong material causes context poisoning, and buried facts are lost in the middle.

Cheaper models are more sensitive to this noise. That is the observation behind a common failure: a team switches to a smaller model to save money, keeps the same noisy prompt, sees accuracy drop, and adds retries that eat the saving. The solution page lists exactly this under what teams try first. The lesson is to clean the prompt before switching, because a smaller model and a clean prompt fit together well.

Selecting context well means doing the filtering once, at retrieval time, with machinery built for it: hybrid search, query expansion, reranking, recency weighting and contradiction resolution. The model then spends its capacity on the question instead of on sorting the prompt.

The cost arithmetic

Combine the two figures from the benchmark. A model that is 4 to 6 times cheaper per token, reading about 20% fewer tokens per query, costs roughly 0.8 divided by 4 to 6 of the comparison, which is between about 13% and 20% of the cost per query. That is a reduction of five to seven times, before counting the retries that noisy prompts cause.

Cost and accuracy usually trade against each other in model selection. Here they move together, because both come from the same change: less, better context. Shorter inputs also cut time to first token, and smaller models tend to generate faster, so latency improves too. A worked example of the per-request and per-user numbers is in why “just use long context” fails in production, and the token cost calculator estimates savings from your own volumes.

What this means for model choice

The order of decisions matters. If you pick the model first, you end up compensating for weak context with a more expensive model, and the bill and the latency carry that decision forever. If you fix the context first, you can test smaller models fairly.

A practical sequence looks like this. Build an evaluation set from real questions, with expected answers, and keep it as a golden dataset. Measure retrieval separately from generation, so you know whether a wrong answer came from missing context or from the model; retrieval evaluation covers the metrics. Then run the same clean context through two or three model tiers and score the answers, by hand or with LLM-as-a-judge checked against human labels. Choose the cheapest model that passes, and keep the eval in your release process so a later prompt change cannot quietly undo the result.

Once you know which tasks the small model handles, model routing can send the rest to a larger one. Routing on top of noisy context saves little, which is the argument in the planned post on why model routing is not a cost strategy on its own. Routing on top of clean context lets most traffic run on the cheap tier.

When the frontier model is still worth it

Some work needs the larger model whatever the context. Long chains of tool calls where one wrong step derails the rest, difficult code changes, mathematical or legal reasoning, and synthesis across many sources all benefit from more capable models, and reasoning models that spend test-time compute on harder problems. The point is to pay for capability where the task needs it, not to pay for a model’s ability to sort through a cluttered prompt.

Even then, clean context helps. A frontier model reading 3,000 relevant tokens is cheaper, faster and usually more accurate than the same model reading 100,000 tokens that contain those 3,000 somewhere. Fine-tuning and distillation can narrow the gap for stable tasks, but they do not supply facts that change per user, which is the job of agent memory.

A worked example

Take a support assistant for a software product. A customer asks whether their plan includes single sign-on. Two months ago they were on the free plan; three weeks ago they upgraded. The noisy approach sends the last 40 turns of conversation, the five top-scoring help-centre chunks and the account notes, around 20,000 tokens. Somewhere in there is the old plan, the upgrade, a pricing table from a help article and a chunk about SSO on a different plan. A frontier model will usually untangle this. A small model is more likely to anchor on the first plan it reads and answer wrongly.

The selected approach sends the current plan as one memory, written when the upgrade happened, plus the single help-centre passage that lists what that plan includes. That is a few hundred tokens with no conflicting facts in them. Both models answer correctly, the small one in less time, and the request costs a small fraction of the noisy version. Across thousands of conversations a day, the difference decides which model tier the product can afford.

Where Exabase fits

Exabase is the context layer, and the model stays your choice. Exabase Memory uses M-1 to extract facts, preferences and events from conversations, resolve contradictions as they are written, and return the relevant memories for each query through hybrid search with recency weighting, optional query expansion and reranking, at about 200ms for simple retrieval. The retrieving memories guide explains the parameters, and the ask endpoint returns an answer directly when you do not want to assemble the prompt yourself. Deep Search returns sub-document passages for document questions, with a precision setting per query.

Because the context is small and specific, the model underneath can be smaller. That is what the benchmark result reflects, and it is why teams building latency-sensitive products such as voice agents and customer support agents can use faster models without losing accuracy. For how M-1 compares with other memory systems, see the best agent memory platforms and the head-to-head with Mem0.

Frequently asked questions

Can a cheaper model beat a frontier model?

On tasks that depend on recalling the right facts, yes, when it gets better context. M-1 on Gemini 3 Flash outscored memory systems running on Gemini 3 Pro on LongMemEval and BEAM.

Was the M-1 comparison a controlled model swap?

No. It compares complete memory systems, each on its own model. It shows the context layer moved results more than the model tier, not that Flash beats Pro in general.

How much cheaper is a small model with good context?

From the benchmark figures, a model 4 to 6 times cheaper reading about 20% fewer tokens costs roughly 13% to 20% as much per query, before counting retries.

Why do cheap models struggle with long prompts?

They are less able to ignore distractors and outdated material. Every model loses accuracy as input grows, and smaller ones tend to lose more.

Should I switch to a smaller model to cut costs?

Fix the context first, then test smaller models against an evaluation set. Switching with the same noisy prompt usually lowers accuracy and adds retries.

When should I still use a frontier model?

For hard reasoning, long tool-call chains, complex code and broad synthesis, where capability rather than context is the bottleneck.

Does model routing help?

Yes, once context is clean. Routing sends hard tasks to large models and the rest to small ones. On top of noisy prompts it saves much less.

Does Exabase require a particular model?

No. Exabase is model-agnostic. It returns memories and passages that you pass to whichever model you choose.

Related pages: Reduce token costs, Exabase Memory, State of the art on LongMemEval with a smaller model, M-1 on BEAM, Your LLM bill is a retrieval problem, Model routing, Context engineering, Best agent memory platforms, Where your tokens go: anatomy of a 15,000-token request, Similarity isn’t relevance, Agentic search will replace RAG pipelines, Search is the most underrated part of the AI stack

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.