Dissecting Claude Code's RAG Mechanism
Claude Code has no vector database and no embedding index, yet it can pinpoint the exact file you need in a million-line codebase. Behind this is a retrieval architecture completely different from traditional RAG.
This Isn't the RAG You Know
If you've used RAG before, the pipeline should be familiar: build an offline index, user asks a question, vector-search for Top-K chunks, inject into prompt, generate an answer. A straight line, one pass, done.
Claude Code doesn't work like that at all. It has no offline index. The model itself drives the retrieval process.