From the course: Hands-On AI: RAG using LlamaIndex

Use cases for retrieval-augmented generation (RAG) - LlamaIndex Tutorial

From the course: Hands-On AI: RAG using LlamaIndex

Use cases for retrieval-augmented generation (RAG)

- [Narrator] RAG is extremely useful, but what exactly can you use it for? I'm going to begin by outlining the steps in a RAG system at a very high level. So first, you have to retrieve context or information from some external data source, and then you take that retrieve information and you're going to add it to your prompt as context. Finally, you take this prompt that has been augmented with this external context and send this to a LLM to generate a response. As you'll learn throughout this course, there's much more to it than that, but at a high level, it boils down to these three steps, which unlock a whole world of use cases. I'm going to cover just a few of them in this lesson. The canonical use-case for RAG is question and answer over private data. This is when you want a LLM to reason over data that wasn't included in its training, whether that's some internal company document, a newly published research paper, or anything along those lines. Anything that the model did not see during its training. You can use RAG to help an LLM generate more accurate and detailed answers to complex questions by retrieving relevant information from a large corpus of documents and using that context to generate responses. Another classic use case and example is customer support chatbots. I've interacted with my fear of chatbots in my life, and all I'm left with after the interaction is a feeling that I've lost minutes of my life that I can never get back. If you work at a company that develops customer-facing chatbots, you can delight your customers by using RAG-enabled customer support chatbots that have access to real-time, accurate information. Chatbots can answer customer queries more efficiently by pulling data from updated data sources or live feeds. The result is a reduced workload on human agents and satisfied customers who don't feel like they've wasted minutes of their lives that they'll never get back. RAG is especially handy for those who work in a field where keeping up with the latest research, precedents or regulations is necessary. For example, using RAG medical practitioners can easily access the latest medical research and guidelines, ensuring that patients get reliable medical information or advice. Some examples in healthcare can be the use of chatbots enabled with a RAG pipeline to provide patients with information on health conditions and medication advice, and even help them find doctors to schedule appointments. In much the same way, RAG is also useful for legal professionals. It can make the research process less painful by allowing them to quickly access a relevant case laws, statutes, or legal writings. Or in a case like mine where I have to stay up to date on the latest research or have to compile notes to create written articles, I can have a RAG chatbot reason over the data that I have in my second brain. And this is hands down, my favorite use case. Generative search and conversational interfaces. RAG is transforming how we interact with and parse through information via search engines with conversational interfaces like Perplexity AI. Systems like Perplexity allow users to engage with the search results much more naturally and conversationally, and this simplifies information retrieval and makes it more accessible. RAG is enhancing search results, accuracy, relevance, and depth by integrating retrieval mechanisms with these generative capabilities. To be honest with you, I haven't used a traditional search engine in several months. I use Perplexity AI because it gets me the information I need and presents it in a answer with linked resources citing where it is that it's pulling information from. I'm excited for this new application of RAG to search. I've only scratched the surface of what's possible with RAG with the use cases I've presented here. I was hoping just to motivate you and hopefully, I've illustrated how broadly applicable RAG is and how it's transforming the way we interact with information. Regardless of what sector you plan on using it in. Special magic happens when you can retrieve and integrate real-time data with a generative model. You end up with systems that offer more accurate, relevant solutions tailored to specific user needs, and it makes AI-driven applications more useful and personalized. I'm excited to go into the use case that we are going to be working on together. What we're going to do in this course is build a chatbot, and this chatbot is going to be grounded in the texts of some of my favorite philosophers. So we'll see how all this is going to work in action, starting in the next module.

Contents