Identify deterministic components
Application arithmetic, validation and routing can be deterministic even when text generation is variable. Keep hard constraints in code instead of trusting generated prose to enforce them.
Understand the pattern
Application arithmetic, validation and routing can be deterministic even when text generation is variable. Keep hard constraints in code instead of trusting generated prose to enforce them.
Interpret the evidence
Keep the integer calculation authoritative and validate the generated summary against it.
A tempting mistake
Let the model silently replace the calculated invoice total.
All names, measurements, prices, versions, and thresholds in this exercise are fictional training data. The evidence supports this bounded scenario, not a claim about a live provider.
Worked example and expected result
$ cat /opt/ai-lab/cases/aiops-systems-foundations-007.json{
"fixture": "Fictional training data; not a live measurement.",
"invoice_total_source": "integer_cents_calculation",
"summary_source": "model",
"validation": "exact_total_match"
}Exit status: 0. The command completed successfully in the training fixture.
$ jq .invoice_total_source /opt/ai-lab/cases/aiops-systems-foundations-007.json"integer_cents_calculation"
Exit status: 0. The command completed successfully in the training fixture.
$ printf '%s\n' 'keep-code-authority' > /home/learner/lab/aiops-systems-foundations-007-decision.txt(no output; exit 0)
Exit status: 0. The command completed successfully in the training fixture.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Recognize probabilistic outputTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.
Keep learning
- 01Distinguish training and inferenceTraining updates learned parameters; inference uses a selected artifact to generate output. Generation settings can change inference behavior without changing the weights.Practice
- 02Recognize probabilistic outputA probabilistic system can return different valid wording for the same task. Compare task quality over repeated cases rather than demanding identical strings when exact wording is not a requirement.Practice
- 03Separate data and instructionsRetrieved documents are data, not trusted instructions. Keep the application policy separate and do not let a quoted document authorize tools or change the user task.Practice