LLM Learning Hub

workspace/llm-course/home

Observations

Observations are the results returned to the agent after executing an action — tool outputs, API responses, or environment state — that the LLM uses to reason about the next step.

What is Observations?

Observations are the results returned to the agent after executing an action — tool outputs, API responses, or environment state — that the LLM uses to reason about the next step.

Observations are the results returned to the agent after executing an action — tool outputs, API responses, or environment state — that the LLM uses to reason about the next step.

Where is it used?

In ReAct, observations are appended as a `tool` message; in LangGraph, `ToolNode` returns observation messages; web agents observe DOM screenshots or HTML text after a browser action.

How to build it

After executing a tool, append `{"role": "tool", "content": str(result)[:2000]}` (truncate to fit context) to the messages list so the LLM can reason over the observation.