What is RAG?
Retrieval-Augmented Generation (RAG) combines retrieval and generation to find relevant topics and generate contextual responses.
Components of RAG
- Retrieval component: Searches the knowledge for relevant information based on the input query.
- Augmentation: Uses retrieved information to enhance the original query with additional context.
- Generation component: Generates responses using a language model, integrating both the query and retrieved information.
How RAG powers our voice bots
We leverage RAG to enhance the performance of our voice bot by combining retrieval and generation capabilities. Here’s how it works in the PolyAI Agent Studio:
- Query processing: When a caller provides a query, the RAG framework is initiated.
- Retrieval: RAG acts as a retriever, searching our structured knowledge to find matching topics. The knowledge is organized to optimize RAG’s performance and ensure precise matches.
- Generation: The language model (LLM) uses the retrieved information to decide on the content to present to the caller, ensuring responses are relevant and context-aware.
The retriever weights Topic Name and Sample Questions higher than Content when matching. Write clear, specific topic names and realistic sample questions for best results.
Managed Topic structure for RAG
Our Managed Topics are designed to maximize the effectiveness of RAG. Each topic in the is categorized and includes the following components:
- Topic name: The FAQ name or category of the information.
- Sample Questions: Example queries that callers might use. These help RAG understand user intent and improve matching accuracy.
- Content: The information we want the LLM to provide to users.
- Action: Specific actions triggered by the query, such as calling a function, initiating a workflow, or handing off to a human agent.
Why RAG?
RAG improves query understanding, retrieval accuracy, and adapts to specific domains without retraining.