CourseLarge Language Models: The Complete Course · Module 5: Reasoning and Advanced Prompting · part 39 of 103
Part 39 · Module 5: Reasoning and Advanced Prompting

Lab: Decide refunds by reading, voting and rule

32 min read·13 Oct 2026
Module 5 · Lab · About 60 minutes · Needs: lessons 1 to 4 of this module, and the Module 1 lab (or the cells in Step 1)

What you are building

SUPPORTDESK/REFUNDS.PY, T-1001 ticket Ana's words read the model vote 3 reads verify two checks decide the rule refund_duplicate a person, with the reason weak vote or failed check
The model (amber) only reads; code (blue) votes and verifies, the rule decides (green), and anything doubtful goes to a person (grey).

It is Friday 3 July 2026, week 5. This week you asked the model to reason (Lesson 1), to answer several times (Lesson 2), to work in small steps (Lesson 3) and to fix its answers against a check (Lesson 4). Maya wants one thing from all of it: a refund decision she can trust, and a person for every ticket the system cannot settle. This lab writes it as supportdesk/refunds.py. The split comes from Lesson 3: code checks everything the billing records hold, and the model reads only what they do not. A vote steadies that reading, a verifier checks it, and decide makes the decision. The running example is T-1001, Ana Duarte's duplicate charge of 288 USD. Twelve calls go to the hosted model, all through the course's guard.

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.