← Latest papers
🤖 machine learning

Cache-Aware Prompt Compression:A Two-Tier Cost Model for LLM API Caching

This paper introduces Cache-Aware Prompt Compression (CAPC), a strategy that combines query-agnostic compression with explicit cache control and tier-preserving bounds to overcome the limitations of query-aware methods, achieving significant cost reductions (up to 90%) while maintaining quality across diverse production LLM workloads.

Original authors: Yan Song

Published 2026-07-20
📖 3 min read☕ Coffee break read

Original authors: Yan Song

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a massive, super-smart library where a very expensive librarian (an AI) helps you find answers. To save money, the library has two special tricks. First, there's a "VIP Lounge" (caching): if you ask the librarian about the same book chapter over and over, they don't have to re-read the whole thing from the library shelves; they just glance at their notes, which is much cheaper. Second, there's a "Summarizer" (compression): instead of handing the librarian a 500-page novel, you give them a 50-page summary, which is also cheaper to process.

For a long time, people thought these two tricks were best used separately. You'd either use the VIP Lounge for big, boring books, or you'd use the Summarizer for short, tricky questions. But here's the catch: the Summarizer usually changes the story slightly every time you ask a new question to make it fit better. The problem is, the VIP Lounge is a stickler for rules. If the story changes even a tiny bit, the librarian says, "Sorry, that's a new book!" and throws away the notes, forcing you to pay full price to read the whole thing again. This paper asks a simple question: Can we use both tricks at the same time without breaking the rules?

The researchers at PayPal decided to test this on a real-world AI system called Sonnet 4.6. They discovered that the VIP Lounge isn't as perfect as everyone thought. It has a "hot zone" for short notes and a "persistent zone" for long ones, and if you get too clever with your summaries, you accidentally kick your notes out of the expensive hot zone. They found that the old way of doing things—changing the summary for every single question—actually wastes money because it keeps the librarian from using the cheap notes.

To fix this, they invented a new strategy called CAPC (Cache-Aware Prompt Compression). Think of it like this: instead of rewriting the story for every question, they create one perfect, compressed summary of the boring parts once and lock it in the VIP Lounge. Then, for every new question, they just add the specific question to that locked summary without changing the summary itself. It's like having a pre-written script that never changes, so the librarian can reuse their cheap notes every single time.

The results were surprising. In tests with 16 different types of documents, this new method was the cheapest option every single time, saving about 49% compared to just using the VIP Lounge and 64% compared to the old "change-the-summary" method. They also tested it on real-world jobs, like a robot that uses tools to fix computer code and a system that searches through huge knowledge graphs. In one case, they saved over 50% on costs without losing any quality. In another, they proved that the old "change-the-summary" method actually cost 40% more than doing nothing at all because it kept breaking the cache. The paper concludes that by being smart about when to compress and what to cache, we can make AI much cheaper to use without making it dumber.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →