Chapter 6: LLM applications
An agent is an LLM in a loop with tools
A plain LLM only reads and writes text, so it cannot check today's weather. An agent puts the LLM in a cycle with tools, so it can get fresh data. Interviewers ask what happens, message by message, when an LLM calls a tool. They also ask how a standard protocol plugs tools into an app.
What you will learn
- Trace a thought-action-observation loop
- Write a tool schema the model can call reliably
- Explain what MCP standardizes between hosts and tool servers
Key terms
- agent
- a program that runs an LLM in a loop and runs its tools
- tool
- a function the agent runs for the model, such as a weather lookup
- observation
- the tool's reply, added to the conversation
- MCP
- Model Context Protocol: one standard plug shape for tools
Prerequisites
Take Statistics of small evals: CIs, pass@k and Elo first. It comes right before this lesson in the course.
Where this lesson picks up: You saw that a small eval is noisy, so a small score gap needs a confidence interval before you trust it. But what is the system you measure when a model must act, not only answer?
What comes next
If the steps of a task are known in advance, do you still need an agent that picks each next step?
Next lesson: Workflows vs agents: planning, memory and multi-agent orchestration
More lessons in this part
Take the lesson
Short cards, one idea at a time, with quick checks as you go.