Code as Business Rules Constraint
The principle of “constraints over guidance”: a rule enforced in code means “must not do”, while in a prompt it only means “should not do”.
Triple-Guarantee Pattern (τ-bench):
- rules in natural language in the system prompt – for understanding and explanation;
- tool description with expected_* parameters – acts as a checklist for model thinking;
- codified server-side check against ground truth DB data – the ultimate gatekeeper.
Key detail: no policy fact is taken from parameters claimed by the model – the model can hallucinate or be manipulated by injection.
Related: Code as meta-ability, Harness engineering, Prompt injection