6 Enhancing responses with retrieval-augmented generation
This chapter covers
- Enhancing chatbot responses without coding intents
- Improving weak understanding with RAG
- Evaluating the advantage of using RAG over traditional search models
- Selecting the proper RAG techniques for your conversational AI
- Assessing and improving the performance of RAG in your conversational AI systems
In previous chapters, we saw the “chatbot doesn’t understand” pain point for question-answering bots. We first addressed it by helping the chatbot understand more intents, but at some point there are diminishing returns to this strategy. Uncommon questions from the “long tail” may never make sense to implement as intents. This chapter introduces ways to handle that “long tail,” including search and retrieval-augmented generation (RAG). These are great methods for improving a chatbot’s weak understanding.
We concluded chapter 5 with advice on when to avoid adding new intents, especially when dealing with diverse, infrequent domain-related problems. In this chapter, we’ll add search capabilities to improve weak understanding.
Both search and RAG allow you to improve a chatbot by adding data and documents without programming new intents. This allows you to serve thousands of intents with the simplicity of training just a few. The answers provided by these methods are more straightforward to change—just change the documents rather than changing your chatbot.