# Benchmarking a multi-step agent guardrail (local-first): catch vs false-alarm rate, and the eval cases I can’t invent

**URL:** <https://forum.langchain.com/t/benchmarking-a-multi-step-agent-guardrail-local-first-catch-vs-false-alarm-rate-and-the-eval-cases-i-can-t-invent/4977>\
**Category:** Observability & Evals\
**Tags:** self-hosted, intro-to-langgraph, python-help\
**Created:** [October 29, 2026, 4:21pm UTC](https://forum.langchain.com/t/benchmarking-a-multi-step-agent-guardrail-local-first-catch-vs-false-alarm-rate-and-the-eval-cases-i-can-t-invent/4977 "2026-10-29T16:21:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayyanmaan](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/rayyanmaan/32/3749_2.png) [@rayyanmaan](https://forum.langchain.com/u/rayyanmaan)\
**Post date:** [October 29, 2026, 4:21pm UTC](https://forum.langchain.com/t/benchmarking-a-multi-step-agent-guardrail-local-first-catch-vs-false-alarm-rate-and-the-eval-cases-i-can-t-invent/4977/1 "2026-10-29T16:21:17Z")

</div>

I’m working on this as a final-year CS capstone and want people who think about evals to poke holes in it.

The failure I care about is multi-step: every tool call is individually allowed, but the sequence acts on stale facts. The agent reads a record, an edit is approved, the record changes, and the agent acts on the old value. Checking one call at a time never sees it. I scoped this with practitioners first ([the thread that kicked it off](https://www.reddit.com/r/AI_Agents/comments/1wt5p5q/how_to_stop_agents_from_screwing_up/)), and the pattern that kept coming back was that the failures that actually hurt were chains, not single bad calls.

What I built is two parts: a guardrail that re-reads the facts an irreversible action depends on right before it fires and blocks if a relevant one changed, and a benchmark that scores it. The benchmark reports two numbers kept separate on purpose: catch rate (dangerous sequences stopped) and false-alarm rate (legitimate sequences wrongly blocked). The second is the hard part, a guardrail that blocks everything has a perfect catch rate and is useless.

Early numbers, 23 hand-built scenarios across two tools (a mock CRM and a mailer): a naive “block on any change” policy false-alarms 50% of the time; a dependency-set policy with bounds cuts that to 17%; conservative normalisation (same mailbox in a different case; not blocking a write that sets a value it already holds) gets it to 0% with catch rate unchanged. It runs end to end on a local model (qwen2.5-7b via Ollama), same decisions as the deterministic harness. Repo: [https://github.com/rayyanmaan/agent-guardrail](https://github.com/rayyanmaan/agent-guardrail)

How I structure an eval case: each one records the facts the agent read at decision time, the change that happened before the irreversible action, and the one correct outcome (block or allow). I label the change irrelevant, relevant-but-within-approved-limits, or relevant-outside-limits.

Where it’s weak, and where I’d want your input:

1. My scenarios are hand-built, and I wrote the normalisation rules with my own two false-alarm cases in view, so 0% means the known ones are gone, not that there are none. The thing I can’t invent: a real change from your systems that happened before an irreversible action and looked like it should block, but was actually fine to proceed on. Those legitimate-but-suspicious cases are what a false-alarm rate lives or dies on.
2. When you score an agent run, do you check the final external effect, or trust that each tool call was approved? I keep finding the two disagree on exactly the cases that matter.
3. Two shapes my mechanism doesn’t catch on purpose: a duplicate after a lost acknowledgement, and a disclosure built from individually-permitted reads. Do you track where a read’s data flows into a later write, and if so, how expensive is that in practice?
