Blog
How Exabase reduces your token spend
Exabase replaces raw context injection with precise retrieval. Fewer tokens, better answers, costs that scale flat instead of linearly.

The core principle is simple: you should only send tokens that help the model answer the current question. Everything else is waste, in cost and in quality, because models degrade with irrelevant context.
Most agent architectures do the opposite. They inject full conversation histories and top-K RAG chunks into every prompt, paying for thousands of tokens that the model will never use. Exabase fixes this at the infrastructure level through three mechanisms.
Memory extraction replaces conversation history
When a conversation is processed through the Memory API, Exabase extracts the facts that matter and stores them as structured memories. An 8,000-token conversation might produce 50 tokens of structured facts: user preferences, decisions, stated constraints.
On the next request, instead of injecting the full conversation history, you retrieve only the memories relevant to the current query. A typical retrieval returns 400 tokens of relevant context rather than 12,000 tokens of raw history.
The memory engine also resolves contradictions at write time. If a user was on the free plan in message 5 and upgraded in message 22, only the current state is stored. The model receives one clean fact instead of two conflicting chunks from different points in the conversation.
Memory retrieval stays nearly flat as conversations grow because you are retrieving relevant facts rather than proportional history. A 50-message conversation does not cost meaningfully more to query than a 10-message one.
Deep Search replaces chunk dumps
Standard RAG retrieves top-K chunks by vector similarity and injects all of them. Deep Search searches at the sub-document level and returns precise passages with location references.
The difference: 10 precise passages at roughly 180 tokens each gives you 1,800 tokens of highly relevant context. Standard top-5 RAG at 500 tokens per chunk gives you 2,500 tokens of approximately relevant context. The Deep Search result is smaller, more precise, and gives the model less noise to work through.
The precision parameter provides a direct lever on this tradeoff. Set it high for specific factual questions where one or two passages contain the answer. Set it low for broader research queries where coverage matters more. Either way, you are controlling your token spend per request rather than accepting whatever the vector store returns.
Results also come back with page numbers and timestamps, so your agent can cite sources without injecting entire documents into the context for the model to search through.
Memory lookups replace LLM calls
Some questions do not need a language model at all. What plan is this user on, what is their preferred language, what timezone are they in. These are lookups.
With structured memory, these become API calls that return in 200ms and consume zero LLM tokens:
javascript
Each lookup that replaces an LLM inference eliminates an entire call's worth of token spend and latency. In a typical session there are several of these opportunities.
The combined effect
Here is what a single request looks like before and after:
Before:
After with Exabase:
That is roughly an 81% reduction in input tokens per request.
At GPT-4o's input pricing ($2.50/M tokens), 10,000 requests per day at 15,100 tokens each costs approximately $1,133/month on input alone. At 2,800 tokens each, it is approximately $210/month. To estimate the savings for your specific workload, try the token cost calculator.
These numbers are illustrative and depend on conversation length, document corpus size, and query patterns. But the structural point holds: extracted memory and precise retrieval scale flat, while conversation stuffing and naive RAG scale linearly with usage.
Get started
javascript
The clearest way to validate this is your own token logs before and after. For the full technical walkthrough of the three patterns, see how to cut token costs. For the underlying problem these patterns solve, see how you're overspending on tokens.
Exabase docs · Memory API · Deep Search · Token cost calculator
Links:
Other blog posts:

How to build a company knowledge base for AI agents

M-1 achieves state-of-the-art on BEAM at every scale, with a smaller model and fewer tokens

Why we built a free link preview API

How Exabase reduces your token spend

How you're overspending on tokens

How to cut your token costs

Exabase M-1 achieves state of the art on LongMemEval

What LongMemEval actually measures and where it breaks down