OpenRouter实测:CAG更准但RAG更省
OpenRouter使用相同的40个问题,对约9K、66K和330K Token的三种产品目录比较RAG与CAG,测试于2026年11月8日通过其API运行。CAG在每种目录规模下答对数量都更多;在最大的3,000种产品目录中,GPT-6 Luna使用CAG答对31题,而纯RAG为9题、混合RAG为17题。大目录下RAG成本明显更低,DeepSeek V4.1 Flash上的CAG成本则随请求路由变化;两种方法都无法可靠完成全目录计数。
测试揭示了文档型AI系统在准确率与成本之间的取舍:当完整语料能放入上下文窗口时,CAG可提高准确率,但大型或经常变化的集合更适合混合RAG,直接查询数据的工具对全目录计数表现更好。
RAG vs CAG: We Measured Accuracy and Cost at 3 Sizes
OpenRouter ·12/2/2026


If you are building a chatbot or search tool that answers questions from your own documents, you have two main ways to give the model those documents. Retrieval-augmented generation (RAG) searches your documents for each question and sends the model only the few pieces that look relevant. Cache-augmented generation (CAG) sends the model all of your documents with every question and uses prompt caching to keep that affordable. That is the choice in RAG vs CAG.