RAG for Codebases (Repo QA) (EXPLAINED)
Hard RAG interview question on rag for codebases (repo qa) — architecture, trade-offs, eval, and production patterns.
TL;DR — Quick Answer
Chunk by AST/function boundaries; index README, symbols, and docstrings; combine semantic search with ripgrep for exact matches; reindex incrementally on push; include path, language, and commit SHA metadata.
The Interview Question
Design RAG for codebase Q&A over a monorepo with 2M LOC. How do you chunk, index, and keep results fresh on every push?
Deep Explanation
Why interviewers ask this
Sign in to unlock full answer
Get deep explanations, PDF export & all RAG questions
- 16 more sections of deep explanation
- Real-world examples
- Common mistakes
- Interviewer expectations
- Follow-up questions
RAGCodeDeveloper ToolsGitHubCursor