Specification-Based Testing of Large Language Models
On the map: LLM safety and security → Safety alignment, refusal and guardrails
Abstract (arXiv)
Model cards, system cards, and safety reports increasingly document LLM safety behaviors, yet safety evaluations typically start from predefined benchmarks rather than asking which documented claims those benchmarks actually test. We introduce LEST (LLM Evaluation through Specification-driven Testing), a framework that treats documented safety claims as specifications for black-box testing. In LEST, each claim determines which benchmark prompt tests it and whether a Refuse-to-Comply transition, where a model refuses a prompt but complies with its mutated version, counts as evidence against it. LEST mutates these prompts to search for counterexamples, manually validates each candidate, and traces validated counterexamples back to the claims they contradict. We evaluate LEST using the system cards of Claude Opus 4.8 and GPT-5.5 with 97 seed prompts from SORRY-Bench across Mental Health and Self-Harm, Harmful and Violent Content, and Fairness and Bias. Of 56 identified safety claims, 29 (51.8%) are prompt-testable, but only 17 (58.6%) are exercised by an applicable benchmark prompt. Both models refuse >95% of benchmark prompts. Evaluating 1,836 mutated prompts on both models reveals 312 candidate Refuse-to-Comply transitions flagged by automated response classifiers. However, human validation confirms only 19 (6.1%) as both intent-preserving and genuinely compliant, showing automated evaluation substantially overestimates behavioral failures. Tracing these 19 transitions back to the claims reveals counterexamples for 6 of 9 covered claims for which refusal is an applicable oracle. Our results show that benchmark prompts may not be sufficient to validate all documented LLM safety behavior, and automated failure detection requires manual validation. LEST provides end-to-end traceability from natural-language safety documentation to executable tests and human-validated counterexamples.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 22 of its 49 references that are in the map. First posted on arXiv 10 Oct 2026.
Builds on
22 of 49 references.
Closest ancestors · 4
Same direction, newest first
- 2025Qwen3Guard Technical Report16 Oct
- 2025SAGE: A Generic Framework for LLM Safety Evaluation28 Apr
- 2025GuardReasoner: Towards Reasoning-based LLM Safeguards30 Jan
- 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMs26 Jun
Other references · 18
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
- 2018Model Cards for Model Reportingcited by 1,080
- 2022Red Teaming Language Models with Language Modelscited by 1,026
- 2018Neural Network Acceptability Judgmentscited by 958
- 2021BBQ: A Hand-Built Bias Benchmark for Question Answeringcited by 701
- 2023State of What Art? A Call for Multi-Prompt LLM Evaluationcited by 310
- 2016Counter-fitting Word Vectors to Linguistic Constraintscited by 140
- 2017Fairness Testing: Testing Software for Discriminationcited by 126
- 2023The language of prompting: What linguistic properties make a prompt successful?cited by 44
6 more
- 2021BiasFinder: Metamorphic Test Generation to Uncover Bias for Sentiment Analysis Systemscited by 24
- 2024PAPILLON: Efficient and Stealthy Fuzz Testing-Powered Jailbreaks for LLMscited by 21
- 2016Rapid quality assurance with Requirements Smellscited by 12
- 2025TurboFuzzLLM: Turbocharging Mutation-based Fuzzing for Effectively Jailbreaking Large Language Models in Practicecited by 6
- 2025Model Cards Revisited: Bridging the Gap Between Theory and Practice for Ethical AI Requirementscited by 4
- 2024Natural Language Requirements Testability Measurement Based on Requirement Smellscited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025ASTRAL: Automated Safety Testing of Large Language Models
- 2026The Refusal--Compliance Tradeoff: A Large-Scale Safety Behavior Audit of Large Language Models
- 2026When Behavioral Safety Evaluation Fails: A Representation-Level Perspective
- 2026Who Tests the Testers? Systematic Enumeration and Coverage Audit of LLM Agent Tool Call Safety
- 2026When No Benchmark Exists: Validating Comparative LLM Safety Scoring Without Ground-Truth Labels
- 2025Measuring What Matters: A Framework for Evaluating Safety Risks in Real-World LLM Applications
- 2024Large-scale, Independent and Comprehensive study of the power of LLMs for test case generation
- 2026Evaluating LLM Safety Under Repeated Inference via Accelerated Prompt Stress Testing