Agents and AutomationLesson 35 of 72

Module 4 · Surviving real data

The validator is the product

In this lesson

  • 9 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 7 of 9 in this chapter

This chapter’s goalDiagnose a failing agent run from its trace and apply the specific fix it needs: a retry policy, a validator, a shorter chain, or no loop at all.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
Five checks, cheapest and most reliable firstSchemaParses, requiredfields present,types right,enums insidetheir sets. Freeand instant.Arithmetic andinvariantsLine items sumto the total;the discount isnot larger thanthe subtotal.Two lines each,and never an offday.Trace everyvalue to a toolresultEach id, figureand quotationappearssomewhere inthis run’sresults. Exemptderived fieldsby name.Business rulesRefund neverexceeds amountpaid. Usuallythe first timethese arewritten downanywhere.A model asjudge, lastFor ‘is thispolite and ontopic’, which norule expresses.Slower, dearer,and it agreeswith fluentnonsense.When a check fails: hand the message back to the model once, then a human queue with the failed checknamed, then fail closed for anything touching money. Never a silent default.
When a check fails: hand the message back to the model once, then a human queue with the failed check named, then fail closed for anything touching money. Never a silent default.

Figure

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

An output is a claim until something checks it

The single highest-value component in a production automation is usually not the prompt, the model or the framework. It is a hundred lines of dull checking code that sits between the agent and the world.

Build the checks in this order, because they get more expensive and less reliable as you go down.

1. Schema

Does it parse? Are the required fields present? Are the types right? Are enums within their sets?

Free, instant, catches a surprising amount. Structured output modes make malformed JSON rare, but “valid JSON with total as the string unknown” is still very much on the menu.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Context Engineering exam.

Stuck on something?Ask Mai, your AI tutor

How to cite: Addaly (2026) ‘The validator is the product’, in Agents and Automation. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/agents-and-automation/validators-not-vibes (Accessed: 29 November 2026).