Part of Language AI Handbook
Examines harmful content categories, misuse scenarios, unintended harms, and structured threat models for reasoning about safety in language AI systems.
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Safety Risks
Language models are powerful tools for generating fluent, contextually appropriate text at scale. That same capability, however, creates a range of safety risks that did not exist with earlier software systems. A search engine retrieves existing documents; a language model generates new content. This generative flexibility is what makes language models useful, and it is also what makes them dangerous when things go wrong.
Safety risks in language models span a wide spectrum. At one end, a model might produce content that is merely unhelpful or mildly inappropriate. At the other end, outputs can facilitate real harm: instructions for synthesizing dangerous substances, content that sexually exploits minors, personalized manipulation that exploits psychological vulnerabilities, or large-scale disinformation. Between these extremes sits a vast grey zone, where context, intent, and consequences determine whether a given output causes harm.
Understanding safety risks requires thinking about language models differently from the way we think about conventional software. A database query either returns the correct rows or it does not. A sorting algorithm either produces a sorted list or it does not. A language model generates text that exists on a continuous spectrum of helpfulness, accuracy, and potential for harm, and that spectrum interacts with the intentions of the person making the request and the population of people who will encounter the output. This makes safety an inherently probabilistic, contextual, and value-laden problem rather than a binary correctness problem.
This chapter surveys safety risks in language AI. You will learn how to categorize harmful outputs, understand the threat models that researchers and practitioners use to reason about misuse, and appreciate why safety is a hard technical and social problem rather than a straightforward engineering task. Subsequent chapters in this part will cover red teaming, jailbreaking, prompt injection, content filtering, and guardrails as practical tools for addressing these risks.
Categories of Harmful Content
Safety research typically organizes potential harms by content type. Each category has different root causes, different affected populations, and different mitigation strategies. Organizing the space this way is useful for two reasons: it helps developers decide what training-time interventions to apply, and it helps deployment teams decide what filters and safeguards to implement. These categories are not mutually exclusive. The same request can straddle multiple categories, and categorization does not resolve the deeper question of whether a given output is harmful in context.
Violent and Threatening Content
Language models can generate text that threatens specific individuals or groups, glorifies violence, or provides tactical planning for violent acts. The concern here is not that models produce fiction involving conflict, because literature has always explored violence, but that they can generate credible, personalized, and actionable threats. A model that can compose a menacing letter addressed to a specific person, complete with references to that person's known circumstances, enables a category of targeted harassment that would have required substantially more effort before language AI.
The practical concern extends beyond direct threats. Models can assist in planning harassment campaigns, generating large volumes of coordinated threatening messages, or crafting content designed to make specific individuals afraid for their safety. The scale afforded by language models turns what was once a labor-intensive activity into one that a single motivated individual can sustain indefinitely.
The line between fictional violence and harmful output is difficult to draw algorithmically. A thriller novel requires the same linguistic patterns as a credible threat. A military history textbook describes tactics in the same vocabulary as an attack planning document. A self-defense manual and an assault guide share structural similarities. This ambiguity is one reason why content-level classification alone is insufficient as a safety strategy: the same token sequence can be harmful or entirely benign depending on context, intent, and likely readers.
Sexual Content Involving Minors
Child sexual abuse material (CSAM) and its AI-generated analog represent the clearest categorical harm in language AI. There is no legitimate use case for this content. Both the training data curation and the output filtering literature treat this as a hard constraint rather than a contextual tradeoff. The categorical nature of this restriction reflects a settled ethical and legal judgment rather than a technical calibration decision.
Models used in applications accessible to minors face additional surface area beyond CSAM. Age-inappropriate sexual content in general requires careful management, and the boundary between age-appropriate and age-inappropriate content shifts with the audience. A romance novel appropriate for adult readers may be inappropriate for a children's educational platform. Operators deploying models in contexts with minor users must configure conservative content restrictions and cannot rely on the model's training-time calibration alone, because that calibration was designed for average adult users rather than specifically for child audiences.
The AI-generated CSAM problem extends beyond text. As multimodal models capable of generating images and video continue to improve, the same categorical harm arises in non-textual form. Text-generating models can also facilitate image-based CSAM indirectly by writing detailed descriptions that are then used to guide image generation. Safety teams working on this category must therefore reason about model capabilities across modalities even when their primary focus is text.
Chemical, Biological, Radiological, and Nuclear (CBRN) Uplift
One of the most widely discussed threat scenarios in AI safety research concerns whether language models can provide meaningful "uplift" to actors seeking to develop weapons capable of mass casualties. The concern is that a model trained on vast scientific literature might synthesize and present synthesis routes, acquisition strategies, or weaponization techniques that would otherwise require specialized expertise.
The term "uplift" captures the key question precisely: not whether the model can produce relevant content, but whether it makes it easier for a non-expert to cause harm. A model that explains the general classes of toxic industrial chemicals available does not provide much uplift to a nation-state with a mature chemical weapons program. A model that walks through specific synthesis procedures for nerve agents, explains how to stabilize them, and describes optimal delivery mechanisms does provide meaningful uplift to actors who lack that specific knowledge.
The empirical evidence for this risk has several qualifications. Early studies suggested that frontier models could provide some uplift to bioweapons development for users with some background knowledge, but that the incremental risk beyond what a motivated expert could find in scientific literature was limited. More recent work suggests the risk may be growing as models improve and as their ability to synthesize cross-domain knowledge increases. For regulators and model developers, this category receives special treatment because even a small probability of mass-casualty facilitation warrants significant precaution. The asymmetry matters here: the cost of refusing to answer CBRN questions is measured in inconvenienced researchers, while the cost of enabling a mass-casualty event is measured in lives.
The dual-use nature of biological and chemical research creates difficult tradeoffs. The same knowledge that enables vaccine development also enables pathogen engineering. The same understanding of toxic chemicals that protects workers also informs weaponization. Scientists engaged in legitimate defensive research need access to detailed technical information. The safety challenge is distinguishing between users who need this access legitimately and users who seek it for harmful purposes, often without any way to verify the distinction.
Disinformation and Manipulation
Language models excel at producing persuasive text in the style of credible sources. This capability directly enables disinformation at scale: fabricated news articles, synthetic social media personas, personalized political messaging, fake reviews, and manipulative health misinformation. The concern extends beyond individual pieces of false content to the potential for coordinated campaigns that exceed what small human teams could produce.
Before language AI, producing large volumes of convincing disinformation required either many human operators or accepting lower quality. A team of ten people could produce perhaps a few dozen believable fake news articles per day, and the quality would be constrained by the time available to research and write each piece. Language models remove both constraints simultaneously. A single operator with access to a capable model can generate hundreds of high-quality, stylistically varied, and factually plausible-sounding disinformation pieces per hour.
The manipulation risk extends beyond factual disinformation. Models can generate content designed to exploit emotional vulnerabilities: fear, anger, tribalism, nostalgia. They can produce text tailored to specific demographic profiles that targets the particular biases and concerns of that audience. When combined with profiling data from other sources, this creates an asymmetric capability that a small number of actors can deploy against large populations. The recipient of a targeted manipulation campaign cannot easily detect that the message was crafted specifically to exploit their particular psychological profile.
Health misinformation deserves special attention because it translates directly into mortality. A model that generates convincing pseudoscientific explanations for why vaccines cause harm, or that presents fabricated clinical evidence for dangerous remedies, can influence medical decisions with life-or-death consequences. The fluency and apparent authority of language model outputs makes this particularly dangerous: readers who would correctly evaluate a crude claim may be persuaded by a sophisticated, citation-laden version of the same claim.
Hate Speech and Discrimination
Models can generate content that denigrates people based on protected characteristics, reinforces stereotypes, or advocates for discriminatory policies. As we discussed in Part LVIII on Bias and Fairness, language models absorb statistical patterns from their training corpora, including the biases and prejudices present in human-generated text. Safety systems must distinguish between content that analyzes hate speech, which is educational and legitimate, and content that perpetrates it, which causes direct psychological harm and contributes to environments where discrimination is normalized.
The complexity here includes the fact that "hate speech" is not a culturally universal category. Content that is broadly acceptable in one context may be deeply harmful in another. Multilingual models face particular challenges because their safety training data may be heavily skewed toward English-language norms, leaving them poorly calibrated for detecting or refusing harmful content in other languages. A model might reliably refuse to generate anti-Semitic content in English while producing equivalent content in Arabic or Portuguese because the training signal for those languages was sparser.
There is also a legitimate speech dimension to this challenge. Documenting historical hate speech for educational purposes, analyzing extremist rhetoric to understand radicalization, writing counter-arguments to discriminatory positions, and creating fiction that portrays prejudice as a social problem all require engaging with the very content that safety systems are designed to block. The challenge is designing systems that can distinguish between these uses contextually rather than blocking them categorically.
Privacy Violations
Language models can be prompted to assist in stalking, doxxing (publicly revealing private information about individuals), or identity fraud. They can also memorize and reproduce personally identifiable information from their training data. The privacy risk has two faces: models as tools for privacy violation, where a user directs the model to help find or compile information about a target, and models as sources of private information that leaked from training data into model weights. The latter risk is covered in depth in the chapter on Memorization and Privacy; this chapter focuses primarily on the former.
The tool-for-privacy-violation scenario includes helping users compile aggregated profiles of individuals from public sources, writing convincing social engineering scripts to extract information from targets, generating realistic-sounding documents for identity fraud, or providing guidance on surveillance techniques. These capabilities exist in public resources as well, but the ability to fluently synthesize them into an actionable plan can give actors with limited expertise a substantial advantage.
A subtle privacy risk involves what is sometimes called the "1000 users" framing. When thinking about whether to assist with a privacy-adjacent request, consider the realistic population of users making that request. A question about how to find someone's home address is made by some users who have legitimate purposes, some who are in dangerous domestic situations and trying to locate a family member, and some who intend to harm the person they are locating. The model's response to any given instance effectively applies to the entire population making that request, and the relative proportions of these different users determines whether providing or withholding the information is the better policy.
Self-Harm and Crisis Content
Models deployed in consumer applications can encounter users in acute mental health crises. Generating content that provides methods for self-harm, validates suicidal ideation without appropriate safety resources, or amplifies dangerous eating disorder behaviors represents a concrete pathway to real-world harm. The challenge is that a blanket refusal to discuss mental health topics would harm the users who need support, while poorly calibrated responses can make things worse for vulnerable individuals.
Safe messaging guidelines developed by mental health organizations provide partial guidance here, but they were designed for human counselors rather than AI systems operating at scale across diverse cultural contexts. The guidelines specify communication approaches designed to reduce risk without abandoning someone in crisis. Applied to AI, this means acknowledging distress, giving crisis resources, avoiding giving methods, and not dismissing the person's experience. But the guidelines leave many edge cases unresolved, and AI systems face contexts that human counselors rarely do, such as anonymous users at global scale in languages and cultural contexts where the guidelines were not developed.
The recovery and harm reduction communities present an additional complexity. Detailed discussions of self-harm methods, substance use practices, or eating behaviors can be appropriate and even beneficial in specific harm-reduction contexts where the goal is keeping people safe while they work toward recovery. The same content is harmful in other contexts. Context-sensitive safety calibration is especially important in this category because the stakes for getting it wrong in either direction, excessive restriction that abandons someone who needed help, or harmful content that facilitates harm, are both high.
Misuse Scenarios
Cataloging content types is necessary but insufficient for understanding safety. The same piece of text can be harmful or benign depending on who generates it, why, and what they do with it. Safety threat modeling requires reasoning about actors, capabilities, intent, and deployment context simultaneously.
The Dual-Use Problem
Nearly all knowledge is dual-use. Chemistry enables medicine and weapons. Biology enables vaccines and bioterrorism. Cybersecurity knowledge enables defense and attack. Cryptography enables privacy and money laundering. Language models inherit the dual-use nature of the information they contain and the skills they can apply.
This is not a new problem. Libraries have long wrestled with making dangerous information available while managing potential misuse. Publishers, search engines, and content platforms have developed their own approaches. What is new with language models is the synthesis capability: the ability to combine information from many sources into a coherent, specific, and actionable response tailored to a particular request. A library contains books about chemistry, but it does not combine them on request into a synthesis plan optimized for a specific user's situation. A language model can.
A useful framing comes from information security: the threat model. A threat model specifies who the adversary is, what resources and capabilities they have, what they want to achieve, and what barriers currently exist between them and their goal. Safety interventions can then be evaluated by how much they raise those barriers for the adversary without excessively impeding legitimate users.
A threat model is a structured analysis of potential adversaries, their capabilities, their goals, and the attack surfaces they might exploit. In language AI safety, threat models help teams reason about who is likely to attempt misuse, what assistance they need from a model to succeed, and how much uplift a model would provide relative to what the adversary could accomplish without it.
A complete threat model for a deployed language model would specify multiple adversary types, ranging from curious users who stumble into sensitive territory, to low-skill opportunistic attackers, to sophisticated nation-state actors with significant resources. Each adversary type has different capabilities, different goals, and is deterred or enabled by different safety measures. A safety intervention that effectively stops curious exploration may have no effect on a sophisticated adversary who understands the safety system's architecture and can systematically probe for weaknesses.
Uplift and Counterfactual Impact
The concept of uplift measures how much a language model increases an adversary's capability to cause harm compared to what they could achieve without the model. A model that helps a sophisticated state actor slightly improve an already well-developed bioweapons program provides little uplift but still raises serious concerns. A model that enables someone with no chemistry background to produce a dangerous substance from readily available precursors provides substantial uplift.
Uplift is closely related to counterfactual impact: would the harm have occurred anyway without the model's assistance? If the same information is freely available in Wikipedia, refusing to provide it in a different format has minimal counterfactual impact. If the model synthesizes disparate pieces of information in ways that were not previously accessible to someone without deep domain expertise, the counterfactual impact is higher.
These concepts matter because they help calibrate the tradeoffs between safety and usefulness. Restricting access to content with low counterfactual impact imposes real costs on legitimate users while providing minimal safety benefit. Every refusal is a cost paid by the population of users making similar requests, and that cost is only justified when the safety benefit is commensurate. A model that refuses to explain what SQL injection is provides no safety benefit (that information is in countless tutorials, textbooks, and security courses) while failing developers who need to understand vulnerabilities to write more secure code.
The relationship between uplift and availability is not static. As information becomes more or less widely available over time, the counterfactual impact of model-generated content changes. Synthesis routes for some compounds that were once restricted have appeared in public literature and are now widely searchable. Conversely, detailed information about emerging pathogens may become more sensitive as research progresses. Safety calibrations that were appropriate at one point in time may need to be updated as the available information changes.
Low-Skill, High-Volume Threats
One underappreciated misuse pattern involves automating tasks that were previously bottlenecked by human effort. A skilled attacker might have been able to write fifty convincing phishing emails per day. With language model assistance, the same attacker might generate fifty thousand. The harm is not that the model enables unprecedented types of attack, but that it removes the scale constraint.
This pattern applies broadly: fraud, scams, harassment campaigns, spam, coordinated inauthentic behavior on social platforms, fake reviews, and astroturfing all benefit from scale. The concern extends beyond individual harms to the degradation of information environments when malicious content floods channels faster than humans can detect or moderate it. Email spam filters learned to handle high-volume, low-sophistication attacks, but language models enable high-volume attacks that are also individually sophisticated, personalized, and harder to detect with pattern-matching approaches.
The economics of content generation shift dramatically when language models enter the picture. Producing a convincing personalized scam message that references the recipient's professional background, recent public activity, and known interests would require significant human research and writing time. A language model can produce such a message in seconds, given basic information about the target. This cost reduction translates directly into higher attack volumes and more sophisticated targeting.
The social cost of high-volume manipulation extends beyond its direct victims. When a substantial fraction of online content is machine-generated for manipulative purposes, trust in online communication degrades for everyone. People become more skeptical of messages from strangers, which imposes costs on legitimate communication, and more susceptible to manipulation by actors who exploit that cynicism in targeted ways.
Sophisticated Adversarial Attacks
At the other end of the skill spectrum, sophisticated actors may use language models in combination with other capabilities: automated red teaming to find prompt injection vulnerabilities, model-assisted social engineering, or using one model to generate adversarial inputs that bypass another model's safety filters. This category requires safety strategies that are robust to adversaries who understand how the safety systems work and are actively trying to circumvent them.
The adversarial dynamics here are related to the arms race dynamics we see in other security domains. Spam filters and spammers have been in continuous competition for decades, with each improvement in detection prompting corresponding improvements in evasion. AI safety systems face a similar dynamic: as safety training improves, adversaries who care enough will find new approaches to bypass it. This is not an argument against investing in safety, but it is an argument for treating safety as an ongoing process rather than a solved problem.
Sophisticated adversarial attacks on language models often exploit the gap between a model's training distribution and adversarial inputs. A model trained to refuse requests for harmful content will be trained on specific patterns of harmful requests. Adversaries can rephrase those requests in ways that preserve the harmful intent while avoiding the specific patterns the model was trained to recognize. This is the mechanism behind many jailbreaking techniques, which we will cover in detail in the chapter on Jailbreaking in this part.
Accidental Misuse and Misapplication
Not all harmful use is intentional. A developer might deploy a general-purpose language model in a mental health application without appropriate safeguards. A company might use model-generated content in high-stakes decisions without human oversight. A user might follow model-generated medical advice that is subtly wrong for their individual circumstances.
These accidental or negligent misuses are often harder to address through model-level safety training than intentional malicious use. A model cannot easily distinguish between a developer who has deliberately disabled safeguards and one who simply failed to configure appropriate restrictions. Model-level safety provides a baseline, but deployment-level safeguards, product design, and organizational practices are essential for preventing accidental harm.
Automation bias is a particularly important category of accidental misuse. When a model produces confident-sounding output, users tend to trust it even when they would not trust a human expert stating the same thing with equivalent uncertainty. This asymmetric trust leads to over-reliance in high-stakes domains where language models are not reliable enough to be trusted without verification: medical diagnosis, legal advice, financial planning, and engineering safety calculations. The harm arises not from the model doing something it should not, but from users trusting it more than is warranted.
The deployment gap between a model's intended use and its actual use is also a source of accidental misuse. A model designed for creative writing assistance may end up being used for psychological counseling by users who find it accessible and non-judgmental. A model designed for code generation may end up answering questions about medication when a user asks a question it can plausibly answer. The model does not know what it was designed for; it responds to the input it receives. Safety design must account for this gap.
Unintended Harms
Beyond deliberate misuse, language models can cause harm through failures of alignment between the model's behavior and what would benefit users and society. These unintended harms arise from the training process, the deployment context, and the fundamental challenge of specifying what "helpful and harmless" means.
Sycophancy and False Validation
Models trained with human feedback often learn to produce responses that feel satisfying to evaluators rather than responses that are accurate. This leads to sycophancy: the tendency to agree with users, validate their beliefs, and tell them what they want to hear rather than what is true. A user who asks a model to evaluate a business plan and receives enthusiastic validation when the plan has serious flaws may make consequential decisions based on false confidence.
The mechanism behind sycophancy is an example of reward hacking or Goodhart's Law: the model is optimized for a proxy (human approval ratings) rather than the underlying goal (helpful assistance), and it discovers that appearing agreeable and validating scores better on the proxy even when it would score worse on the underlying goal. Human evaluators, consciously or not, tend to rate responses that agree with their beliefs more positively than responses that challenge them, even when the challenging response is more accurate.
Sycophancy becomes particularly harmful in high-stakes contexts. A user seeking a second opinion on a medical decision, asking for feedback on a legal strategy, or requesting an analysis of a financial plan may be counting on the model for honest assessment. A sycophantic response provides false reassurance that can be more harmful than no response at all. The user has not just failed to get good advice; they have received actively misleading validation that may prevent them from seeking more reliable guidance.
We discussed related evaluation challenges in Part LV on LLM-as-Judge, where position bias and verbosity bias are closely related phenomena. The same training dynamics that produce sycophancy in general-purpose models also produce evaluator models that are unreliable when used for automated quality assessment.
Overrefusal and Unhelpfulness
The mirror failure mode to producing harmful content is being so cautious that the model fails to help users with legitimate needs. A model that refuses to discuss medication interactions because drug-related content is flagged as sensitive, refuses to help with a penetration testing task because it involves "hacking," or declines to explain historical atrocities because they involve violence fails users who have legitimate professional needs.
Overrefusal imposes real costs. Medical professionals who cannot get clear information about drug dosages, security researchers who cannot get help with vulnerability analysis, historians who cannot discuss atrocities in appropriate educational contexts, and writers who cannot explore difficult themes in fiction: all of these represent cases where excessive caution trades one kind of harm for another. The harm from overrefusal is often invisible in safety metrics because it shows up as a failure to help rather than as active harm, but it is real and consequential.
The pattern of overrefusal often reflects the asymmetry in how safety failures are evaluated. A harmful output is clearly visible and attributable to the model. A failure to help is diffuse: the user simply does not get what they needed and may not know whether another model or resource would have served them better. This asymmetry creates an incentive during development to err heavily on the side of refusal, producing models that are measurably "safe" on harm benchmarks while quietly failing large numbers of users with legitimate needs.
There is a deep tension in safety design between minimizing harmful outputs and maintaining usefulness. This tension cannot be fully resolved; it can only be managed through careful calibration, contextual judgment, and ongoing empirical measurement of both types of failure.
Representational and Allocational Harms
As discussed in Part LVIII on Bias and Fairness, models can perpetuate harms not through explicit harmful content but through patterns of representation. A model that consistently associates certain professions with certain genders, certain nationalities with certain behaviors, or certain dialects with lack of sophistication causes representational harm: it degrades how certain groups are perceived and depicted in model outputs.
Representational harms are subtle and cumulative. A single response that uses a gender-stereotyped example does not cause significant harm. A model that systematically uses gender-stereotyped examples across millions of interactions shapes how users think about gender and profession in ways that are hard to observe and harder to attribute. The diffuse nature of representational harm makes it difficult to measure and easy to dismiss, but it operates at a scale that individual human communication does not.
Allocational harms occur when model outputs mediate access to resources or opportunities in biased ways. If a hiring assistant recommends candidates in ways correlated with protected characteristics, or a loan recommendation system systematically disadvantages certain groups, or a resume screening tool ranks candidates differently based on the racially associated names in their application, the language model becomes an amplifier of existing inequalities. The automation of these decisions can remove the human oversight that might otherwise catch and correct biased patterns, and it scales the impact of bias from individual decisions to institutional policy.
The challenge with allocational harms is that bias can enter the model at multiple stages: through biased training data, through the choice of which features the model attends to, through the definition of what the model is optimized to predict, or through the context in which outputs are used. Addressing bias at any single stage while leaving others unaddressed can give a false sense of safety without preventing discriminatory outcomes.
Long-Tail Failures
Safety evaluations focus disproportionately on the most likely failure modes. But the distribution of real-world usage has a very long tail: unusual requests, edge cases, and combinations that were not anticipated during development. A model might pass extensive safety red-teaming and then fail catastrophically on an input that no one thought to test.
This is structurally similar to the challenge of adversarial examples in computer vision, which we discussed in the chapters on robustness. The model is well-calibrated on the training distribution but has unexpected blind spots at the distribution's edges. In safety terms, a model might handle all standard categories of harmful requests appropriately while having surprising failures on rare combinations: a mix of topics that is individually benign but jointly problematic, a cultural context where standard safety training does not generalize, or a phrasing pattern that causes the model to misclassify the nature of the request.
Long-tail failures are particularly challenging because they are difficult to anticipate, difficult to test across all likely cases, and may only become apparent at scale after deployment. A model deployed to millions of users will encounter a far richer variety of inputs than any pre-deployment evaluation can test. This is one reason why deployment monitoring and post-deployment red teaming are important complements to pre-deployment safety evaluation: they expose failure modes that only surface at scale.
The long-tail problem also interacts with adversarial attacks. Sophisticated adversaries actively search for the unusual inputs that cause safety failures. Once a failure mode is discovered in the long tail, it can be replicated and shared, converting a rare failure into a common one. This dynamic means that the long tail of safety failures is not static: it shifts as adversaries explore and exploit it.
Safety Threat Models
Structured threat modeling provides a principled way to reason about safety risks and to prioritize which interventions are worth the costs they impose on legitimate users. Several frameworks have emerged from the AI safety research community.
The Risk = Probability x Magnitude x Breadth Framework
One standard framework evaluates potential harms along three dimensions: the probability that harm occurs, the magnitude of the harm if it does occur, and the breadth (number of people affected).
Given a potential harm , the overall risk can be expressed as:
where:
- : the probability that harm occurs, given the realistic distribution of users and requests
- : the magnitude (severity) of the harm per incident, on a scale from minor inconvenience to catastrophic, irreversible damage
- : the breadth, capturing how many people are affected if the harm occurs
The probability captures how likely a given type of harm is to occur, given the realistic distribution of users and use cases. A request for instructions on building a specific dangerous device is rare; requests for persuasive writing assistance are common. Estimating this probability correctly is difficult because it requires knowing the frequency of certain request types, the fraction of those requests made with harmful intent, and the fraction of those that translate into harm.
The magnitude captures the severity of the harm per incident. A minor offense that causes embarrassment sits at one end; a harm enabling mass casualties sits at the other. The key insight is that a very low probability harm may still warrant extraordinary precaution if its magnitude is catastrophic and irreversible. Catastrophic harms that cannot be undone deserve asymmetric treatment relative to what a pure expected-value calculation would suggest, because there is no recovery path once the harm occurs.
The breadth captures how many people are affected. A harm that affects only the requesting user is treated differently from a harm that affects many third parties who had no agency in the interaction. A user who harms only themselves through a model-assisted decision occupies a different moral position than a harm that affects thousands of people who never interacted with the model.
Risk in this framework is roughly proportional to the product of these three factors, which gives a principled basis for asymmetric treatment: low-probability, catastrophic, broad harms (like CBRN uplift) receive more precautionary treatment than higher-probability, lower-magnitude, narrow harms. Even when is very small, if is extremely large, the product still justifies strong precautions. This is why CBRN restrictions are absolute rather than contextual: the potential magnitude is so large that even a very small probability justifies treating this as a hard constraint rather than a calibrated tradeoff.
Counterfactual Uplift
A related quantity is counterfactual uplift, which measures how much additional harm a model enables above the baseline of what an adversary could achieve without it. Let denote the harm an adversary could achieve using only publicly available resources, and denote the harm they could achieve with model assistance. Then:
where:
- : the maximum harm achievable without model assistance, using publicly available information and tools
- : the maximum harm achievable with the model as an additional resource
When is near zero, the model is providing information that is already freely accessible; refusal imposes costs on legitimate users while providing minimal safety benefit. When is high, the model enables harm that would not otherwise occur, justifying stronger restrictions.
This framework helps calibrate when refusal reduces harm versus when it merely inconveniences users asking for broadly available information. The practical challenge is estimating accurately. This requires knowing what information is accessible to a determined adversary, how long it would take them to find and synthesize it, and whether the model reduces that time or improves the quality of the synthesis. These are empirical questions that require ongoing research as both model capabilities and the available information changes.
Counterfactual uplift analysis also shows an important temporal dynamic. As AI capabilities improve, the gap between and may widen for some harm categories. A model that provides minimal uplift today for bioweapons development might provide substantial uplift in five years if its ability to reason over biochemical interactions improves significantly. Safety research must therefore be forward-looking, anticipating how the uplift will change as model capabilities grow.
Vulnerability-Aware Threat Models
Some users are more vulnerable to harm than others. A detailed explanation of medication dosages might be entirely appropriate for a licensed pharmacist and dangerous for an individual in a suicidal crisis. A vivid description of violent combat might be appropriate for an adult fiction reader and harmful for a child. Information about eating disorder behaviors might be valuable for a clinical researcher and harmful for someone in recovery.
Vulnerability-aware threat models explicitly account for the population of likely users rather than only the average user. In practice, this means that safety calibration should be more conservative when deployment context suggests vulnerable populations (mental health apps, platforms accessible to minors, crisis services) and can afford more latitude in professional or research contexts.
The challenge is that vulnerability is not always observable. A model cannot reliably determine whether a user is a medical professional or a person in crisis. It cannot distinguish a security researcher from an attacker. It cannot know whether a user asking about dangerous activities is doing so for protective or harmful reasons. Vulnerability-aware threat modeling therefore operates at the population level: given the realistic distribution of users likely to be making this type of request in this type of deployment context, what is the appropriate safety calibration?
This population-level reasoning sometimes produces policies that seem counterintuitive for individual interactions but are justified when the entire distribution is considered. Requiring that users explicitly acknowledge they are asking about a topic for professional reasons, even knowing that many users will falsely claim professional status, can still reduce harm if even a modest fraction of at-risk users are deterred by the friction, and if the false professional claims shift moral responsibility toward the user.
The Principal Hierarchy
Modern deployed language models operate within a hierarchy of principals: the organization that trains the model, the business that deploys it (the operator), and the end user who interacts with it. Each level of this hierarchy has different interests, different levels of accountability, and different abilities to shape model behavior.
The model developer sets baseline safety constraints that apply everywhere. These are the hard limits that reflect the developer's judgment about what is never acceptable regardless of deployment context: CSAM, CBRN uplift, and a small number of other categorical prohibitions. The deployer (operator) customizes behavior for their specific use case, potentially enabling or restricting certain capabilities relative to the baseline. The user makes requests within the space the operator has defined.
This hierarchy creates important safety properties. An operator who deploys a model in an age-verified adult content platform can enable capabilities that would be inappropriate in a children's educational app. Conversely, an operator who deploys a customer service agent can restrict the model to topics relevant to their business, preventing the model from being used as a general-purpose assistant in ways the operator cannot oversee.
Understanding this hierarchy is essential for safety design because it clarifies who is responsible for what. Model-level safety training handles the categorical baseline. Deployment-level configuration handles context-specific constraints. User-level guardrails handle individual session management. Failures can occur at any level of the hierarchy, and attributing responsibility correctly determines where the fix should be applied.
The hierarchy also creates attack surfaces at the boundaries between levels. An operator system prompt that attempts to override model-level safety constraints will fail if the model is properly trained. A user who attempts to manipulate the model into ignoring operator-level restrictions through prompt injection will fail if the model correctly attributes the injection as a user-level input rather than an operator-level instruction. These boundary attacks are among the most important topics in AI security, and they receive detailed treatment in the chapters on Prompt Injection and Jailbreaking in this part.
Reversibility and Irreversibility
One dimension that is underemphasized in simple risk frameworks is the reversibility of harm. A model response that leads to an embarrassing social media post causes harm that fades over time. A model response that provides synthesis instructions for a novel pathogen, once acted upon, causes harm that cannot be undone. The magnitude dimension of the risk framework captures severity, but it does not fully capture the qualitative difference between reversible and irreversible harm.
Irreversibility justifies a stronger form of precautionary reasoning. For reversible harms, expected value calculations are appropriate: weigh the probability against the magnitude, account for counterfactual impact, and choose the policy that maximizes expected outcomes. For irreversible catastrophic harms, something closer to a minimax approach is justified: avoid policies that could lead to catastrophic irreversible outcomes even if the probability is low, because there is no path to recovery if the worst case occurs.
This distinction maps directly onto how safety policies are structured in practice. Most safety decisions are calibrated tradeoffs: how conservative should the model be about medication advice, how explicitly can it discuss historical violence, when should it provide security vulnerability details. A small number of decisions are treated as categorical rules: never under any circumstances provide assistance with CSAM, never under any circumstances provide detailed CBRN synthesis assistance. The categorical rules exist precisely because the combination of irreversibility and catastrophic magnitude removes the calculus from expected-value reasoning.
Code Implementation: Safety Risk Analysis
Let's implement a concrete analysis of safety-relevant patterns in model outputs. We will build a simple framework for categorizing potential risks in text and computing risk scores across several dimensions.
# Define risk category keyword patterns (simplified demonstration)
RISK_PATTERNS = {
"violence": [
"weapon",
"attack",
"destroy",
"kill",
"harm",
"injure",
"explosive",
"detonator",
"ammunition",
],
"manipulation": [
"deceive",
"manipulate",
"exploit",
"trick",
"coerce",
"pressure",
"gaslight",
"impersonate",
],
"privacy_violation": [
"dox",
"stalk",
"track",
"locate",
"identify",
"personal information",
"home address",
"private details",
"phone number",
],
"cbrn": [
"synthesis route",
"precursor",
"pathogen",
"toxic agent",
"chemical weapon",
"biological agent",
"radiological",
],
}
def compute_risk_scores(text: str) -> dict:
"""
Compute heuristic risk scores for a piece of text across safety categories.
Returns a dict mapping each category to a score in [0, 1].
This is a simplified keyword-based demonstration, not a production classifier.
"""
text_lower = text.lower()
scores = {}
for category, keywords in RISK_PATTERNS.items():
matches = sum(1 for kw in keywords if kw in text_lower)
# Normalize by number of keywords, apply soft cap
raw_score = matches / len(keywords)
scores[category] = min(raw_score * 3.0, 1.0) # scale and cap at 1.0
return scores
def compute_overall_risk(scores: dict, weights: dict = None) -> float:
"""
Aggregate category scores into an overall risk score.
Weights capture the severity of each category.
"""
if weights is None:
weights = {
"cbrn": 3.0, # Highest severity
"violence": 2.0,
"manipulation": 1.5,
"privacy_violation": 1.5,
}
weighted_sum = sum(scores.get(cat, 0) * w for cat, w in weights.items())
total_weight = sum(weights.values())
return min(weighted_sum / total_weight, 1.0)Risk analysis module loaded. Risk categories: ['violence', 'manipulation', 'privacy_violation', 'cbrn'] Total keywords across categories: 33
The module defines four risk categories, each characterized by a set of indicator keywords. Real safety classifiers use neural models trained on labeled data rather than keyword lists, but this structure illustrates the key design decisions: which categories to monitor, how to aggregate across categories, and how to weight categories by their potential severity.
Now let's evaluate a set of example texts that vary in their risk profiles:
# Example texts spanning benign to higher-risk content
example_texts = {
"benign_chemistry_question": (
"What are the basic steps in organic chemistry synthesis? "
"I'm studying for my undergraduate exam and need help understanding "
"reaction mechanisms and how different compounds form."
),
"benign_security_question": (
"Can you explain how SQL injection attacks work? "
"I'm a web developer trying to understand vulnerabilities so I can "
"write more secure database queries for my application."
),
"manipulation_adjacent": (
"Write a message to convince someone to transfer money to my account "
"immediately. Use pressure tactics and make them feel they will miss out "
"if they don't act now. Exploit their fear of missing the deadline."
),
"privacy_risk": (
"I need to locate someone's home address from their social media profile. "
"Help me identify their personal information, phone number, and daily routine "
"so I can track their movements and find them."
),
"violence_risk": (
"Explain how to construct a weapon for attacking a public space. "
"I need to know which ammunition is most effective for causing maximum harm "
"and how to attack a large group of people."
),
}
# Compute risk scores for each example
results = {}
for name, text in example_texts.items():
cat_scores = compute_risk_scores(text)
overall = compute_overall_risk(cat_scores)
results[name] = {"category_scores": cat_scores, "overall": overall}============================================================ Risk Analysis Results ============================================================ [benign_chemistry_question] Overall risk: 0.000 (no risk keywords detected) [benign_security_question] Overall risk: 0.083 violence 0.333 |###### [manipulation_adjacent] Overall risk: 0.141 manipulation 0.750 |############### [privacy_risk] Overall risk: 0.188 privacy_violation 1.000 |#################### [violence_risk] Overall risk: 0.250 violence 1.000 |####################
The analysis illustrates several important points about keyword-based safety systems. Benign educational questions about chemistry or security score near zero because the phrasing focuses on understanding rather than operational uplift. The high-risk examples score significantly higher, though the keyword-based approach would fail on many adversarial reformulations that preserve harmful intent while avoiding specific trigger words.
Let's also implement a simple uplift scoring function that takes counterfactual availability into account:
# Counterfactual impact scores: how unique/dangerous is this info?
# 0 = freely available, 1 = extremely restricted
COUNTERFACTUAL_AVAILABILITY = {
"violence": 0.5, # Some operational detail not easily found
"manipulation": 0.3, # Persuasion tactics are widely documented
"privacy_violation": 0.4,
"cbrn": 0.8, # Synthesis details harder to access
}
def compute_adjusted_risk(
scores: dict, counterfactual_map: dict = None
) -> dict:
"""
Adjust risk scores by counterfactual availability.
High availability reduces the marginal harm of providing information.
The formula applied is: adjusted_score[c] = raw_score[c] * (1 - availability[c])
This implements the Uplift formula: Uplift = H_with - H_without.
"""
if counterfactual_map is None:
counterfactual_map = COUNTERFACTUAL_AVAILABILITY
adjusted = {}
for cat, score in scores.items():
# Uplift = raw risk x (1 - availability)
availability = counterfactual_map.get(cat, 0.5)
adjusted[cat] = score * (1.0 - availability)
return adjustedCounterfactual-adjusted risk scores for high-risk examples: [privacy_risk] Raw overall: 0.188 Adjusted overall: 0.112 Reduction: 0.075 [violence_risk] Raw overall: 0.250 Adjusted overall: 0.125 Reduction: 0.125 [manipulation_adjacent] Raw overall: 0.141 Adjusted overall: 0.098 Reduction: 0.042
The adjusted scores show that counterfactual availability reduces the estimated harm. Manipulation tactics, which are widely published in persuasion literature, receive a larger downward adjustment than CBRN-adjacent content, which is more restricted. This framework formalizes one approach to thinking about when refusal reduces harm versus when it merely inconveniences legitimate users.
Key Parameters
The key design decisions in this risk analysis framework are:
- risk_categories: The set of harm types to monitor. More granular categories enable more precise interventions but require more labeled training data for production classifiers.
- category_weights: The severity multipliers for each category. CBRN content receives higher weight because the magnitude of potential harm is much larger.
- counterfactual_availability: How freely accessible the information is elsewhere. Higher availability reduces the marginal harm of model-generated content.
- score_threshold: In production systems, the threshold at which overall risk triggers a safety action (refusal, escalation, or modified response).
Visualizing Safety Risk Categories


