Paper commentary
Risk-certified prompt optimization for LLM-as-a-judge guardrails
- Problem A judge prompt must block attacks while passing as much benign traffic as possible, but average-score prompt optimizers give no finite-sample guarantee on the missed-attack rate.
- Method CPS certifies a fixed pool of GEPA-generated prompts with Clopper–Pearson bounds and Bonferroni correction, while CRISP sends Guess-and-Check certificates back into rewriting so that the search can reach certifiable prompts.
- Results On untouched test splits, every certified prompt-injection configuration in Table 1 keeps its missed-attack rate at or below the target alpha; CRISP with gpt-4o-mini on BIPIA at alpha 0.20 reaches a missed-attack rate of 0.11 and utility of 0.86.

Figure 2 : CRISP: adaptive prompt search with reusable-holdout risk certification.
Original paper · CC BY 4.0 · Hussein Jawad, Alexandre Landeau, Guy Fleury Iradukunda, Paul Beaumont, Théodore Rezel, Sofiane Schaack, Nicolas J-B. Brunel · Risk-certified prompt optimization for LLM-as-a-judge guardrails · Original paper figure · Extracted the figure area from page 7 of the original PDF.Why a judge prompt needs a risk cap
An LLM-as-a-judge guardrail is a general-purpose language model whose system prompt alone decides whether an input is blocked or allowed, with the model weights left untouched. The prompt tells the model how to read a safety policy and to answer with a binary decision such as BLOCK or ALLOW.
The two kinds of error carry different costs. A malicious request that gets through can expose the underlying system, whereas a wrongly blocked benign request mainly reduces usability. Minimizing average classification error therefore misses the point for many deployments. A designer is better served by fixing a tolerable missed-attack rate and asking for as much benign traffic as possible below that cap.
This turns guardrail design into a constrained problem: the benign pass rate is maximized while the missed-attack rate stays below alpha. The cap must hold on fresh inputs from the deployment distribution, not only on the development data. Risk control is the requirement that the deployed guardrail has risk at most alpha with probability at least 1 minus delta over the calibration data.
Distribution-free risk control is well developed when the classifier exposes a continuous score, because a threshold can be swept on held-out data and the most permissive value that survives a statistical test is kept. The system prompt then becomes the only control surface. Risk control turns into a search over a discrete, unordered space of prompts, which is harder than tuning a threshold.
None of them enforces a missed-attack cap or gives a finite-sample guarantee that the deployed prompt meets it, so they serve here as candidate generators while the constraint is imposed separately.
Terms behind the certificate
Each query x has a label y, where y equal to 1 marks a malicious input that must be blocked and y equal to 0 marks a benign input that must pass. For a prompt p, the judge outputs f(p, x), with 1 for block and 0 for pass. Decoding is greedy at temperature 0, so a given prompt and input always produce the same decision.
The risk R(p) is the probability that a malicious input passes, conditioned on y equal to 1, and the utility U(p) is the probability that a benign input passes, conditioned on y equal to 0, both under the input distribution pi.
On a finite sample Dn, the same quantities are counted directly. Rb divides the number of malicious inputs that pass by the number of malicious inputs, and Ub does the same for benign inputs.
If pi were known, the target would be the prompt that maximizes U(p) among prompts whose R(p) is at most alpha, where alpha lies in the open interval from 0 to 1. Since pi is unknown, the aim becomes a data-dependent prompt that achieves high benign utility while keeping the risk constraint with probability at least 1 minus delta.
Definition 1 formalizes this as (alpha, epsilon, delta)-validity. A procedure returns a candidate set and a deployed prompt, and with probability at least 1 minus delta every candidate must meet the risk level while the deployed prompt's utility stays within epsilon of the best candidate's utility.
The risk bound is the Clopper–Pearson upper confidence bound at failure level beta. It equals the inverse beta quantile at 1 minus beta with parameters k plus 1 and m minus k, where m is the number of malicious examples and k is the number of missed attacks. The guarantee relies on Assumption 1: conditional on the label counts, the malicious and benign certification subsamples are independent i.i.d.
draws from pi given y equal to 1 and pi given y equal to 0.
CPS: certify a fixed pool
The development data is split into three disjoint parts: a training part for the generator, a certification part used only for certification and prompt selection, and a test part used only for final evaluation. CPS keeps generation and certification strictly apart, so the candidate pool is fixed before any certification statistic is computed.
CPS draws N bootstrap resamples of size B from the training data and runs GEPA on each one, producing a pool of N prompts. The experiments set N to 20 and use gpt-5.4-mini as the generator.
Each pool prompt receives a Clopper–Pearson upper bound on the held-out malicious examples, computed at the Bonferroni-corrected level delta_R over N. Prompts whose bound is at or below alpha form the certified set. The returned prompt is the certified candidate with the highest empirical benign utility, computed on the benign part of the certification set.
Proposition 1 states that with probability at least 1 minus delta_R minus delta_U, the selected prompt keeps R at most alpha and its utility is within epsilon_U of the best certified prompt's utility. Here epsilon_U equals the square root of 2 log(2N over delta_U) divided by b, where b is the number of benign certification examples. If the certified set is empty, CPS abstains and the statement counts as satisfied.
CRISP: certificates steer the search
CPS can only certify prompts already in its pool, so if none of them combines low risk with high utility, certification cannot produce one. This is the generation gap that CRISP targets. CRISP sends risk certificates back into generation, so the search moves toward high-utility prompts near the boundary of the certified region.
The search keeps two populations. The certified population holds prompts whose bound is at or below alpha and is pushed toward higher utility, while the uncertified population is pushed toward lower violation. The design is inspired by FI-2pop, so feasible prompts keep improving while promising infeasible prompts move toward certification.
Every proposed prompt is evaluated by Guess-and-Check. The Guess step computes a Clopper–Pearson bound on the training split, and if that bound already exceeds alpha, the prompt is rejected with return value 1 without touching the holdout. Otherwise the Check step computes the corresponding bound on the malicious holdout. If the training bound is strictly more conservative, only that training-side bound is released, so the holdout reveals nothing beyond the fact that the check passed.
When the check fails, the procedure releases a holdout estimate coarsened to a grid and charges one failure against the budget. Confidence levels are split across checks and failures with summable weights. Once no valid grid step remains, the reusable-holdout budget is spent, Guess-and-Check returns bottom, and CRISP stops.
Validity under adaptivity follows because the malicious holdout is only seen through these restricted outputs, and risk depends on malicious examples alone, so the benign certification examples are never read during search. Final selection takes the certified prompts of the last pool, at most 2T plus 1 of them, and returns the one with the highest benign utility on the benign certification set.
Proposition 2 has the same form as Proposition 1, with K equal to 2T plus 1 inside the epsilon term and the same probability bound of 1 minus delta_R minus delta_U.
Datasets and comparison setup
Each dataset is split into disjoint training, certification and test parts. Training data serves only generation and rewriting, certification data serves certification and selection, and test data serves final evaluation. The failure level is delta equal to 0.10. Prompt-injection results are reported at alpha equal to 0.10, 0.20 and 0.30, and output-guardrail results at alpha equal to 0.30.
Baselines are the unoptimized Naive prompt, the average-score optimizers ProTeGi, GEPA and MIPROv2, and for prompt injection the classifier guardrails ProtectAI, PIGuard, Prompt Guard and Model Armor.
Missed-attack rates on untouched test data
These configurations cover two LLM judges, two datasets, three risk levels and two methods.
The same pattern holds on both output-guardrail tasks at alpha equal to 0.30, as Table 2 shows.
Unconstrained baselines provide no comparable guarantee.
Setting the risk level
The Table 1 entry for CRISP with gpt-4o-mini on BIPIA at alpha 0.10 reports a missed-attack rate of 0.02 with that utility.
Test risk generally increases with alpha but stays within the target, so the risk level works as a control knob for the safety-usability trade-off.
Why fixed pools come up empty
The main difference between CPS and CRISP is whether any certified prompt exists. CPS returned an empty certified set in four of the twelve prompt-injection settings, while CRISP certified a prompt in all twelve.
The authors attribute the CPS failures to two causes: finite-sample uncertainty makes certification conservative, or the generator does not explore enough low-risk prompts. CRISP addresses this by using risk feedback to steer generation toward candidates that can be certified.
Classifiers and average-score baselines
PIGuard is the strongest classifier baseline on prompt injection, and CPS and CRISP match its performance without fine-tuning. At alpha 0.20 on BIPIA, CRISP with gpt-4o-mini reaches a missed-attack rate of 0.11 and utility of 0.86, against PIGuard's 0.15 and 0.86.
At alpha 0.20 on BIPIA with gpt-4o-mini, CPS and CRISP both reach a missed-attack rate of 0.12 and 0.11 with utility 0.86, compared with ProTeGi's 0.19 and 0.80.
On Deepset with gpt-5.4-mini, CRISP at alpha 0.20 reaches a missed-attack rate of 0.05 and utility of 0.99, against 0.15 and 1.00 for GEPA and 0.11 and 0.99 for ProTeGi. Its utility sits at the level of those two baselines while its risk is lower.
On the output guardrails, certified selection does not dominate the unconstrained baselines. The authors read the main benefit in this regime as certified feasibility rather than a uniformly better frontier.
Best-of-N robustness diagnostic
The evaluation uses gpt-4o-mini as the judge on BIPIA. As N grows, MIPROv2 reaches a missed-attack rate of 0.8 at N equal to 40, and GEPA reaches 0.8 at N equal to 100.
CRISP at alpha 0.10 stays at or below 0.07 through N equal to 100, below the dotted alpha 0.10 reference line. The authors present this as a robustness diagnostic outside the certificate, since the certification guarantee does not extend to multi-query attacks.
Limitations
A shift in the attack mix, the user population or the judge model can invalidate the certificate, and the bound does not cover adaptive adversaries.
Both procedures need labeled malicious and benign data.
Demographic fairness of over-blocking was not studied, and utility as an aggregate benign pass rate may hide unequal error rates across user groups.
Paper info
- Authors
- Hussein Jawad, Alexandre Landeau, Guy Fleury Iradukunda, Paul Beaumont, Théodore Rezel, Sofiane Schaack, Nicolas J-B. Brunel
- Venue
- arXiv · Preprint
- First published
- 2026-11-15
- Added
- 2026-11-17
- Updated
- 2026-11-15
- Version
- v1
- arXiv
- 2611.20156
- Category
- cs.CL · cs.LG
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
LLM-as-a-judge guardrails are often controlled primarily through system prompts, yet standard prompt optimization methods target average performance rather than explicit safety constraints. This paper studies system-prompt selection as a constrained optimization problem: maximize benign pass rate while keeping the missed-attack rate below a user-specified level α with finite-sample statistical control. The framework combines LLM-based judging, automatic prompt generation, and distribution-free risk certification. This work instantiates it in two procedures: CPS and CRISP. CPS generates a fixed pool of prompts from training data, then certifies candidates on a held-out evaluation set using simultaneous upper confidence bounds and selects the certified prompt with the highest benign utility. CRISP instead integrates risk feedback into an adaptive search, using hard example-guided rewriting and a reusable-holdout interface to steer generation toward the feasible utility frontier. Experiments on four datasets covering prompt injection, system-prompt leakage, and sensitive-information disclosure show that risk-certified selection consistently respects the target missed-attack level on heldout tests, while utility improves as the permitted risk is relaxed. CRISP is especially useful when fixed-pool search fails to produce certifiable high-utility candidates.
Quote from the paper
Hussein Jawad, Alexandre Landeau, Guy Fleury Iradukunda, Paul Beaumont, Théodore Rezel, Sofiane Schaack, Nicolas J-B. Brunel (2026). Risk-certified prompt optimization for LLM-as-a-judge guardrails. arXiv:2611.20156v1. https://arxiv.org/abs/2611.20156v1
BibTeX
@misc{jawad2026risk,
title = {{Risk-certified prompt optimization for LLM-as-a-judge guardrails}},
author = {Hussein Jawad and Alexandre Landeau and Guy Fleury Iradukunda and Paul Beaumont and Théodore Rezel and Sofiane Schaack and Nicolas J-B. Brunel},
year = {2026},
eprint = {2611.20156},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.20156v1}
}