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.

Connect to a data source and create an index

Connect to a data source and create an index

- [Instructor] We know that the language models are trained on millions of data, but we know also that the data is limited to a certain dates, and lacks specific domain knowledge. And one way to enhance the language model's capabilities is by adding a retrieval components and by giving access to a specific context. And sometimes we need to connect to multiple data source and multiple retrievers by using the query analysis technique. And this is what we're going to discover here in the next example. So let's begin here. So that's going to be our starter project. What we want to first do is to create an index and allow to connect to multiple data source. So let's go back to our first example where we create the index. So what we want is to add to the scope the RecursiveCharacterTextSplitter, Chroma to create the vector store, and the OpenAIEmbeddings text model to create the embeddings and then store them into the vector stores. So let's make sure that we add this to the scope and it's…

Contents