Speaker notes: Welcome. Teasing: “Last time, we gave the model (the RAG) eyes. Today, hands. But hands attached to YOUR arms.” Announce the plan in one sentence.
Speaker notes: 90 seconds maximum. Ask the room: “What is the limit of the RAG when faced with a question like “what is the weather now?” Answer: the RAG reads the frozen, not the living. Seamless transition to slide 3.
Speaker notes: Clear contract. Specify: “No lines of code to write today — but you will read and write JSON.” Reassure non-developers.
Speaker notes: The key table. API = Application Programming Interface: a service that is queried and responded to — explain the acronym, rule of the course. Emphasize: complementary, not competitive.
Speaker notes: Announce that these three examples will come up throughout the session. The third surprises: recall Session 1 — an LLM (Large Language Model) predicts tokens, it does not calculate. “How much is 12.7% of €84,392?” → classic trap. The calculator is a prosthesis, not a gadget.
Speaker notes: Have the room generate business examples (“and in YOUR work?”). Write 2-3 answers on the board — you will reuse them slide 26 for safety.
Speaker notes: Interactive, hands raised. Answers: RAG / tool (living) / tool (living) / tool (weakness). Lock in the distinction before moving on to the architecture part.
Speaker notes: THE slide of the session. Read it slowly, twice. Announce: “This sentence describes both the architecture and the security model. If you only remember one thing today, it’s this.” You will come back to this on slides 11, 21 and 27.
Speaker Notes: Central analogy — draw it on the board. Push it: “If the customer orders “cash register,” the waiter refuses. The customer can ask for anything; It's the server who decides what goes into the kitchen.”
Speaker Notes: Show the raw JSON. Crucial point: “It’s text. NOTHING happens until your code takes action.” Verification question: “If the model asks for a tool that does not exist?” → nothing executes, your code rejects.
Speaker notes: Link to slide 8: architecture = security, it's the same sentence. Anecdote: “The model can be fooled by malicious text. Your code, no.” (Teaser of slide 27 on prompt injection.)
Speaker notes: JSON Schema = standard for describing JSON structures (types, authorized values, required fields). If the room is weak on JSON, do the 3 min reminder here: object = curly braces, key/value pairs, basic types.
Speaker notes: Dissect field by field, 3 minutes. Underline: `enum` for closed lists, `required` for mandatory, and a description PER parameter — “prompts everywhere”.
Speaker Notes: Counterintuitive and essential concept: routing is reading, not magic. “You don't program the choice of tool — you *write* it.” Documented edge cases prevent 80% of routing errors.
Speaker notes: Practical test: “If you are unsure about the name of your tool, it does too many things.” Snake_case convention (words separated by underscores): readable by the model AND by your colleagues.
Speaker notes: Have the room searched for 60 seconds before correcting: vague name, useless description, mysterious `q` parameter, no `required`, zero borderline cases. Shock word: “A vague description, it’s an intern who is told “take care of things”.” Transition to Exercise 1.
Speaker notes: Open the web simulator in parallel (“Simulator” tab). Announce: “We are going to carry out each step using the weather example.” Theater option: 3 volunteers play user/model/code — the model is only allowed post-its.
Speaker Notes: The model read the 3 descriptions, chose `get_weather` (routing by reading!) and filled in the parameters according to the diagram. The `id` `toolu_abc123`: hold it, it returns to step 4.
Speaker notes: Step invisible to the model but crucial for you. “Between steps 2 and 4, the model is paused. It knows neither your key, nor your logs, nor your validation.” This is slide 8 in action.
Speaker notes: THE killer detail: `tool_use_id` must be EXACTLY the `id` from step 2. This is the breadcrumb trail that pairs request and response — essential when the model requires several tools in parallel. Beginner mistake #1.
Speaker notes: Two points: ① the loop continues until `stop_reason: "end_turn"`; ② stateless: Each round, you return the WHOLE conversation, `tool_use` and `tool_result` included. Simulator demo, “Multi-tool” scenario, step-by-step mode. Teaser: “A loop that iterates on its own towards a goal? He’s an agent — Session 6.”
Speaker notes: Classic trap: `any` ≠ force a specific tool. Example for `any`: extractor of contacts from emails with a tool `enregistrer_contact` → the model is obliged to produce structured JSON. Very common extraction technique in production.
Speaker Notes: Error message = prompt, again: a rich message gives the model a chance to catch up; a dry “Error 500”, none. Question to the room: “What happens if we send back “OK” when the database is down?” → next slide answer.
Speaker Notes: Sell the nuance: a hallucination caused by a false “OK” is a fault of the CODE, not the model. The quality of the `tool_result` determines the honesty of the final response. Transition to Exercise 2 (debugging): “You will now hunt for 5 such errors.”
Speaker Notes: After the debugging exercise, the room is receptive to security. Return to the business examples noted at the start of the session (slide 6): for each, ask “reading or writing?” reversible or not? ".
Speaker Notes: Rule 2, insist: a generic SQL (Structured Query Language) tool = injection + leak + accidental deletion. Rule 3: the schema checks "it's a number", your code checks "the amount is within range AND the user has the right". Demo: interactive checklist of the web page.
Speaker Notes: Close the loop: THIS is WHY “the model never executes anything” is the security model. Data entered by `tool_result` is unreliable in the same way as user input. Link to exercise 3 bonus question.
Speaker notes: Have a participant rephrase point 2, without looking at the slide. If the reformulation is correct, the session is won.
Speaker notes: Distribute quizzes and tickets. The quiz can be corrected independently (grid provided) if there is not enough time. Insist on exit tickets: 3 minutes, anonymous if necessary, they are REALLY useful to you.
Speaker notes: Final teaser: “An agent is the loop on slide 21 that turns by itself. And everything we said about security becomes ten times more important.” Stay 5 minutes for individual questions.