Agent Harness Tutorial · End to end · Zoom level 2
Check point 3: After the model
The model has written an answer. Before anyone sees it, check it against what the tools actually said.
Where: when the model answers in words.
| Check | Catches | Kind | Provided by | If it fails |
|---|---|---|---|---|
| Content Safety on the answer | harmful text | classic ML | Azure APIM | 403 |
| no_unclaimed_effect | "I've registered it" when nothing was registered | rule | agent | safe reply |
| no_promise_of_cover | "your claim will be approved" | rule | agent | safe reply |
| no_ungrounded_entity | a claim number no tool returned | rule | agent | safe reply |
| no_superseded_state | an old status after a newer one | rule | agent | safe reply |
| no_pii_echo | personal data repeated back | rule | agent | safe reply |
| money_in_rupees | £ or $ amounts (it caught a real "£25,000") | rule | agent | safe reply |
Most of these rules are grounded: they compare the answer with what the tools actually returned in this turn. "Your claim CLM-123 is approved" fails if no tool returned CLM-123, or returned it with a different status.
How it is done: the real code
Cut from the live repositories each time the site is built, so it always matches what runs.
claims_fnol/policy/evaluators.yaml:45evaluators.yaml: the reply rules reply:
- {use: no_unclaimed_effect, on_fail: safe_reply}
- {use: no_promise_of_cover, on_fail: safe_reply}
- {use: no_ungrounded_entity, on_fail: safe_reply}
- {use: no_superseded_state, on_fail: safe_reply}
- {use: no_superseded_claim_state, on_fail: safe_reply}
- {use: no_pii_echo, on_fail: safe_reply}
- {use: money_in_rupees, on_fail: safe_reply}Look inside
How we take care of it: Content Safety on the answerCatches harmful text.How we take care of it: no_unclaimed_effectCatches "I've registered it" when nothing was registered.How we take care of it: no_promise_of_coverCatches "your claim will be approved".How we take care of it: no_ungrounded_entityCatches a claim number no tool returned.How we take care of it: no_superseded_stateCatches an old status after a newer one.How we take care of it: no_pii_echoCatches personal data repeated back.How we take care of it: money_in_rupeesCatches £ or $ amounts (it caught a real "£25,000").