Wiring the Agent and Controlling Flow

Hands-on practice for this lecture. Work through the exercises and quizzes to reinforce what you've learned.

1

Exercise 1 of 1

What Your Tool Returns Becomes the LLM's Context

A naive execute returns all 50 products and floods the context window. A smart execute filters, limits to 5, and adds a hint for pagination — same tool, far better context.

Tool Execute — Naive (returns everything)

Simulate a tool call

LLM deciding
Tool called
Execute running
Context returned
Practice: Wiring the Agent and Controlling Flow — Interactive Exercises | Durgesh Rai