Lesson 1: Tools, how a model asks your code for facts
20 min read·13 Oct 2026
Module 9 · Lesson 1 · About 55 minutes · Needs: Module 7 (messages, structured output, Lesson 6 on tool privileges)
The situation
Priya forwards a chat. Aisha Rahman wrote: "Hi, it's Aisha. Can I still return my robot vacuum? Order 5521." The Module 8 assistant answered correctly only because the notebook pasted her order facts into the prompt by hand. In the live chat nobody does that: the assistant needs to look up order 5521 itself.
Dev owns the order system and offers two functions: lookup_order(order_id) and check_return_eligibility(order_id). This lesson connects them to the model, so the assistant answers Aisha with her own facts.