Guardrailing in Context: How Agentic Behavior with Policy Design Protects Users in Context

Roya Pakzad, Daniel Nissani, Lauren Mushro, Claudia Flores-Saviaga, Tanas KazlasarXiv 2026

TL;DR

Standard LLM safety benchmarks are designed to be context-agnostic, which means they often fail to catch real-world, domain-specific risks when models are deployed in high-stakes settings. This paper shows that replacing generic safety policies with bespoke, domain-specific policies—and giving the guardrail "agentic" access to external verification tools—dramatically improves both safety detection and alignment with human experts.

What Problem Does This Paper Address?

Imagine an asylum seeker asking an LLM whether they have two years or 30 days to apply for family reunification in Sweden. A generic safety guardrail, lacking legal context, might either let a dangerous hallucination slip through or block a helpful, accurate answer out of misplaced caution.

Most existing LLM guardrails are evaluated on static, context-agnostic benchmarks. While this makes them easy to test, it strips away the nuances, specific failure modes, and multilingual realities of actual production environments. The authors tackle three core questions:

  1. How do domain-specific policies improve the detection of failures missed by generic safety taxonomies?
  2. How does giving a guardrail access to external verification tools (agentic behavior) affect its decision quality?
  3. How consistent are these guardrail judgments across different languages?

Methods

The researchers conducted a mixed-methods evaluation across three high-stakes domains: Humanitarian (evaluated in English and Farsi), Financial (English and Spanish), and Social Engineering (English and Spanish).

For each scenario, they generated an assistant response using GPT-5.5 and evaluated it using Opus 4.6 acting as an LLM-as-a-Judge. Each response was tested under three conditions:

  • Generic non-agentic: A standard, domain-independent safety policy.
  • Contextual non-agentic: A bespoke policy co-authored by domain experts to reflect professional standards and specific failure modes.
  • Contextual agentic: The same bespoke policy, but the guardrail could make up to eight external tool calls (such as checking URLs, searching the web, or querying domain-specific databases like SEC EDGAR, FINRA BrokerCheck, ReliefWeb, or URLScan.io) before rendering a verdict.
Tool groups by domain

Datasets

Rather than using an existing generic benchmark like GuardBench, the authors constructed a new, bespoke corpus of 150 scenarios (25 semantically matched bilingual pairs per domain), authored by bilingual domain experts. These scenarios target realistic failure modes—such as fabricated regulations, outdated organizational details, fraudulent financial claims, and phishing indicators—and include gold-standard reference judgments from the experts.

Key Insights and Ideas

  • Generic policies are dangerously permissive: Because generic policies don't map to domain-specific risks (like missing fiduciary disclaimers in finance or failing to advise evidence preservation in phishing), they passed 100% of responses—even when those responses failed domain-specific safety criteria.
  • Tools make guardrails more permissive, in a good way: Adding tool access didn't just make the guardrail stricter; it made it smarter. Out of 170 criterion-level disagreements between the agentic and non-agentic contextual guardrails, the agentic version was more lenient 142 times—unblocking valid responses because it could actually verify claims against authoritative sources.
  • Evidence-backed reasoning builds trust: Even when the agentic and non-agentic guardrails reached the exact same final verdict, human annotators strongly preferred the agentic guardrail because it cited real evidence (e.g., confirming a .gov domain or checking a broker's license) instead of guessing or leaving rationales blank.
  • English-centric retrieval in non-English runs: While guardrail performance remained relatively consistent across languages, the agentic guardrail's Chain-of-Thought reasoning was always in English. Consequently, it overwhelmingly retrieved and cited English-language sources even when evaluating Spanish or Farsi scenarios, which slightly degraded annotator trust.

Key Results

  • Pass Rates: Under the generic policy, 150/150 responses passed (average score: 0.973). Switching to the contextual non-agentic policy dropped the pass rate to 103/150 (0.598), catching numerous domain-specific violations. Adding agentic tool access brought the pass rate back up to 134/150 (0.741) by verifying legitimate claims.
150 assistant responses under three conditions
  • Human Preference: Overall, expert annotators preferred the agentic guardrail 77.5% of the time (117 out of 151 comparisons), compared to just 10 for the non-agentic guardrail (with 24 ties).
Annotator preference by domain and language
  • Multilingual Retrieval Gap: Across the three non-English runs, only 31 out of 1,120 retrieved documents—and just 5 out of 215 cited documents—were actually in the language of the scenario.

Limitations and Future Work

The authors note three main limitations:

  1. The scenarios and policies were designed by the same experts, which could risk overfitting (though little evidence of this was found).
  2. Each data point was reviewed by a single domain expert, preventing inter-rater agreement calculations.
  3. Only one model backend (Opus 4.6) was used as the judge.

For future work, the authors suggest testing frontier and local models as judges, ranking retrieved sources by estimated reliability before they reach the judge, and exploring ways to reduce the high token costs of agentic guardrailing—such as distilling repetitive tool-use workflows into deterministic scripts.

Summary updated

BibTeX
@misc{pakzad2026guardrailing,
  author = {Roya Pakzad and Daniel Nissani and Lauren Mushro and Claudia Flores-Saviaga and Tanas Kazlas},
  title = {{Guardrailing in Context: How Agentic Behavior with Policy Design Protects Users in Context}},
  year = {2026},
  eprint = {2612.02844},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.02844},
}
Figure