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.

Solution: Q&A with multiple data sources

Solution: Q&A with multiple data sources

(upbeat music) - [Instructor] So now let's look together at the solution to the challenge. And I want to start by creating the index right here that you find at this section. And we're going to allow to create, split the documents into chunks from the documents loaded, starting with this one. So we're going to create the text_splitter = RecursiveCharacterTextSplitter. All right, and then we're going to specify with chunk_size, the fixed number of characters, which will be set as 100. And for the overlap, it's going to be chunk_overlap, and it's going to be set at zero. All right, so next we want to create the documents, and we're going to do that with text_splitter again. So that's going to be split_documents, and then we're going to pass raw_text_shoes that we have just loaded. And so after that, we want to create the vector_store and that's going to be created with Chroma.from_documents. And we're going to create the vector_store with the documents and the embeddings that we defined…

Contents