RAG (Retrieval-Augmented Generation)
A technique where an AI retrieves relevant information from an external knowledge base before generating its answer.
Retrieval-Augmented Generation (RAG) is a pattern for making AI more accurate on specific, up-to-date, or proprietary information. Instead of relying solely on knowledge baked into the model's weights at training time, RAG systems first search a knowledge base (documents, database, web), retrieve the most relevant chunks, and include them in the AI's context before asking it to answer.
A classic use case: a customer support bot that answers questions about your product. Rather than fine-tuning a model on your documentation, you store the docs in a vector database, retrieve the most relevant sections when a question comes in, and include them in the prompt. The AI's answer is grounded in your actual documentation rather than hallucinated generalities.
RAG is central to the Agentic Coding Path. Building a RAG pipeline involves: document ingestion, embedding generation, a vector store, semantic search at query time, and prompt assembly.