4 Retrieval using AutoGen agents
This chapter covers
- Using AutoGen ggents for more flexible information retrieval
- How to give these agents the search functions you created
- Querying multiple databases or indexes at once
- Prompting agents effectively to limit hallucinations
In the last chapter, you learned how to prep and upload your data to a search service, a big leap toward building a truly performant Retrieval Augmented Generation (RAG) system. But even if you can retrieve the right data, there’s still a chance your system will hand users incomplete or incorrect answers. In this chapter, we’ll tackle that problem head-on by introducing AutoGen agents, which can orchestrate queries, refine ambiguous user requests, and reduce hallucinations.
You’ll see how to integrate the search functions you created in Chapter 3 with Autogen’s agent framework. Instead of a simple function call that blindly embeds user questions, agents will decide which database or index to consult and how best to search it. If a user’s request isn’t clear or doesn’t yield good results, agents can run multiple searches, pivot to another approach, or even ask the user for clarification.