Retrieval-augmented generation (RAG) answers questions from your own documents. Instead of relying on what the model learned in training, the system searches a collection of text, usually with embeddings in a vector index, and puts the most relevant passages into the prompt. The model answers from those passages and can cite them.
RAG works well when the retrieved text is relevant and the prompt makes the model stick to it; it fails quietly when retrieval returns the wrong chunks. These guides start with a tiny RAG pipeline in Python, then cover placing and compressing retrieved text in long prompts, breaking multi-hop questions into searchable parts, agentic RAG where the agent decides when to search, and securing RAG against poisoned documents.
The library lists all guides with filters for topic, level, category and reading time.