You’re previewing a free lesson. Get the full course

Validate and classify

35 min

Check schema and required fields before AI or external actions. Define allowed classification labels and validate output. Treat customer instructions as untrusted text.

Build this part

Run valid, invalid and adversarial records. Define the allowed AI output schema.

Use the supplied source table in your workspace. Draft your own response before opening the worked example. Save an actual revision and explain its effect; the next lesson uses the same project.

Acceptance check: AI output is checked as data, never executed as a command.

How should unexpected AI output be handled?

Get access to the course to answer.

Your turn

Run valid, invalid and adversarial records. Define the allowed AI output schema.

Review before moving on: AI output is checked as data, never executed as a command.

Record your work in the course workbook. Keep the original, your revision, and a sentence explaining what improved.