Content Deep Dive

RAG vs CAG: We Measured Accuracy and Cost at 3 Sizes

Blog post from OpenRouter

Post Details
Company
Date Published
Author
OpenRouter
Word Count
2,910
Company Posts That Month
9
Language
English
Hacker News Points
-
Post removed?
No
Summary

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.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
RAG 61 178 17 14 -78%
Vector Search 19 168 37 26 -90%
Use This Data

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.