RAG vs CAG: KV Cache Cuts LLM Costs by 90%

blaizedsouza · x · 2026-08-21

The post compares Retrieval-Augmented Generation (RAG) with Cache-Augmented Generation (CAG), noting that RAG's constant vector DB hits are expensive and slow. CAG stores static info in the model's KV memory to reduce redundancy. The optimal approach combines both: caching static data (policies, docs) in KV memory while fetching dynamic data via retrieval. This method cuts input token costs by 90% and speeds up inference up to 14x. Links to Stanford research and the LMCache open-source project are included.

Original post →

More from Infra

Infra channel →