RAG vs CAG: We Measured Accuracy and Cost at 3 Sizes
Blog post from OpenRouter
OpenRouter compared retrieval-augmented generation (RAG) with cache-augmented generation (CAG) using 40 questions about synthetic product catalogs of 80, 600, and 3,000 items, tested once on each of two models. CAG was more accurate at every size, especially on questions requiring information from multiple product pages, while hybrid RAG—which combines semantic and keyword search—handled exact SKU lookups better than embedding-only RAG. Neither approach reliably answered questions requiring counts across the entire catalog; a model equipped with tools to query the data answered all such questions in the test. RAG costs remained roughly flat as catalogs grew, whereas CAG costs increased with prompt length and, on DeepSeek, were also affected by provider routing and cache misses; using a consistent session ID improved cache reuse and reduced costs. The findings suggest CAG for small, stable document collections, hybrid RAG for large or frequently changing collections, and direct data-query tools for aggregate questions, with results interpreted cautiously because the catalog was synthetic and each setup was run only once.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| RAG | 61 | 178 | 17 | 14 | -78% |
| Vector Search | 19 | 168 | 37 | 26 | -90% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.