ASTRAL: Automated Safety Testing of Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have recently gained attention due to their ability to understand and generate sophisticated human-like content. However, ensuring their safety is paramount as they might provide harmful and unsafe responses. Existing LLM testing frameworks address various safety-related concerns (e.g., drugs, terrorism, animal abuse) but often face challenges due to unbalanced and obsolete datasets. In this paper, we present ASTRAL, a tool that automates the generation and execution of test cases (i.e., prompts) for testing the safety of LLMs. First, we introduce a novel black-box coverage criterion to generate balanced and diverse unsafe test inputs across a diverse set of safety categories as well as linguistic writing characteristics (i.e., different style and persuasive writing techniques). Second, we propose an LLM-based approach that leverages Retrieval Augmented Generation (RAG), few-shot prompting strategies and web browsing to generate up-to-date test inputs. Lastly, similar to current LLM test automation techniques, we leverage LLMs as test oracles to distinguish between safe and unsafe test outputs, allowing a fully automated testing approach. We conduct an extensive evaluation on well-known LLMs, revealing the following key findings: i) GPT3.5 outperforms other LLMs when acting as the test oracle, accurately detecting unsafe responses, and even surpassing more recent LLMs (e.g., GPT-4), as well as LLMs that are specifically tailored to detect unsafe LLM outputs (e.g., LlamaGuard); ii) the results confirm that our approach can uncover nearly twice as many unsafe LLM behaviors with the same number of test inputs compared to currently used static datasets; and iii) our black-box coverage criterion combined with web browsing can effectively guide the LLM on generating up-to-date unsafe test inputs, significantly increasing the number of unsafe LLM behaviors.
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 29 of its 37 references that are in the map. First posted on arXiv 28 Jan 2025.
Builds on
29 of 37 references.
References · 29
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2023Mistral 7Bcited by 3,164
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023Llama Guard: LLM-based Input-Output Safeguard for Human-AI Conversationscited by 1,207
- 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 860
- 2022Red Teaming Language Models to Reduce Harms: Methods, Scaling Behaviors, and Lessons Learnedcited by 729
17 more
- 2023"Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Modelscited by 489
- 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generationcited by 451
- 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 387
- 2024A StrongREJECT for Empty Jailbreakscited by 385
- 2024R-Judge: Benchmarking Safety Risk Awareness for LLM Agentscited by 288
- 2024SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusalcited by 240
- 2024SALAD-Bench: A Hierarchical and Comprehensive Safety Benchmark for Large Language Modelscited by 228
- 2023SafetyBench: Evaluating the Safety of Large Language Modelscited by 199
- 2023Do-Not-Answer: A Dataset for Evaluating Safeguards in LLMscited by 184
- 2024ChatQA: Surpassing GPT-4 on Conversational QA and RAGcited by 90
- 2023SimpleSafetyTests: a Test Suite for Identifying Critical Safety Risks in Large Language Modelscited by 76
- 2024SafeBench: A Safety Evaluation Framework for Multimodal Large Language Modelscited by 69
- 2024ShieldLM: Empowering LLMs as Aligned, Customizable and Explainable Safety Detectorscited by 51
- 2024Bi-Factorial Preference Optimization: Balancing Safety-Helpfulness in Language Modelscited by 27
- 2024WalledEval: A Comprehensive Safety Evaluation Toolkit for Large Language Modelscited by 17
- 2024CHiSafetyBench: A Chinese Hierarchical Safety Benchmark for Large Language Modelscited by 15
- 2024Detectors for Safe and Reliable LLMs: Implementations, Uses, and Limitationscited by 10
Built on by
Citing papers per year: 2025: 5; 2026: 2.
7 papers.
- 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injectionscited by 129
- 2025o3-mini vs DeepSeek-R1: Which One is Safer?cited by 24
- 2025Red Teaming Contemporary AI Models: Insights from Spanish and Basque Perspectivescited by 6
- 2025Is Reasoning All You Need? Probing Bias in the Age of Reasoning Language Modelscited by 4
- 2026Measuring and Exploiting Contextual Bias in LLM-Assisted Security Code Reviewcited by 3
- 2025RedTopic: Toward Topic-Diverse Red Teaming of Large Language Modelscited by 1
- 2026A Systematic Review of Algorithmic Red Teaming Methodologies for Assurance and Security of AI Applicationscited by 1
- 2026Measuring and Exploiting Contextual Bias in LLM-Assisted Security Code Review19 Mar 2026
- 2026A Systematic Review of Algorithmic Red Teaming Methodologies for Assurance and Security of AI Applications24 Feb 2026
- 2025The Attacker Moves Second: Stronger Adaptive Attacks Bypass Defenses Against Llm Jailbreaks and Prompt Injections10 Oct 2025
- 2025Is Reasoning All You Need? Probing Bias in the Age of Reasoning Language Models3 Jul 2025
- 2025RedTopic: Toward Topic-Diverse Red Teaming of Large Language Models17 Jun 2025
- 2025Red Teaming Contemporary AI Models: Insights from Spanish and Basque Perspectives13 Mar 2025
- 2025o3-mini vs DeepSeek-R1: Which One is Safer?30 Jan 2025
Similar, not cited
Close in wording, no citation either way
- 2024S-Eval: Towards Automated and Comprehensive Safety Evaluation for Large Language Models
- 2024TroubleLLM: Align to Red Team Expert
- 2024DistillSeq: A Framework for Safety Alignment Testing in Large Language Models using Knowledge Distillation
- 2025Early External Safety Testing of OpenAI's o3-mini: Insights from the Pre-Deployment Evaluation
- 2024SafetyPrompts: a Systematic Review of Open Datasets for Evaluating and Improving Large Language Model Safety
- 2025SafeLawBench: Towards Safe Alignment of Large Language Models
- 2025CASE-Bench: Context-Aware SafEty Benchmark for Large Language Models
- 2025A Data-Centric Approach for Safe and Secure Large Language Models against Threatening and Toxic Content