From the course: Level up LLM applications development with LangChain and OpenAI
Unlock the full course today
Join today to access over 24,300 courses taught by industry experts.
Breaking down the RAG pipeline
From the course: Level up LLM applications development with LangChain and OpenAI
Breaking down the RAG pipeline
- The RAG pipeline consists of two main components. First, the information retrieval from an external data source. Then you have the content generation that works by adding context to the content generated by the language model in order to enhance the answer based on the information retrieval and the user query. And this is what we call augmented content generation. So the RAG process helps users to get the contextually-rich and accurate responses that they're looking for. And so the benefits of RAG are multiple. It's going to allow to receive up-to-date and current information by retrieving context from an external data source, and allow the language models to provide current and relevant answers. That's going to allow to improve the accuracy and enhance the relevance, meaning that the retrieval process answers that the generated text is closely aligned with the given search. So how does it work? The actual RAG chain starts with a user query, a question. Then it's going to trigger…
Contents
-
-
-
-
-
(Locked)
RAG: Overview and architecture2m 12s
-
(Locked)
Breaking down the RAG pipeline2m 50s
-
(Locked)
Project setup3m 33s
-
(Locked)
Load and split documents into chunks5m 6s
-
(Locked)
Initialize a vector store (Chroma) and ingest documents5m 6s
-
(Locked)
Create the chain: Prompt + model + parser5m 39s
-
(Locked)
Create the chain: Add context with a retriever4m 48s
-
(Locked)
Pass data with RunnablePassthrough and query data3m 27s
-
Challenge: Create a custom agent with history3m 12s
-
Solution: Add a chain with chat history5m 19s
-
(Locked)
Solution: Context- and history-aware chatbot5m 49s
-
(Locked)
-
-
-
-
-
-
-
-