From the course: Level up LLM applications development with LangChain and OpenAI
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Create a retrieval chain: Define the prompt
From the course: Level up LLM applications development with LangChain and OpenAI
Create a retrieval chain: Define the prompt
- [Instructor] So, the next example will be a good extension from the previous example. When we set up a vector search database, so we have a database, a collection, we have also set up a vector search index, so now let's see how we can answer questions based on our data. And we're going to look at this Basic RAG example here that we're going to implement using LangChain, and we're going to use our Atlas Vector Search as a retriever to allow to run similarity search, and allow to retrieve the most-relevant documents. So, we're going to use LangChain. Let's look at the example. So, the first step will be to define a retriever, and we're going to begin actually, and that's going to be like this step we're going to start with, we want to define a template to give the language model instructions as to how to behave. Just to tell the language model, so which output we expect by using the context, but also the user query, and then we define a prompt with prompt template, so let's begin with…