OpenAI Structured Outputs guide
Official documentation for schema-constrained responses and the need for application-side validation.
Compute College
Use code and explicit rules for the parts of AI evaluation that do not require model judgment.
A deterministic grader evaluates an output with a repeatable rule whose result does not depend on another model call. Examples include schema validation, exact or normalized matching, required-field checks, citation presence, range checks, and permission rules. Deterministic checks should own requirements that software can verify directly.
Memory trick: Rules belong in code when code can know the answer.
A model-based grader can be useful for nuanced language, but it adds cost, latency, and its own variability. Deterministic checks are easier to audit and make critical failures explicit. Combining the two lets a system use judgment where needed without asking a model to enforce a rule that code can enforce better.
A claims extractor first checks that the response is valid JSON, contains only allowed fields, quotes evidence from the source, and uses a confidence value between 0 and 1. Only then does a model-based grader assess whether the explanation actually supports the claim.
Example figures are illustrative calculations, not current quoted market prices.
Current example
This source explains the method or risk boundary. It does not replace testing the actual model, data, provider, and workload conditions in production.
Official documentation for schema-constrained responses and the need for application-side validation.
Source discipline: examples on this page are illustrative; measure the real workload before making a release or capacity decision.
Code should enforce rules that have exact answers. If the requirement is an allowed value, a required field, a range, or a permission, use a deterministic check before asking a model.
Practical takeaway
List the evaluation criteria for one workflow and mark each as deterministic, semantic, or human. Implement the deterministic checks before tuning the semantic grader.
Decision check: if the model returned a confident but invalid value, would code stop it before a user or tool sees it?
Compute College learning path
Step 22 of 48: Deterministic graders and rule-based checks