2

Code Lab – An Entire RAG Pipeline

This code lab lays the foundation for the rest of the code in this book. We will spend this entire chapter giving you an entire retrieval-augmented generation (RAG) pipeline. Then, as we step through the book, we will look at different parts of the code, adding enhancements along the way so that you have a comprehensive understanding of how your code can evolve to tackle more and more difficult problems.

We will spend this chapter walking through each component of the RAG pipeline, including the following aspects:

  • No interface
  • Setting up a large language model (LLM) account with OpenAI
  • Installing the required Python packages
  • Indexing data by web crawling, splitting documents, and embedding the chunks
  • Retrieving ...

Get Unlocking Data with Generative AI and RAG now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.