[Paper Review] Safeguarding Large Language Models: A Survey
A systematic literature review of LLM safeguarding guardrails, examining frameworks, evaluation metrics, attacks and defenses, and the path to a comprehensive, multidisciplinary guardrail design.
In the burgeoning field of Large Language Models (LLMs), developing a robust safety mechanism, colloquially known as "safeguards" or "guardrails", has become imperative to ensure the ethical use of LLMs within prescribed boundaries. This article provides a systematic literature review on the current status of this critical mechanism. It discusses its major challenges and how it can be enhanced into a comprehensive mechanism dealing with ethical issues in various contexts. First, the paper elucidates the current landscape of safeguarding mechanisms that major LLM service providers and the open-source community employ. This is followed by the techniques to evaluate, analyze, and enhance some (un)desirable properties that a guardrail might want to enforce, such as hallucinations, fairness, privacy, and so on. Based on them, we review techniques to circumvent these controls (i.e., attacks), to defend the attacks, and to reinforce the guardrails. While the techniques mentioned above represent the current status and the active research trends, we also discuss several challenges that cannot be easily dealt with by the methods and present our vision on how to implement a comprehensive guardrail through the full consideration of multi-disciplinary approach, neural-symbolic method, and systems development lifecycle.
Motivation & Objective
- Understand the current guardrail frameworks used to control LLM outputs across providers and open-source communities.
- Identify the desirable properties (e.g., hallucination control, fairness, privacy, robustness) and how to evaluate/enhance them.
- Review attack methods against guardrails, defenses, and reinforcement strategies to strengthen guardrails.
- Discuss challenges and propose a path toward a comprehensive, multidisciplinary guardrail design covering development lifecycle.
Proposed method
- Survey guardrail frameworks and supporting software packages (e.g., Llama Guard, Nvidia NeMo, Guardrails AI, TruLens, Guidance AI, LMQL).
- Analyze how guardrails enforce properties such as hallucination, fairness, privacy, robustness, toxicity, legality, OOD, and uncertainty.
- Examine attack, defense, and reinforcement techniques related to guardrails.
- Discuss design considerations inspired by safety-critical software standards (e.g., ISO-26262, DO-178B/C) and neural-symbolic integration.
- Highlight tooling and Python packages (LangChain, AIF360, ART, Fairlearn, Detoxify) used to implement or evaluate guardrails.

Experimental results
Research questions
- RQ1What guardrail frameworks and workflows are currently deployed for controlling LLM outputs in production and open-source contexts?
- RQ2What properties should guardrails enforce, and how can they be defined, measured, and enhanced?
- RQ3What attacks circumvent guardrails, and what strategies defend against or reinforce these guardrails?
- RQ4How can guardrails be designed as a comprehensive, multidisciplinary system spanning specification, design, implementation, integration, verification, and production?
Key findings
- Multiple guardrail solutions exist (e.g., Llama Guard, Nvidia NeMo, Guardrails AI) with varying coverage across hallucination, toxicity, legality, OOD, and uncertainty.
- Guardrails are typically one of several neural-symbolic design patterns, with loosely coupled to more integrated approaches, and lack universal reliability guarantees.
- Attacks can bypass guardrails; defenses and reinforcement strategies are active research areas requiring continual assessment and updates.
- A comprehensive guardrail requires multidisciplinary methods, neural-symbolic techniques, and a systems development lifecycle aligned with safety standards.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.