Demo 09

Agents: How do large language models execute multi-step tasks?

Why is an agent a looped control system rather than a one-shot answer? This chapter places agents after LLMs and RAG, explaining how planning, tools, observation, and revision form multi-step task execution.

Teaching interaction

Agents: How do large language models execute multi-step tasks?

Why is an agent a looped control system rather than a one-shot answer?

1 / 5

Break down the task and make a plan

The agent first divides the user's goal into executable steps, deciding what to look up, what to calculate, and what to answer.

Choose a failure path to see how the agent returns from an observation to a revised plan.

Learning goals
  • Understand the agent cycle of plan → tool call → observation → revise → final answer.
  • Observe why a tool failure should return to planning and revision instead of producing an answer immediately.
  • Distinguish a one-shot LLM answer from an agent system with a closed loop of external actions.
Simplification note

This teaching demo does not call real tools or a large language model. Tool results and revision paths are scripted to explain the agent loop.

Observation guide

An agent enters an action loop instead of merely chatting better

The earlier problem was that an ordinary LLM often generated a one-shot answer without continuously observing external state. Agents address multi-step task control, but they do not inherently solve tool safety, goal drift, cost, or evaluation. Their follow-on influence includes tool use, workflow automation, multi-agent systems, and safety evaluation.

References