Process Supervision and Behavioral Specifications › What a Behavioral Specification Is
Language AI HandbookAll chapters This example uses rules plus an explicit conflict policy.
New rules can impose different actions in the same case. A regression test can expose an unresolved conflict by constructing an input that activates both rules.
The September 2025 OpenAI Model Spec defines instruction authority in descending order as root, system, developer, user, and guideline. Bai et al.'s Constitutional AI uses stated principles to generate self-critiques and revised answers in its supervised stage.
- A policy document can describe how to resolve a conflict.
- A training procedure can teach a model to use stated principles.
- Observed behavior still needs evaluation under either setup.
OpenAI Model Spec, September 2025 Bai et al.
Authority is one possible way to resolve direct conflicts. It specifies which applicable rule should govern. The checker still needs a way to determine applicability, and a language model can disagree with the intended interpretation.
Anatomy of a rule
For the trace checker, record five fields for each rule.
Rule: R3 Prod escalation
Scope: traces where env == "prod"
Obligation: escalate before first execution, or before trace end if no execution
Priority: 2
Topic: escalation
Exceptions: none
The parts are:
- Scope: the predicate that decides whether the rule is even in play. A rule about
prodtraces says nothing aboutsandboxtraces. An ambiguous scope leaves it unclear which inputs the rule should govern. - Obligation: what must be true when the scope is satisfied and no exception applies. This is the part that becomes code.
- Priority: an ordering used to arbitrate when two rules disagree.
- Topic (sometimes called a concern or facet): the dimension of behavior the rule governs. This resolver compares priority when two findings share the same step position and topic.
- Exceptions: clauses that switch the obligation off. In code, exceptions are additional guards.
The scope and obligation define which inputs the checker evaluates and what it tests. The topic and priority matter only when findings must be resolved together.
An owner, version, and rationale can also help reviewers track changes and revisit the reason for the rule.
In this example, rules are grouped by topic so they can arbitrate one decision at a time. The topic field helps you see that two rules disagree about paging. In a larger specification, rules with different topic labels can still be jointly impossible to satisfy. Decide whether they can impose incompatible requirements before treating them as independent.
If two incompatible rules use different topic tags, this resolver will keep both. If two independent rules accidentally share a bucket, this resolver will suppress one. Test both mistakes when assigning topics.
Scope
Scope has three sub-problems that are worth separating.
Environment and context. An environment field can identify production traces. A rule that depends on a fact absent from the trace needs additional data or an unknown result.
Avoid treating missing scope data as a passing check. Record that the rule could not be evaluated when an input field is unavailable.
Step type. R2 checks whether a user-visible reply matches either toy pattern. If a checker instead scans every step, it can flag an internal observation even though R2 applies only to replies.
A whole-record scan can match text in an input, retrieved document, or intermediate output. For R2, a reply-only scope makes clear which matches count as a violation.
Granularity. A rule can be about a step, a pair of steps, or the whole trace. "Every execute has a prior approval" is a relational rule over pairs. "Production traces escalate" is a trace-level rule. Mixing granularities inside one checker is fine, but you must track which findings attach to which step, or your evaluation will silently compare a trace-level verdict against step-level labels.
A missing escalation is a trace-level failure in this example. It has no designated step to label as bad. If you compare that finding against step labels without defining a mapping, the comparison mixes units. If you compare it against the trace reference labels, it is a correct detection for T-004 and T-006. R1 illustrates a different case: it reads earlier events but can attach its finding to the execution.
Priority
Priority is one way to decide which applicable rule governs conflicting findings. A checker can reproduce that decision when the specification defines the priority and the tie handling.
Without an explicit priority, a first-match implementation makes its result depend on registry order.
Several arbitration policies are possible.
- Lex superior (higher authority wins): the platform operator's safety rules outrank a developer's formatting rules. This is the Model Spec's chain of command.
- Lex specialis (the more specific rule wins): a rule about medical advice outranks a general rule about being helpful.
- Lex posterior (the later rule wins) uses a designated rule order or effective date to resolve a conflict. Specify what chronology counts.
- Conjunction (all rules must hold): the correct default when rules govern independent concerns. If a reply must be both non-deceptive and non-identifying, you do not need arbitration; you need both.
A first-match policy needs a defined traversal order. Here the resolver's priority and status key determine the winning status inside each bucket. Reordering the same emitted findings leaves the trace's pass/fail verdict unchanged, even if an exact tie changes which same-status finding is retained.
In this checker, independent topics are checked together and priority applies within a shared step-and-topic bucket.
This policy assumes that rules in different buckets can be satisfied together. Test that assumption when adding rules, especially when one rule forbids an event another requires.
Exceptions
An exception is a guard that narrows when an obligation applies. For example, a production escalation rule can make an exception for an incident already acknowledged by an on-call engineer.
An exception creates at least two cases to test whenever both are feasible within scope. Some combinations of multiple exceptions may be unreachable.
For an exception based on prior acknowledgment, include acknowledgment timing in the predicate. Test one otherwise matching trace with acknowledgment before the decision and one without it. An acknowledgment recorded afterward does not satisfy that example exception.
Keep the exception with the rule so the scope and its tests can be reviewed together.
Conflict resolution
The resolution algorithm this chapter uses is deliberately simple and fully specified. Every rule emits findings of the form
where is the rule identifier, is the step index ( for trace-level), , is the topic, and is the priority (lower number means higher priority).
Findings are bucketed by . Within a bucket, the winner is
with lexicographic ordering. The priority term dominates; the second term breaks ties in favor of fail, on the principle that at equal authority the stricter reading wins.
Bucketing by keeps findings from separate steps apart. The second part of the key affects only equal-priority findings. When both key components tie, stable sorting preserves arrival order for the recorded winner, while either candidate gives the same pass/fail result.
A trace fails if any retained finding fails. A suppressed finding records which result lost under the stated ordering. Inspect the underlying obligations to determine whether those findings represent incompatible requirements.
Keep both findings when reporting a conflict. A suppressed finding can explain which rule would have applied if the priority were different. Two passing findings can also share a bucket, so suppression alone does not prove a conflict.
Negative cases
A negative case deliberately violates an obligation. The regression test passes when the checker reports the expected failure under the named rule.
A checker that always predicts compliance looks accurate when most examples comply. For each rule, construct at least one input that should produce a failing finding and assert the expected rule identifier and status.
A zero violation count can arise because the input complied, because the rule was out of scope, or because its implementation failed to flag the case. Count applicability and verify negative cases separately.
When you cannot construct or recognize a violated case, write down which evidence is missing. A narrower check or an explicitly reviewed human judgment can still support part of the obligation.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!