An agent must break a complex problem into steps. Which pattern fits?
Why D is the answer
A structured reason, act and observe loop
A reason, act and observe loop lets a model work through a complex problem step by step.
In detail
- A reason, act and observe loop handles problems step by step.
- Limit how many steps it can take.
Use case
An illustrative scenario, not a real incident.
An agent looks up an order, sees it shipped, then checks the carrier. Each result shapes its next step.
See it in different ways
flowchart TD
A["Reason"] --> B["Act with a tool"]
B --> C["Observe the result"]
C --> D{"Done or limit reached?"}
D -->|No| A
D -->|Yes| E["Finish or hand to a person"]sequenceDiagram participant A as Agent participant T as Tool participant D as Durable storage A->>A: Reason A->>T: Act, with a timeout T-->>A: Result or clear error A->>D: Save state A->>A: Observe, then decide
stateDiagram-v2 state "Reason" as s0 state "Act" as s1 state "Observe" as s2 [*] --> s0 s0 --> s1 s1 --> s2 s2 --> s0: more to do
Key point: Reason, act, observe.
Why the other options are wrong
- A. A fixed lookup table of the answers to all expected problems
- A lookup table cannot handle new problems.
- B. A longer timeout on the model call so that it can think for longer
- A timeout adds no reasoning.
- C. A single prompt that asks for the complete answer in one reply
- One reply cannot adapt to results.

