From the course: Introduction to AI-Native Vector Databases
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Vector DB3: Retrieval augmented generation
From the course: Introduction to AI-Native Vector Databases
Vector DB3: Retrieval augmented generation
Now, let's talk about how you can use a vector database to improve a large language model-based chatbot like chat GPT. The problem with large language models like ChatGPT is that they don't know anything they haven't been trained on. Using the information stored in a vector database, we can solve this problem. Retrieval-Augmented Generation, RAG, is a technique that allows you to tell your large language model about relevant concepts prior to getting it to answer a question. This is how RAG works. First, we query the vector database with a concept. Second, we obtain retrieved results from semantic search, then, we build a prompt that uses these retrieve results, and we feed that prompt and results into the large language model to generate from. This allows a large language model to read retrieved relevant facts before having to generate an answer to a question, very much in the same manner as you would go to research a topic prior to writing an essay, or providing a well-thought out…