Observation
50%
Lesson 4 of 8

Observation

After an action, an agent needs a trustworthy observation of what actually happened before choosing the next step.

Active reading
Why this matters

After an action, an agent needs a trustworthy observation of what actually happened before choosing the next step.

Action

What the agent attempted.

Observation

What the environment returned.

Update

How state should change.

Understand the working model

An observation should come from the tool or environment, not from the model imagining that an action succeeded. Store structured outcomes such as status, IDs and error codes when possible.

This prevents phantom progress. If an API call failed, the next reasoning step must see that failure instead of assuming the record was updated.

Example
Action: create ticket → Observation: {status:"created", ticket_id:"A-182"} → State update: store A-182 → Next step: notify requester.
Practice

Apply the pattern above to one real task you already do. Keep the first version small enough that you can inspect every input and output.

Common mistake

Do not let the model write its own “success” observation without checking the real tool result.

Key takeaway

Every action should produce a real observation that updates state before the agent reasons again.

Next lesson

Stop Conditions

Continue to the next lesson.

Continue →