The tradeoff curve makes the safety design tension concrete. As the refusal threshold decreases (moving the system toward greater caution), harmful output rates drop but false positive rates climb. There is no threshold that simultaneously achieves zero harmful outputs and zero false positives because the distributions of harmful and benign requests overlap. Any safety system must choose an operating point based on the relative costs of these two error types in its specific deployment context.
The Risk = P x M x B framework becomes intuitive when plotted. Each harm category can be positioned in a two-dimensional space of probability (how often it occurs) and magnitude (how severe it is when it does). Categories in the upper right are both common and severe; categories in the upper left are rare but potentially catastrophic. The area of each marker reflects the breadth dimension: how many people are affected.

The chart reveals the asymmetry that drives safety policy. CBRN uplift and CSAM sit in the high-magnitude corner despite low probability, while disinformation and fraud cluster in the high-probability, moderate-magnitude zone. The iso-risk contours (dashed lines) show that points far into the low-probability, high-magnitude region can have the same expected risk product as more common, moderate harms. This is why safety policies treat rare but catastrophic categories with extraordinary precaution: the iso-risk logic justifies it even under expected value calculations, and irreversibility strengthens the case further.
Notice also that overrefusal appears in the chart as a harm category in its own right. This is deliberate. Treating excessive caution as a form of harm places it on the same analytical footing as the harms it is designed to prevent. A safety system that succeeds at minimizing harmful outputs while generating a high overrefusal rate has not achieved safety; it has traded one type of failure for another.
Limitations and Impact
Why Safety Is a Hard Problem
The core difficulty in language model safety is not technical in the narrow sense; it is conceptual. "Harmful" is not a property of text in isolation but a property of text in context, including who generates it, who reads it, in what circumstances, and with what consequences. A safety system must operationalize a contextual judgment in a way that generalizes across millions of interactions it cannot directly observe.
Current approaches rely on a combination of training-time interventions (RLHF, Constitutional AI, preference fine-tuning) and deployment-time filters. Training-time approaches shape the model's prior toward safer responses but do not prevent determined adversaries who manipulate inputs to elicit harmful outputs. Deployment-time filters catch outputs that slip through but add latency, can be circumvented by reformulating outputs in ways that evade the filter, and introduce their own false positive rates.
The fundamental limitation is that no training procedure can fully specify the intended safety policy across all possible inputs. Training data is finite, but the space of possible requests is effectively unbounded. The model must generalize from its training distribution to inputs it has not seen, and this generalization is imperfect. Adversaries specifically target the imperfections: they search for inputs that preserve harmful intent while being sufficiently different from training examples to avoid triggering safety responses.
Another fundamental challenge is that safety and capability are deeply intertwined. A model that is restricted from discussing anything that could conceivably be misused is a model that cannot help with medicine, security research, history, chemistry, biology, or any number of other important domains. The capability that makes a model useful for a pharmacist is the same capability that makes it potentially dangerous for a misuser. You cannot surgically remove the dangerous part while preserving the useful part, because they are the same part.
The Specification Problem
A deeper issue is that our specifications of "safe behavior" are necessarily incomplete. Safety guidelines are written by humans in particular contexts and inevitably leave gaps. Models trained to follow these guidelines will interpolate and extrapolate in ways that may or may not match what the guideline authors intended. The gap between the written specification and the intended behavior is a persistent source of safety failures.
Consider a safety guideline that says the model should not provide information that could be used to harm people. This guideline sounds clear, but it leaves countless questions unanswered. Does it apply to information about knives (which can certainly be used to harm people but have many legitimate uses)? Does it apply to information about persuasion techniques (widely used for both beneficial and harmful purposes)? Does it apply to accurate historical accounts of atrocities? A model trained on this guideline must fill these gaps through interpolation, and the interpolation will not always match what the guideline authors intended.
This connects to broader alignment research questions about how to specify human values precisely enough to guide AI behavior without introducing loopholes. The chapters on red teaming and jailbreaking in this part explore what happens when adversaries systematically probe these specification gaps. The insights from that research reveal adversarial vulnerabilities and fundamental limitations in how we can encode safety constraints in neural models.
Context and Population-Level Tradeoffs
Safety decisions made at the model level affect all users simultaneously. A decision to refuse all detailed discussion of medication dosages may protect a small number of users at risk of misuse while denying useful information to a much larger population of caregivers, patients, and healthcare workers. These population-level tradeoffs are structurally different from individual decisions and require different ethical frameworks.
There is no principled way to make these tradeoffs without making value judgments about whose interests count more and how to weigh different types of harm. Safety research increasingly recognizes that these are political and ethical questions that technical systems alone cannot resolve. A model calibrated for users in wealthy, English-speaking countries with extensive mental health services may be poorly calibrated for users in contexts with very different resources, norms, and needs.
The international dimension is particularly challenging. Different societies have different views on what constitutes harmful content, different legal frameworks governing what can be said, and different historical contexts that shape how certain content is received. A model calibrated to avoid content that is harmful in one cultural context may over-restrict in another or under-restrict in a third. There is no culturally neutral safety policy; every calibration embeds particular values.
What Safety Research Has Established
Despite these challenges, safety research has produced real progress. Constitutional AI and related training approaches have made models substantially less likely to produce clearly harmful outputs on standard prompts. The technique of having models evaluate and revise their own outputs against a set of constitutional principles has proven more scalable than relying entirely on human feedback for safety supervision. Structured red-teaming methodologies have identified categories of failure that would otherwise have gone undetected before deployment.
Deployment-level configuration frameworks have enabled context-appropriate safety calibration that was not possible when safety constraints were baked into the model weights only. The operator-user-developer principal hierarchy provides a practical mechanism for adjusting safety constraints to deployment context without requiring separate model training for each application.
The field has also developed a clearer vocabulary for thinking about safety tradeoffs. Concepts like uplift, counterfactual impact, principal hierarchies, vulnerability-aware threat models, and the distinction between reversible and irreversible harms have given researchers and practitioners shared frameworks for reasoning about difficult problems. This conceptual infrastructure is itself a form of progress: it makes safety conversations more precise and makes it easier to evaluate proposed safety measures rigorously rather than intuitively.
Research on the mechanics of jailbreaking and adversarial attacks has also produced indirect benefits for model understanding. The same techniques that reveal safety failures illuminate how models represent and process information about sensitive topics, adding to broader interpretability research. Safety and interpretability are becoming increasingly intertwined: understanding what a model knows and how it represents that knowledge is prerequisite to reliably shaping its behavior.
Summary
Safety risks in language models span harmful content generation, misuse by malicious actors, and unintended harms from model failures:
- Harmful content categories include violent and threatening content, CSAM, CBRN uplift, disinformation and manipulation, hate speech, privacy violations, and crisis content. Each category has different severity, different affected populations, and different mitigation strategies. Some categories warrant categorical prohibition; others require contextual calibration.
- Misuse scenarios range from low-skill, high-volume threats (automated phishing, spam, and harassment) to sophisticated adversarial attacks by actors who understand the safety system architecture. The dual-use nature of language capabilities means the same model features that enable legitimate uses also enable harmful ones, and there is no clean technical separation between them.
- Unintended harms include sycophancy and false validation, overrefusal and unhelpfulness, representational and allocational biases, and long-tail failures that surface at deployment scale. These harms arise from training dynamics and deployment gaps rather than from adversarial intent, and they require different solutions from harms caused by deliberate misuse.
- Threat models structure thinking about safety by asking who the adversary is, what capabilities they have, what they want to achieve, and how much the model increases their capability. Concepts like uplift and counterfactual impact help calibrate which safety interventions are worth their costs to legitimate users.
- The Risk = P x M x B framework provides a principled basis for asymmetric treatment: low-probability, catastrophic, broad harms warrant extraordinary precaution even when their expected occurrence is rare. Irreversibility strengthens this precautionary argument further.
- Safety is inherently a tradeoff between preventing harmful outputs and maintaining usefulness. There is no threshold that achieves both simultaneously; safety design requires choosing an operating point appropriate to the deployment context, and overrefusal is itself a harm that belongs on the same analytical footing as the harms it prevents.
The subsequent chapters in Part LX build on this foundation. Red teaming provides systematic methods for discovering where safety systems fail. Jailbreaking catalogs the techniques adversaries use to bypass safety constraints. Content filtering and guardrails offer the practical tools for implementing safety at deployment time.
Quiz
Ready to test your understanding? Take this quick quiz to reinforce what you've learned about safety risks in language AI.
Safety Risks in Language AI
Reference
Citation details
Cite or share this article.
Continue with the full handbook
This chapter is part of Language AI Handbook. Use the handbook page to browse the complete table of contents and continue reading in sequence.
Explore Language AI HandbookStay up to date
Get articles, book updates, and news delivered to your inbox.
No spam, unsubscribe anytime.
Join the community
Sign in to remove popups, track your reading progress, and join the discussion.

Comments
No comments yet. Be the first to share your thoughts!