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

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