RAG Cookbook
Purpose and Scope
The RAG cookbook is a practical learning path for developers who already understand the starter shape of a LlamaIndex application and want to move from a basic retrieval-augmented generation demo toward a more complete system. Retrieval-Augmented Generation, or RAG, means loading private or application-specific data, indexing it so relevant context can be found, retrieving that context for a user query, and passing the query plus context to an LLM for a final response. The O'Reilly course cookbook provides the repository-backed anchor for that journey by organizing demonstrated notebooks under a course titled "Building Retrieval Augmented Generation (RAG) Applications with LlamaIndex." Sources: docs/examples/cookbooks/oreilly_course_cookbooks/README.md
Use this page as a map rather than as a single tutorial. The cookbook README names the course progression from introduction through advanced RAG with LlamaParse, while the broader examples index shows where adjacent examples live for agents, agentic workflows, LLM integrations, embedding models, and vector stores. Together, these two files make the cookbook useful as a curriculum: start with the course modules to understand the major RAG system concerns, then branch into targeted examples when you need a concrete integration or implementation style. Sources: docs/examples/cookbooks/oreilly_course_cookbooks/README.md, docs/examples/index.md
Relevant Source Files
docs/examples/cookbooks/oreilly_course_cookbooks/README.md- Defines the O'Reilly course cookbook title and module outline, including components, evaluation, ingestion, observability, agents, multimodal RAG, and LlamaParse.docs/examples/index.md- Provides the repository's examples landing page and links to example families that complement the cookbook, including agents, workflows, LLM integrations, embedding models, and vector stores.
Cookbook Learning Path
The cookbook outline starts with course orientation and an introduction to RAG systems before diving into LlamaIndex components. That ordering matters because a RAG application is not just one class or one model call. It is a coordinated pipeline that includes data loading, document and node preparation, indexing, retrieval, response generation, storage, and evaluation. The official RAG framing emphasizes that even chatbots and agents often rely on RAG techniques to ground model behavior in application data, so the early modules should be read as the foundation for later agent and multimodal work. Sources: docs/examples/cookbooks/oreilly_course_cookbooks/README.md
After the introductory modules, the cookbook turns to evaluation of RAG systems. That placement is a useful design signal: evaluation is not something to bolt on only after deployment. In a RAG project, evaluation helps determine whether retrieved context is relevant, whether the generated answer is faithful to that context, and whether changes to chunking, embeddings, prompts, or vector stores improve the system. When working through the cookbook, treat every later module as something that should be measured, not just demonstrated. The examples index can then help you find concrete examples for the component family you are tuning. Sources: docs/examples/cookbooks/oreilly_course_cookbooks/README.md, docs/examples/index.md
The next cookbook modules cover metadata extraction and ingestion pipelines, then observability. These topics are where a toy RAG example becomes an operational application. Metadata extraction enriches documents and nodes so retrieval can use fields beyond raw text. Ingestion pipelines make loading, transformation, and indexing repeatable. Observability gives you visibility into what the system actually did: which data was retrieved, which model calls were made, and where quality or latency issues appeared. The course outline explicitly separates these modules, which helps readers avoid treating ingestion and debugging as incidental details. Sources: docs/examples/cookbooks/oreilly_course_cookbooks/README.md
Mapping to Example Families
The repository examples index is the companion to the cookbook because it organizes hands-on notebooks by capability. If the cookbook module is about agents, the examples index points to Function Calling Agent, ReAct Agent, Code Act Agent, and Multi-Agent Workflow examples. If the cookbook module is about agentic orchestration, the index points to workflow examples such as a basic RAG workflow and advanced text-to-SQL. This means the cookbook can be followed linearly, while the examples index can be used selectively when a module raises a design question that needs implementation detail. Sources: docs/examples/index.md
| Cookbook topic | Useful example-index family | How to use it |
|---|---|---|
| RAG components | Agentic Workflows, Vector Stores, Embedding Models | Compare how retrieval, embeddings, and storage appear in executable examples. |
| Evaluation | Examples plus evaluation docs elsewhere in the wiki | Use evaluation concepts to validate each cookbook iteration. |
| Ingestion and metadata | Data loading and parsing pages elsewhere in the wiki | Connect extraction decisions to downstream retrieval quality. |
| Observability | Callback and instrumentation pages elsewhere in the wiki | Trace retrieval, synthesis, and agent execution behavior. |
| Agents | Agents, Agentic Workflows | Extend RAG from query answering into tool-using assistants. |
| Multimodal RAG and LlamaParse | LlamaCloud and LlamaParse pages elsewhere in the wiki | Explore richer document parsing and non-text data workflows. |
The examples index also highlights integration families that are essential for a real cookbook implementation. LLM integrations include OpenAI, Anthropic, Bedrock, Gemini/Vertex, Mistral, and Ollama. Embedding integrations include OpenAI, Cohere, HuggingFace, Jina, Ollama, and VoyageAI. Vector store examples include Pinecone, Chroma, Weaviate, Qdrant, MongoDB Atlas, Redis, Milvus, and Azure AI Search. These are not merely interchangeable provider names; each family represents a decision point in a RAG architecture. The cookbook gives the learning sequence, while the examples index helps you pick implementation routes for model access, embedding generation, and vector persistence. Sources: docs/examples/index.md
Practical Workflow
A useful way to work through the cookbook is to build one application repeatedly, adding only one capability at a time. First, implement the smallest RAG loop: load a small source, index it, and query it. Next, identify the LlamaIndex components involved so you can name the boundary between data loading, indexing, retrieval, and response generation. Then add evaluation so you can detect regressions. After that, make ingestion repeatable, add metadata extraction, and introduce observability. Only after those pieces are understandable should you move into agents, multimodal inputs, and advanced parsing with LlamaParse. Sources: docs/examples/cookbooks/oreilly_course_cookbooks/README.md
Suggested progression
1. Read the O'Reilly cookbook README module outline.
2. Build a minimal RAG example from the examples collection.
3. Add evaluation before changing retrieval or prompts.
4. Improve ingestion with metadata extraction and pipelines.
5. Add observability to inspect retrieval and model behavior.
6. Extend the application with agents, multimodal RAG, or LlamaParse.When you need a concrete notebook after a cookbook module, start from docs/examples/index.md and choose the closest capability family. For example, use the Basic RAG workflow link when you want a workflow-oriented version of the core pattern, use vector store examples when persistence and retrieval backend choices become the main concern, and use agent examples when the RAG application needs tool use or multi-step reasoning. This keeps the course path coherent while still taking advantage of the repository's broad example collection.
Sources: docs/examples/index.md
Next Steps
After finishing this cookbook path, continue into focused pages based on the subsystem you are changing next. Read the RAG concept pages for indexing, retrievers, query engines, response synthesis, and persistence if your main work is retrieval quality. Read the ingestion, metadata extraction, and node parser pages if your source data is messy or large. Read the evaluation, callbacks, and instrumentation pages if your main concern is correctness and observability. For applications that act rather than only answer, continue from the agents, tools, workflows, sessions, and streaming pages.