Skip to content
Back to Guides

Prompt compression and caching: an evaluation guide

PointFive Team2 min read

Prompt compression, retrieval filtering, caching, and agent context optimization address different parts of AI cost. This guide is written by PointFive, the maker of TokenShift. It is an evaluation framework, not an independent ranking or a benchmark of competing products.

Choose the mechanism before the product

Prompt compression shortens the material sent to a model. Removing information can change an answer, so assess task quality alongside token volume. Microsoft's LLMLingua project provides research implementations; its reported results apply to the tested models, datasets, and configurations, not every production workload.

Retrieval filtering selects which retrieved passages enter a prompt. Assess whether the remaining evidence supports the answer, including uncommon but important documents.

Conversation summarization replaces earlier turns with a summary. Check whether requirements, decisions, and tool results survive that transformation.

Provider caching reuses eligible context. It changes billing and processing behavior without necessarily reducing the token count shown in an application. Claude documents separate cache writes and reads. Gemini Enterprise Agent Platform (formerly Vertex AI) distinguishes implicit and explicit caching, including storage charges for explicit caches. Eligibility, model, prefix matching, lifetime, and traffic patterns matter. Caching is not universally free or a guaranteed saving.

Agent context optimization considers the context assembled during an agent's work. TokenShift provides visibility, governance, and optimization for supported agents. Analysis runs locally; derived metadata and analysis results reach its control plane, while prompt content does not. Smart Routing is a separate opt-in module that can select a different model.

Measure successful work, not just smaller prompts

Use representative tasks, including failures and long sessions. Compare the baseline with each intervention using the same acceptance criteria. Record input, output, cache-read and cache-write usage, tool charges, optimization overhead, retries, latency, and completed-task quality.

Do not multiply a token reduction percentage by the whole bill. For an illustrative calculation, reducing 3 billion uncached input tokens fivefold removes 2.4 billion tokens. At an assumed input price of $15 per million, that is $36,000 in gross input charges, before any changes to caching, outputs, retries, or optimizer cost. This is arithmetic under stated assumptions, not a current price quote or a measured saving.

Treat long-context research as evidence with boundaries

Lost in the Middle examined information position in question-answering and retrieval tasks. Its findings do not establish a universal accuracy decline for longer prompts or guarantee that compression improves an agent's work. Test your model, context, and task directly.

Questions to ask before adoption

  • Which data leaves the execution environment, and where is it retained?
  • Does the tool remove context, reuse a cache, choose another model, or combine these actions?
  • Which agents and runtimes are supported in the version being evaluated?
  • Are reported savings net of retries, cache changes, and the tool's own cost?
  • Can the team disable the intervention and compare completed-task outcomes?

Sources checked September 17, 2026.

Frequently asked questions

Does prompt compression guarantee lower cost?

No. Savings depend on billable token categories, caching, output behavior, retries, and the cost of the intervention.

Is caching the same as compression?

No. Caching reuses eligible context; compression changes the context supplied to the model. They can interact and should be evaluated together.