From the course: Hands-On AI: Building LLM-Powered Apps

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Solution: Indexing documents into a vector database

Solution: Indexing documents into a vector database - Python Tutorial

From the course: Hands-On AI: Building LLM-Powered Apps

Solution: Indexing documents into a vector database

- [Instructor] Welcome back. Hope you enjoyed the lab. In this video, we will go through the solution. In our create_search_engine function, we will be using Chroma as the search engine. We will utilize Hanchung's Chroma from documents as we pass in a list of documents to be ingested to our search engine. So we will do Chroma.from_documents. We'll pass into client that was already initialized in the code above. Client equals to client documents equal to docs. We'll use the embedded model passed in to embed the documents and we will use the exact same client settings as we created above. Then we will define our embedded model here using OpenAIEmbeddings. We will use model equals to text-embedding-ada-002. That's it. Now our function to ingest document into our search engine is done. We have both the document processing pipeline and the search engine indexing pipeline ready. Next step, we will tie everything together and integrate everything into our chainlit application so users can…

Contents