From the course: Oracle Cloud Infrastructure Generative AI Professional Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Demo: RAG: Retrieval and generation using a vector database

Demo: RAG: Retrieval and generation using a vector database

(dramatic music playing) - In this demo, we will see how retrieval and generation works with langchain and OCI AI generative service. So we'll begin with the import of the classes. We are importing retrieval QA class. We're importing Chroma Vector database and we're also importing OCI Gen AI and OCI Gen AI Embeddings class. We begin with the creation of the LLM object over here. Next we're creating an HTTP client, which connects to a Chroma database, which we're running locally. We're creating a Chroma vector store here using the client object and the embeddings function. And we're creating a retriever out of this vector store and we're passing on the search type as similarity. So by default, the search type is similarity. Now if you're curious about what all different type of search types are available in langchain, you can visit this page and it basically explains about the different type of search types which are available. So maximum, marginal, relevance, similarities, score…

Contents