In this project, we’ll discover how to enhance large language model (LLM) applications using retrieval-based augmentation (RAG). We’ll craft an LLM-powered conversational assistant equipped with access to Wikipedia, allowing it to respond based on our chosen Wikipedia page(s). We will employ cutting-edge LLM libraries and frameworks throughout this project, including OpenAI, LlamaIndex, and Chainlit. RAG, short for Retrieval Augmented Generation, helps improve the outputs of LLMs by adding factual information from a knowledge base.
Our conversational agent will operate with the ReAct prompt framework. This framework enables the agent to use tools step by step to answer questions. Essentially, it understands the question, selects a tool, reviews the tool’s result, and then decides whether to answer or try the tool again based on that result.