#139 · Primary category: Knowledge Base & RAG
CAG
Cache-Augmented Generation: A Simple, Efficient Alternative to RAG
Project last updated:05/26/25
GitHub Stars
1.5K
Forks
224
Contributors
13
License
MIT
Why we included this project
Teams building knowledge-grounded LLM apps usually hit the same three walls with classic RAG: retrieval adds latency, the retriever sometimes picks the wrong document, and the extra pipeline means more moving parts to keep running. CAG sidesteps all of that. It preloads the relevant material into the model's context window, caches the KV parameters, and answers questions directly at inference with no retrieval step in between. The repo includes working Python scripts for both the CAG path and a conventional RAG baseline, benchmarked on SQuAD and HotPotQA, with swappable models and similarity metrics. That makes it a solid reference implementation if you want to test whether a retrieval-free setup keeps your accuracy. It's research code rather than a turnkey service, and the README is upfront about the real constraint: the whole knowledge source has to fit in the context window, which is worth weighing before you commit to the approach.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
ragflow
RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs
Understand-Anything
Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
crawl4ai
🚀🤖 Crawl4AI: Open-source LLM Friendly Web Crawler & Scraper. Don't be shy, join here: https://discord.gg/jP8KfhDhyN
docling
Get your documents ready for gen AI
anything-llm
Stop renting your intelligence. Own it with AnythingLLM. Everything you need for a powerful local-first agent experience