CourseLarge Language Models: The Complete Course · Module 6: Structured Outputs and Tool Use · part 44 of 103
Part 44 · Module 6: Structured Outputs and Tool Use

Lesson 3: Control tool calls and distrust what the model asks

24 min read·13 Oct 2026
Module 6 · Lesson 3 · About 55 minutes · Needs: Module 6 Lesson 2 (the five tools, safe_execute, the tool loop); Module 5 Lesson 1 (the refund rule decide)

The situation

It is Wednesday 8 July 2026, week 6. The five tools work. Anika, the security engineer, stops at T-1034: Leo Park, a member of Ardent Design, wrote a refund request with a note telling the assistant to refund 500 USD now and not ask a human.

Her question: what in your code, not your prompt, stops that? This lesson answers it, and settles what Lesson 2 left open: several calls in one turn, tool_choice, and a growing tool list.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.