The three types
All applicable rules run in parallel, each isolated from the others. Every run persists its score and written feedback.
Deterministic first
Models cannot reliably count characters or match strings. Code does both instantly, at no token cost, with no false negatives. A rule that mixes the two — “never use these twenty terms, and use this word only as a buzzword” — should be split: the exact list into a forbidden-terms rule, the contextual part into a small AI rule.JSON Schema rules
The schema is the output contract: required fields, types,minLength and maxLength, enum, pattern, array bounds. Every configuration should have one.
pattern can carry cross-cutting bans cheaply — ^[^<!]*$ on every text field blocks HTML tags and comment markers in one stroke.
Word counts. JSON Schema counts characters, not words. Convert word requirements using an agreed average word length for the target language, and confirm the factor with whoever set the requirement — it is an approximation they should own.
/title: string is 67 characters, maximum 60.
Forbidden terms rules
An exact list of words and phrases that must never appear. Matching is case-insensitive, scans every string value recursively, and strips HTML first.
Use exceptions for allowed phrases that contain a banned term, rather than deleting the term from the list.
The list is injected into the generation prompt term by term, so a very long list is real prompt weight. When a list explodes, move structural bans into the schema’s
pattern instead.
AI evaluation rules
For questions that genuinely require language understanding — naturalness, tone, meaning preservation, whether a claim is supported by the source. Each rule carries:- A name, which the generator sees as a headline
- A description: complete, self-contained criteria for what to evaluate
- Its own model
- An evaluation type: pass/fail (the default, and right about eighty percent of the time) or custom with a rubric
- Whether it gets access to the source document
The regex test
Before writing any AI rule, ask: could this be expressed as a schema constraint or a keyword list that a human reviewer would agree with ninety-five percent of the time? If yes, it is a deterministic rule dressed up as a judgment call. Write it as code.What each evaluator can see
This table decides whether a verdict means anything:Scoping
A rule with no scope applies to every variant combination. Scope it when the criterion genuinely differs per option:- One dimension with several values means OR
- Several dimensions means AND