Chapter 2. RAG as Intelligent World Model
The previous chapter introduced vectors, embeddings, how to calculate them, and how to use them to implement semantic search. Moreover, we introduced you to different vector stores, their relationship with embeddings, and the difference between them.
In this chapter, we’ll introduce you to the Retrieval-Augmented Generation (RAG) technique. This technique lets you add context to an LLM to produce better answers to user questions by providing accurate information on a topic alongside the original user question. The core principles of RAG are the embeddings and the vector stores, so everything learned in the previous chapter is essential in this one.
We’ll cover different aspects of RAG, from simple use cases to more advanced RAG architectures. Some of the topics are:
-
What RAG is and Why you’ll use it.
-
Walking through a simple RAG implementation.
-
Advanced Ingestion process (data privacy, security, chunking, document loader).
-
Advanced Retrieval ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access