Agent Harness Tutorial · End to end · Zoom level 3
How we take care of it: money_in_rupees
money_in_rupees catches £ or $ amounts (it caught a real "£25,000").
How we took care of it.
- Amounts must be in rupees (₹). £, $ or € fails.
| It reads | every amount in the reply |
| Kind | rule |
| Provided by | agent |
| If it fails | safe reply |
| Where in the code | F policy rules · evaluators.yaml reply |
| Runs at | 3 · After the model, 8 · Before the reply |
Real exampleIt caught a real answer that said "£25,000".
How it is done: the real code
Cut from the live repositories each time the site is built, so it always matches what runs.
def money_in_rupees(ctx: Context) -> Verdict:
"""F-25: an amount is stated in rupees (₹, Rs or INR, or bare), never £, $ or €.
The real model wrote "£25,000" for a payout of ₹25,000, and every rule passed
it: the figure was grounded and nothing read the symbol. A right number in
the wrong currency is a wrong statement about money, so it is refused like
an ungrounded one. Placed by `evaluators.yaml`; saying the currency in the
prompt is the fix that makes this rule rarely fire."""
found = FOREIGN_MONEY.search(ctx.text)
if found:
said = found.group(0).strip()
return block("money_in_rupees", f"stated an amount as {said!r}; money here is in rupees")
return ALLOW