Put a gate in front of refund tools
They used a small model to screen refund requests before a tool could run, then compared it with a larger judge model.
- What they did
- They added a SuspicionGate hook to the before_tool_call step for a refund tool. The gate asked Decider 2B three structured questions: a risk score, a grounded yes-or-no check, and whether to let the request through, probe it further, or block it. They prepared 16 test cases across legitimate, vague, fraud, and injection scenarios, then replayed the saved outputs through the gate at different thresholds and also through Nova Pro as a judge.
- How it went
- Decider 2B blocked 7 of 11 bad requests, while Nova Pro blocked 9. Neither model stopped any legitimate refund case, and neither caught the injection case that tried to make the classifier allow it. When min_confidence was raised to 0.90, Decider missed only one case.
- Tips
- This kind of gate needs calibration on your own examples; the safe threshold band was very narrow here, about 0.03 wide. It was also much slower on a CPU-only t2.large, taking about 9.6 seconds per call versus 0.6 seconds for Nova Pro.
Try it yourself with Claude Code
Build a test harness for a gate that sits before [refund/tool/action] calls. Use [small model name] as the gate and [larger model name] as the judge. Run these [number] test cases from [source or case list] through both models, using only mock tools, and compare the outputs in a table with each case, each decision, disagreements, and the match rate. Before any irreversible step such as sending, submitting, deleting, or making a payment, pause and ask me to confirm. If a case looks risky, return one of three labels: allow, probe, or block, and explain briefly why.
Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.
Get 3 agent uses like this every morning
With the day's top AI news. Free, and one click to unsubscribe.
Related agent uses
Let an agent schedule meetings from email
They set up a background agent to read meeting emails, check availability, and handle replies before adding events to the calendar.
Run store ops with human approval gates
A store owner used an agent to watch inventory, sort support, spot sales changes, and condense reviews, while keeping money moves and sensitive replies under human review.
Build a live budget model from your company data
C&S Paper used WorkBuddy to replace slow spreadsheet budget checks with instant scenario testing.
Use AI to speed up multifamily deal research
A multifamily broker uses AI to gather comps, draft property writeups, and flag missing details before outreach and early diligence.
Set up an email chase agent for overdue invoices
A small-firm owner used an email agent to follow up on unpaid invoices and missing paperwork until there was a clear answer or payment.
Automate payroll cheque reconciliation and prep
A payroll team used an agent to handle tax and garnishment cheque work, then added tools when the workflow hit a system limit.