← Agentic AI
Lesson 1 of 4
Tool use
Watch, read the card, then practise. Tool calling · Structured outputs
The video for this lesson is being recorded.
Meanwhile, the notes below and the 60-second cards cover the same ideas.
Practise this topicTool calling
With tool calling, the model asks your program to run a function (search, calculator, database) and uses the result.
Remember: Clear tool descriptions → correct tool calls.
Structured outputs
Structured outputs make the model reply in a fixed shape, like JSON with named fields, so code can read it.
Remember: Never act on model output you haven't validated.
Try the example in Code Lab
tools = {"add": lambda a, b: a + b, "mul": lambda a, b: a * b}
call = {"name": "mul", "args": {"a": 6, "b": 7}}
print(tools[call["name"]](**call["args"]))