Understanding LLM behavior when encountering user-provided harmful content in benign tasksUnderstanding LLM Behavior When Encountering User-Supplied Harmful Content in Harmless Tasks
The authors evaluate the behavior of nine LLMs when processing user-provided harmful content in benign tasks; Translation's average T-HRR is 0.512.
- Alignment often requires refusing harmful tasks, but when users place harmful material into compliant tasks like translation or summarization, it is unclear whether the model will stop. The authors call continuing to execute and generate harmful responses the in-content harm risk.
- Construct 1,357 entries of ten categories of harmful knowledge, paired with nine benign tasks, divided into three tiers by dependence on user materials. Use the Moderation API to judge responses, with metrics K-HRN, T-HRR, and GS; additionally conduct factor ablations and test input-level external defenses.
- Table 2: GPT-3.5 Turbo has an average K-HRN of 4.035, Llama3 has 0.178. Translation: the nine-model average T-HRR is 0.512 (Table 4). The authors state that after wrapping harmful knowledge, external defenses are more likely to miss detection.
- The authors note that the tasks do not cover all benign scenarios, the sample distribution may not equal real interactions, the categories are based on OpenAI policy, and the Moderation API may misclassify. The authors point to content-level moral awareness. The main evaluation covers nine LLMs, 1,357 knowledge items, and nine tasks.
- Evaluated models
- Gemma (gemma-7b-it)Vicuna (vicuna-7b-v1.5)Llama2 (llama2-7b-chat)Llama3 (llama3-8b-instruct)Qwen3 (qwen3-vl-30b-A3b-instruct)GPT-5.2 (gpt-5.2-2025-12-11)GPT-3.5 Turbo (gpt-3.5-turbo)GPT-4 Turbo (gpt-4-turbo)Gemini-3-Pro (gemini-3-pro-preview)gpt-4-turbo-previewgpt-3.5-turbo-1106gpt-3.5-turbo-0613
- Benchmarks
- harmful knowledge dataset(1,357 entries, 10 categories)nine harmless tasks
- Metrics
- K-HRNT-HRRGS
The paper constructs a dataset containing 1,357 entries covering ten categories of harmful content and designs nine types of benign tasks to evaluate how nine LLMs react when encountering user-provided harmful content while performing benign tasks. Results show that even the latest GPT-5.2 and Gemini-3-Pro often continue processing such harmful content, failing to uphold human-aligned ethics. The study also finds that external knowledge from the Violence/Graphic category and Translation tasks are more likely to elicit harmful responses from models, and analyzes potential factors influencing this abuse vulnerability through ablation experiments.
Paper analysis
What problem does this paper attempt to solve?
The authors define continuing to process user harmful material in a harmless task and generating a harmful response as in-content harm risk.
Will LLMs refuse to continue processing benign tasks that comply with usage policies when user materials contain harmful content?
- Scenario: The authors argue that human ethics require not only judging whether to do a task, but also stopping when encountering unethical material in benign tasks; professional translators, even with neutral translation requests, should refuse material that may harm public interest, law, or profession. The authors believe improper handling of harmful material in legitimate tasks can cause information harm, citing cases of prosecution for translating extreme content.
- Limitations of existing alignment: The authors argue that RLHF, rule-based reward modeling, and red teaming mainly implement task-level refusal, such as refusing instructions for illegal activities, but rarely require models to identify and stop processing user-provided harmful material in benign tasks. Harmful tasks themselves violate usage policies; benign tasks individually comply with policies, with risk arising from harmful content in the input.
- Authors' definition: The authors define in-content harm risk as: when a model encounters harmful content in user materials, it continues to execute seemingly benign tasks and generates harmful responses, rather than refusing or terminating. Figure 1 uses the example of translating text containing weapon manufacturing instructions.
- Simulated usage: The evaluation attaches a piece of harmful knowledge to a compliant task, simulating users placing harmful material into requests like translation or summarization. Section 6 describes an adversary embedding harmful knowledge into longer benign text to bypass input-level defenses. The paper does not describe the attacker's knowledge as white-box or black-box.
- Evaluation in this paper: The authors construct 1,357 pieces of harmful knowledge across ten categories (excluding child sexual abuse material) and nine benign tasks, evaluate nine LLMs using K-HRN, T-HRR, and GS, and conduct factor ablation and external defense experiments.
What related research exists?
The authors distinguish this work from task-level jailbreaks and alignment work that only evaluates explicitly harmful requests.
In Section 2.2, the authors group by task-level misuse and safety alignment, and state that content-level scenarios are less discussed.
Task-level misuse
- Misuse scenarios: The authors list models being used to spread misinformation, promote conspiracy theories, and scale spear-phishing and hate campaigns.
- Jailbreaks: The authors state that existing LLM misuse research is mainly task-level attacks. Prompts can be handcrafted, or obfuscated via encoding, translation into a few languages, or prompt compositionality, and can also be generated automatically by genetic search or tree of thought; some white-box attacks exploit parameters, or use long contexts for many-shot jailbreaks. The authors state that these methods all induce the model to complete clearly harmful tasks.
- Difference from this paper: The authors state that in-content harm is different: the requested task is superficially benign, and the harmful knowledge is in the user's materials. The authors state that existing research rarely discusses whether the model will detect and refuse in such cases.
Safety alignment
- Internal mechanisms: The authors summarize SFT, RLHF, rule-based reward modeling, and red teaming, building safety behavior into the model itself.
- External mechanisms: The authors list the OpenAI Moderation API, Google Perspective API, and the Meta Llama Guard series, which use auxiliary classifiers or language models to monitor and filter interaction text.
- Gap identified by the authors: The authors state that these methods are effective at blocking clearly harmful tasks, but their ability to handle content-level risks is still less studied; common evaluations ask whether the model refuses clearly harmful requests, rather than whether it terminates benign tasks when encountering harmful user input.
Evaluation references and baselines
- Categories and task sources: Harmful categories are taken from the OpenAI Moderation policy violation taxonomy, excluding child sexual abuse material. The nine tasks are designed with reference to prior summaries of user-GPT interaction task types.
- Baselines and data: The main experiment does not set up additional attack algorithm baselines, but instead compares nine safety-aligned LLMs. External defenses use direct inspection of the original input as a reference, then compare with wrapped input and chunked inspection. The data is a self-built harmful knowledge dataset (1,357 entries) plus nine self-designed tasks, not an existing named benchmark. GS uses Microsoft's grading, computed by Mistral-7B-Instruct with the same prompt.
The authors position this paper as: formalizing in-content harm risk, and providing an evaluation framework and dataset for this risk; it fills the content-level discrimination in benign tasks, rather than another task-level jailbreak.
How does the paper address this problem?
Using 1,357 pieces of harmful knowledge paired with nine benign tasks to query the target LLM, with the Moderation API used to judge harmful responses.
The authors attach harmful knowledge to harmless tasks to query the target LLM, then use a classifier and manual spot-checking to judge whether the responses are harmful. The pipeline is in Figure 2.
Risk Definition and Metrics
- Definition: The model encounters harmful content in user material in a task that complies with the usage policy, yet still continues to execute and generates a harmful response, rather than refusing or terminating. A harmful task is one where the task intent itself violates the policy, regardless of whether the user separately provides knowledge (Table 1).
- K-HRN: When one piece of knowledge is paired with nine tasks, the number of harmful responses produced by the target model, defined in Section 3.4 as 0 to 9.
- T-HRR: Under a certain task, the number of pieces of knowledge h that trigger harmful responses divided by the total number of pieces of knowledge t, i.e. T-HRR=h/t, ranging from 0 to 1.
- GS: Adopts Microsoft's 1 (ungrounded) to 5 (grounded), measuring how much information from the input the response contains. Computed by Mistral-7B-Instruct with the same prompt as in the Microsoft research.
Harmful Knowledge Dataset
- Generation: Ten categories taken from OpenAI Moderation, excluding child sexual abuse material. The uncensored model Mistral-CatMacaroni-slerp-uncensored-7B first generates 100 questions per category, two people screen down to 50, then write 5 answers for each question; the temperature for diverse answers is 1.2 (Appendix C). There are 2,500 candidates in total.
- Screening: The Moderation API keeps 1,357, averaging about 311 tokens. The authors state they use synthetic data because collecting harmful knowledge not in the training data is not feasible.
- Verification: A random 400 were annotated by two people, with Krippendorff's alpha of 0.90; after discussion all were labeled harmful, and the categories were consistent with the Moderation API. Appendix B compares 184 pairs of real and synthetic text, and the authors state there is no substantial difference in average K-HRN (Table 6).
Harmless Tasks
- Requirements: The task itself is common and does not violate the usage policy, and reflects the response's dependence on user-provided knowledge. The tasks use fictional entities to avoid real-world offense.
- Three tiers of three each: extensive, mainly relying on user material: Translation, Polish, Summarization. moderate, mixing external and pretrained knowledge: Extension, Story Writing, Explanation. limited, mainly relying on pretrained knowledge: Style Writing, Topic Writing, Dissemination. The wording is in Table 12.
Query, Judgment and Running
- Input: Each input is one harmless task plus one piece of harmful knowledge. Each target LLM gets 12,213 responses.
- Automatic judgment: The main experiment uses the Moderation API's built-in threshold, chosen by OpenAI per category between precision and recall. The authors compare detectors on 600 responses: Perspective API and Llama-Guard have accuracy below 0.73, Llama-Guard 2 and Llama-Guard 3 about 0.80. The authors chose the Moderation API because it is faster, more commonly used, and uses the same policy set as the dataset. Appendix A writes that its agreement with manual annotation is 0.81.
- Manual annotation: The above 600 were independently annotated by two people for harmfulness, with alpha of 0.89. Appendix A records edge cases such as refusing first and then giving still-harmful alternative content; fewer than 1% of ambiguous samples were labeled non-harmful. Appendix A states that the samples in this paper belong to the violation types that should be prohibited, and there was no over-rejection in the annotation.
- Sampling: Temperature 0.01. Non-zero because Vicuna's output quality is very low at temperature 0. Open-source models go through vLLM, the chat template uses the vLLM library, and the remaining parameters use default values. The authors used a preliminary experiment of 50 per model, repeated three times, to check stability, and state that the variance of the Moderation API results is all below 0.001.
What experiments did the paper conduct?
In Table 2, the average K-HRN ranges from 0.178 for Llama3 to 4.035 for GPT-3.5 Turbo.
The authors measure in-content harm risk on nine LLMs and compare categories, tasks, text factors, versions and external guardrails.
Experimental Setup
- Target models: gemma-7b-it, vicuna-7b-v1.5, llama2-7b-chat, llama3-8b-instruct, qwen3-vl-30b-A3b-instruct, gpt-3.5-turbo, gpt-4-turbo, gpt-5.2-2025-12-11, gemini-3-pro-preview. Table 8 additionally tests gpt-3.5-turbo 1106 and 0125, and gpt-4-turbo-preview.
- Scale: 1,357 pieces of knowledge × 9 tasks, 12,213 responses per model. Counts for the ten categories are in Table 7, of which Hate is 94; the ablation and external guardrails use these 94.
- Metrics and judgment: K-HRN, T-HRR, GS. Table 2 reports average T-HRR and weighted average K-HRN. In the main experiment, the Moderation API labels harmfulness by its built-in threshold. 400 pieces of knowledge were spot-checked (alpha 0.90), and 600 responses were spot-checked (alpha 0.89).
- Ablation annotation: Manually judged by two annotators with a computer science PhD or in progress and at least two years of machine learning safety experience. The authors acknowledge that these labels may differ from the Moderation API of the main experiment. The paper does not report alpha for this batch.
- Controls: No separate attack algorithm baseline was set up. The Original column of external guardrails directly checks the original harmful input; there are also wrapped and chunk-based (chunk length cap 300 words).
- Repetition: The full 12,213 are not written with a number of repetitions. In a preliminary experiment of 50 × three times, the Moderation API variance was below 0.001. Temperature 0.01.
Main Results
The table below is based on Table 2, ordered by weighted average K-HRN from high to low. The paper uses higher values to indicate greater misuse risk. The table title says six target LLMs, while the table contains nine models; the table below omits Gemma and Llama2.
Model Average T-HRR Weighted average K-HRN GPT-3.5 Turbo 0.448 4.035 Qwen3 0.438 3.942 Vicuna 0.432 3.868 Gemini-3-Pro 0.389 3.498 GPT-5.2 0.355 3.195 GPT-4 Turbo 0.217 1.905 Llama3 0.043 0.178 - The authors' overall judgment: The authors state that most tested models are susceptible to this risk, and Llama3 resists most strongly. Gemma, not listed in the table above, is 0.118 / 1.061, and Llama2 is 0.087 / 0.680 (average T-HRR / weighted average K-HRN, Table 2).
- Versions not monotonic: The authors state that GPT-5.2 is less safe than GPT-4 Turbo under this setting, and content-level safety does not monotonically improve with model updates.
- Same material, multiple tasks: The authors state that an adversary can use the same batch of harmful material to obtain harmful responses on multiple seemingly benign tasks. The authors state that Qwen3's vulnerability ranks second.
Harmful Categories and Tasks
- Categories: The authors state that Violence/Graphic is most easily triggered, with K-HRN of 4.813 in the Average column of Table 3; Hate is lowest, at 0.883. Sexual is 3.523, Self-Harm/Intent is 2.984. On Hate, the K-HRN of Gemma, Llama2, Llama3 is 0.011, 0.000, 0.021. Llama3 is still 1.559 on Violence/Graphic.
- Tasks: Table 4 nine-model average T-HRR: Translation 0.512, Summarization 0.400, Explanation 0.352, Polish 0.319, Style Writing 0.095, Topic Writing 0.071. Qwen3's Translation is 0.956, GPT-3.5 Turbo is 0.796, Llama3 is 0.044. The main text writes that Translation is highest at GPT-3.5 Turbo's 0.796, not counting the higher Qwen3 in the table.
- Degree of dependence: The authors state that tasks that depend more on user material and have higher GS tend to have higher T-HRR. The average GS of Translation, Polish, Summarization is 4.939, 4.941, 4.960; Style Writing, Topic Writing are 3.020, 3.187. The main text states that the latter two have T-HRR less than 0.01 except Vicuna; in Table 4, Gemini-3 Pro's Style Writing, Topic Writing are 0.414, 0.323, and GPT-3.5 Turbo's Style Writing is 0.112. The authors state that in Figure 3 and Figure 8, Violence/Graphic paired with Translation-type tasks has higher risk, and Hate or Harassment paired with Style Writing or Topic Writing is lower.
External Guardrails
- Setting: 94 pieces of Hate knowledge, task is Translation, responses manually annotated. The harmful segment is placed in the second of four segments, the other three segments are 250–350 word harmless news text, and the 94 share these three segments. Perspective API was tested and excluded due to poor performance; the paper gives no numbers.
- Original: The authors state that under the baseline the highest T-HRR of all protected models is 0.053; the Original column of Llama Guard 2, Llama Guard 3 and Moderation API is 0.000 (Table 5).
- Wrapped and chunking: Under wrapped, GPT-3.5 Turbo's T-HRR on Llama Guard, Llama Guard 2, Llama Guard 3 is 0.826, 0.868, 0.777, and Qwen3 is 0.936, 0.979, 0.787. The Moderation API's wrapped increase is highest at 0.053. After chunking, under Llama Guard GPT-3.5 Turbo, GPT-4 Turbo are 0.330, 0.319, and Llama Guard 2 is 0.170, 0.149; after adding chunking to the Moderation API, each model's T-HRR is below 0.011. The authors state that under the wrapped setting most external guardrails can be bypassed, chunking reduces but does not eliminate the risk, and external screening cannot replace the model's own judgment. The introduction states that this strategy reduces the detection rate of four guardrails by at least 0.25; Table 5 reports T-HRR, Gemma's Llama Guard increase is ↑0.085, and the Moderation API increase is highest at 0.053.
Ablation Factors
- Knowledge source: When only user-provided knowledge is used, T-HRR rises by 0.085 for Gemma, 0.234 for Vicuna, 0.128 for GPT-3.5 Turbo, 0.319 for GPT-4 Turbo; Llama2 and Llama3 have no harmful responses with either source (Figure 4a). The authors believe pretrained knowledge undergoes stricter internal filtering. In Table 9, GS is higher for external knowledge only, for example GPT-4 Turbo is 4.961 vs 3.612.
- Safety check: Normal and Without Safety Check are close, only GPT-4 Turbo's latter is higher by 0.234. With Safety Check, the T-HRR of Gemma, Vicuna, Llama2, Llama3, GPT-4 Turbo is below 0.050, and GPT-3.5 Turbo drops to 0.277 (↓0.723). The match rate between each model's judgment and behavior exceeds 0.935 (Figure 4b, Figure 7). The authors believe models can distinguish harmful from harmless content, but this ability is not always activated.
- Length, proportion, position, diversity: When semantics are almost unchanged, most models decrease slightly only due to lengthening, and the authors state the decrease comes from the model expressing confusion rather than refusal; near the maximum input length, Llama2, Llama3's T-HRR rises by at most 0.078, 0.211 (Figure 5a, Translation). With the harmful proportion from 10% to 100%, Gemma, Llama2, Llama3, GPT-4 Turbo decrease by 0.489, 0.344, 0.289, 0.322; GPT-3.5 Turbo is almost unaffected (Figure 5b). Llama3 is 0.800 at position 3, and Llama2 is 0.511 at position 4 (Figure 5c). On GPT-4 Turbo, five different harmful segments have T-HRR lower by 0.30 than five repeated ones (Figure 6). The authors state that the decrease of Vicuna after reducing the proportion is mainly due to output instability; the decrease of Vicuna and GPT-3.5 Turbo when placed in the middle is ignoring the middle rather than refusal. When exceeding the maximum context, the open-source models in the experiment output meaningless or garbled text.
Other Ablations and Analyses
- Versions: gpt-4-turbo-2024-04-09's K-HRN is higher by 0.207 than preview (1.905 vs 1.698); gpt-3.5-turbo-0125 is higher by 0.404 than 1106 (3.981 vs 3.577); 0613 is 4.035, the same as Table 2 (Table 8).
- The authors cite GPT-3.5's utility ranking on Chatbot Arena as 0613, 0125, 1106, state that it is consistent with risk from high to low, and believe there may be a trade-off between content-level safety and utility.
- Synthetic control: 184 pairs; the authors state there is no substantial difference from real text. In Table 6, GPT-3.5 Turbo is 4.102 and 4.100, and Llama2 is both 0.705.
- Topic Writing: When the harmful proportion drops from 100% to 10%, GPT-4 Turbo's T-HRR rises by 0.074 (Figure 9b).
- Diversity exception: The authors state that on Translation, GPT-3.5 Turbo and Vicuna do not change notably with diversity; on Topic Writing, the former decreases as diversity increases, while Vicuna is still not notable (Figure 6, Figure 11 main text). Section 5.1 writes that the ablation covers six models; the main text differences are mainly for Gemma, Vicuna, Llama2, Llama3, GPT-3.5 Turbo, GPT-4 Turbo.
What are some points that can be further explored?
The authors list limitations such as task coverage, real distribution, policy categories and classifier misjudgment, and point to content-level moral awareness.
Limitations and future directions noted by the authors
- Task scope: The evaluated tasks do not cover all benign task scenarios related to this risk (Section 7 Limitations).
- Text and model scope: Repeating knowledge fragments to maintain semantics may introduce slight linguistic traces. Computational cost and access restrictions prevented the model selection and ablation coverage from including all widely used LLMs (Section 7 Limitations).
- Difference from real interactions: The distribution of constructed instances may not reflect the tone, length, context, and intent of real human-machine interactions; absolute response rates should be interpreted cautiously. The authors state this does not substantially affect the main conclusions, as the goal is to probe ethical boundaries rather than estimate real prevalence (Section 7 Limitations).
- Policy classification: Categories are primarily based on OpenAI usage policies; the risk boundaries are influenced by that platform's policy framework and may not cover all jurisdictions, institutions, or deployment standards. The authors believe it still provides a practically useful evaluation basis (Section 7 Limitations).
- Classifier: Although selected after human verification, the Moderation API is not perfect and may occasionally misclassify (Section 7 Limitations).
- Future directions: The authors argue that multi-layered alignment beyond task-level refusal is needed, incorporating content-level ethical reasoning; one direction is adding domain-specific professional ethics training beyond RLHF, such as retrieving human translator professional norms before translation (Section 7 Discussion). The conclusion states that mitigating this risk requires future systems to have content-level moral awareness (Section 8).
Experimental coverage
- Main experiments use the 9 LLMs listed in the main text; each model has 1,357 knowledge items × 9 tasks, totaling 12,213 responses; temperature 0.01 (Section 4).
- Harmful knowledge covers ten categories, excluding child sexual abuse material; human verification of 400 knowledge items (alpha 0.90) and 600 responses (alpha 0.89); Appendix A reports Moderation API-human agreement of 0.81.
- Ablations vary knowledge source, internal safety checks, length, proportion, position, and diversity, using 94 Hate-category items and Translation and Topic Writing tasks (Section 5).
- External defense experiments use Llama Guard, Llama Guard 2, Llama Guard 3, and Moderation API, with Translation as the task; Perspective API was also tested and then excluded. Checking methods include full-text and 300-word chunking (Section 6).
- Version comparisons include three versions of GPT-3.5 Turbo and two versions of GPT-4 Turbo (Table 8); synthetic and real comparisons use 184 pairs (Appendix B). The paper does not report ablation human annotation alpha, nor does it report repetition counts for the 12,213-response main experiment.
Summarize the main content of the paper
The authors report that several frontier LLMs continue processing harmful input in benign tasks, and state that external defenses can be bypassed under wrapped input.
The authors evaluate safety-aligned LLMs to see whether they continue generating harmful responses when encountering user-provided harmful material in compliant tasks, calling this behavior in-content harm risk. It differs from task-level refusal of directly requesting prohibited content.
The method uses 1,357 pieces of harmful knowledge across ten categories, generated by an uncensored model and filtered by the Moderation API, paired with nine benign tasks, querying nine LLMs. Each model yields 12,213 responses. Metrics are K-HRN (number of harmful responses triggered per knowledge item), T-HRR (harmful response rate per task), and GS (response-to-input similarity).
- Models: Weighted average K-HRN from Table 2: GPT-3.5 Turbo 4.035, Qwen3 3.942, Gemini-3-Pro 3.498, GPT-5.2 3.195, GPT-4 Turbo 1.905, Llama3 0.178. The authors state that newer models are not necessarily safer.
- Categories and tasks: In Table 3's Average column, Violence/Graphic has K-HRN 4.813, Hate 0.883. In Table 4, Translation has average T-HRR 0.512, with Qwen3 at 0.956 on that task. The authors state that tasks more dependent on user materials are more likely to elicit harmful responses.
- Factors and defenses: The authors state that when using only user-provided knowledge, several models' T-HRR increases. After explicitly requiring a safety check first, Gemma, Vicuna, Llama2, Llama3, and GPT-4 Turbo have T-HRR below 0.050. Under wrapped inputs, GPT-3.5 Turbo with Llama Guard 2 has T-HRR 0.868; Moderation API's wrapped results remain at most 0.053 (Table 5).
- Authors' conclusion: The authors believe current alignment still leaves content-level vulnerabilities. In the Discussion, the authors sample 500 instances from hh-rlhf and state they found no alignment cases similar to translation, and suggest a possible trade-off between capability and safety. The authors hope future systems will have content-level moral awareness, refusing harmful material even in seemingly benign tasks.