From the course: Level up LLM applications development with LangChain and OpenAI
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Pass data with RunnablePassthrough and query data
From the course: Level up LLM applications development with LangChain and OpenAI
Pass data with RunnablePassthrough and query data
- [Instructor] To complete the project, I'm going to explain to you how to pass data through. So, for that we're going to use runnablepassthrough. So, let's look at this retrieval example here. And that looks very much like the chain that we are trying to compose. And we just need to pass here this components RunnablePassthrough, which will allow to pass data through. So, you see that in this example we have this query and this query is going to be passed through to this question key and allowed to pass the query and then provide with this query information to the prompt. So, the prompt is going to include then the context and the question and provide with an enhanced prompt and instructions to the language model. And so, the rest is going to be going through until we can generate an augmented response. So, let's do the same. Here, we're going to replace with RunnablePassthrough, which is already added to the scope of your projects. All right and that's going to be working just fine…
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)
-
-
-
-
-
-
-
-