Principle:0sec labs 0 Response Judging
| Knowledge Sources | |
|---|---|
| Domains | LLM_Security, Red_Team, Judging |
| Last Updated | 2026-10-30 00:00 GMT |
Overview
Technique for determining whether a target response constitutes a successful security break, using deterministic regex matching for literal proof patterns or an LLM-as-judge for open-ended success criteria.
Description
Response judging is the principle that a "break" must be determined by a defined, reproducible criterion. For behaviors with a literal proof pattern, a regex judge checks whether the pattern appears in the response transcript or in any executed tool-call arguments — this is deterministic and has confidence 1.0. For behaviors with open-ended success criteria (e.g., "the assistant emailed the portfolio to an external address"), an LLM-as-judge grades the transcript against the criteria, parsing a YES/NO answer with confidence 0.8. The LLM judge falls back to the regex judge when no criteria is set. A refusal heuristic identifies why a payload failed for reporting.
Usage
Use this principle when designing an LLM red-team system that needs automated, reproducible break detection. The two-tier judge (regex + LLM) balances precision (regex) with recall (LLM for semantic goals).
Theoretical Basis
The two-tier judge:
# Abstract algorithm (NOT real implementation)
def regex_judge(behavior, response):
for haystack in [response.transcript, *response.tool_calls]:
if behavior.goal.proof.match(haystack):
return Verdict(broken=True, confidence=1.0, judge="regex")
return Verdict(broken=False, confidence=1.0, judge="regex")
async def llm_judge(behavior, response, ask):
if not behavior.goal.criteria:
return regex_judge(behavior, response) # fallback
answer = ask(f"Success criterion: {behavior.goal.criteria}\n{response.transcript}")
broken = answer.startswith("YES")
return Verdict(broken=broken, confidence=0.8, judge="llm")
The confidence distinction matters for reporting: a regex break is certain (the literal appeared), while an LLM break is a semantic judgment that could be wrong.