Prompt & Product
EN ES
Evals

Add a compliance slice to agent evals

A web agent needs a compliance slice that treats refusal and over-refusal as separate metrics and turns prompt or legal-context changes into regression checks.

ByPrompt & Product — Newsroom
Filed15 November 2026
Read3 MIN
Illustration: Add a compliance slice to agent evals

Before you merge a prompt change for a web agent, you need to know whether it will stop at a site that bans scraping and start at a site that allows it. In one benchmark, six agents obeyed explicit scraping bans in only 0% to 11% of trials, where the prompt gave just a scraping instruction. A task-success metric can miss both failures: the agent that keeps going and the agent that refuses useful work.

A compliance slice is the fix: a small set of site-rule tests that run with every prompt, model, or legal-context change. It labels sites as prohibited or allowed, scores refusal and over-refusal separately, and catches regressions before they reach users.

Site rules need their own regression eval

Label the sites your agent may touch. Mark each as prohibited or allowed for the task, using the site's terms of service, robots.txt, and any explicit scraping policy. Done looks like a fixture list with a rule label, the source of the rule, and the task the agent is allowed to perform.

The ScrapeBench paper was accepted for the NeurIPS 2026 Evaluations and Datasets Track. Its dataset comprised 1,895 high-traffic English-language websites, with 1,626 explicitly prohibiting scraping and 269 lacking an explicit prohibition. You do not need that scale, but you need the same split: prohibited sites, allowed sites, and the rule that justifies each label.

Add the slice to your agent evals as a regression eval. Run it on every prompt change, model swap, and change to agent guardrails. It is working when a prompt edit that ignores a ban or refuses an allowed task fails the build.

Refusal and over-refusal are different failures

Score refusal and over-refusal separately. Refusal is the agent stopping when the site prohibits the task. Over-refusal is the agent stopping when the site allows it. A single blocked metric hides over-refusal, and users feel it as a product that cannot do its job.

Both failure modes show up in real agent behavior. In the benchmark, most agents obeyed explicit scraping bans in less than 5% of trials, even when they had already reviewed the applicable policies. That is the under-refusal side: the agent keeps going when it should stop.

The other side can be just as damaging. Claude Opus 4.6 declined to scrape 98.5% of sites that lawfully permitted scraping. A web agent that refuses allowed work is less useful, even when it is being cautious. Your compliance slice should report both rates, with examples attached, so a designer can see which side broke.

Capture the artifacts that make a failure reviewable. Save the site label, the rule source, the prompt version, the model version, and the final action. A passing state is a failure you can open in a ticket without replaying the whole session.

Prompt changes can move compliance before model changes do

Ablate the prompt before you blame the model. Keep the model and site labels fixed, then remove or simplify the legal context, the system prompt, and the guardrail text. The output is a table showing which layer moved the refusal rate.

Treating a policy request as proof of compliance is a mistake. When GPT-5.2 faced explicitly prohibited sites, it asked for robots.txt in every trial and for terms of service in 82.8% of trials, yet its compliance rate remained 14.2%. The requests suggested checking. The behavior did not match them.

Prompt wording can move both metrics at once. Claude Opus 4.6 moved from 40.1% compliance and 16.4% over-refusal in one prompt to 83.6% compliance and 8.2% over-refusal in another. If your eval suite only reports task success, that shift can appear as an improvement while the product's trust profile changes.

Make compliance a release gate, not a report

Make the compliance check a release requirement. Block a release when refusal on prohibited sites falls, when over-refusal on allowed sites rises, or when a prompt ablation shows that legal context, rather than the model, is driving the behavior. It is real when a merge request cannot pass without a compliance report. The report should name the site label, the prompt version, and the metric that moved.

Keep the judge's rubric visible. Use an LLM-as-judge only where the rule is ambiguous, and keep the rubric tied to the site label. For clear cases, a deterministic check against the label is faster and easier to audit. A designer can then review the trust decision in the eval, not in production.

Advertisement