Chapter 7. Agents II: Improving on the Agent Architecture
Chapter 6 introduced the agent architecture, the most powerful of the LLM architectures we have seen up until now. It is hard to overstate the potential of this combination of chain-of-thought prompting, tool use, and looping.
This chapter discusses two extensions to the agent architecture that improve performance for some use cases:
- Reflection
-
Taking another page out of the repertoire of human thought patterns, this is about giving your LLM app the opportunity to analyze its past output and choices, together with the ability to remember reflections from past iterations.
- Multi-agent
-
Much the same way as a team can accomplish more than a single person, there are problems that can be best tackled by teams of LLM agents.
Let’s start with reflection.
Reflection
One prompting technique we haven’t covered yet is self-critique (or reflection), that is, the creation of ...
Get Learning LangChain now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.