chapter eleven

11 Agent planning and feedback

 

This chapter covers

  • What planning is for large language models and how it is implemented in agents and assistants
  • How the planning process works by looking at the OpenAI Assistants platform through the use of custom actions
  • Implementing a generic planner and testing it on various LLMs
  • Looking deeper into the mechanism of feedback in advanced models such as OpenAI Strawberry
  • How to apply planning, reasoning, evaluation, and feedback to building agentic systems

Now that we have examined how LLMs can reason and plan, this chapter takes this concept a step further by employing planning within an agent framework. Planning should be at the core of any agent/assistant platform or toolkit. We will start by looking at the basics of planning and how to implement a planner through prompting. Then we will see how planning operates using OpenAI Assistants, which automatically incorporates planning. From there, we will build and implement a general planner for LLMs.

Planning can only go so far, and an often unrecognized element is feedback. Therefore, in the last sections of the chapter, we explore input and implement it within a planner. You must be familiar with the content of Chapter 10; please review it if you need to, and when you are ready, let's begin planning.

11.1 Planning the essential tool for all agents/assistants

11.2 Understanding the sequential planning process

11.3 Building a sequential planner

11.4 Reviewing a stepwise planner: OpenAI Strawberry

11.5 Applying planning, reasoning, evaluation and feedback to assistant and agentic systems

11.5.1 Application of assistant/agentic planning

11.5.2 Application of assistant/agentic reasoning

11.5.3 Application of evaluation to agentic systems

11.5.4 Application of feedback to agentic/assistant applications

11.6 Exercises

11.7 Summary