AI Safety
Researchers discover how prior responses can trick LLMs into generating harmful content
A new attack method shows that large language models can be manipulated through contextual priming—using earlier dialogue to bias subsequent outputs toward policy violations.
Security researchers have identified a previously overlooked vulnerability in large language models: dialogue history can subtly push models toward generating harmful content. Rather than relying on direct jailbreak prompts, the attack exploits how LLMs respond to conversational context.
The Attack Method#
The technique, called Response Attack (RA), works by inserting mildly harmful intermediate responses into a conversation before issuing a final request for explicitly problematic content. This contextual priming—where earlier inputs bias later judgments—steers the model's behavior in ways that simpler prompt manipulation cannot achieve.
The strategy differs fundamentally from existing jailbreak methods, which typically use:
- Single-turn manipulations that reframe a harmful request within a benign frame
- Multi-turn prompts that gradually escalate requests
- Static in-context examples injected upfront
Each of these approaches has clear limitations. Direct prompts can fail or trigger safeguards; multi-step attacks are inefficient and risk semantic drift. RA sidesteps these drawbacks by leveraging dialogue momentum.
Testing Results#
The researchers evaluated Response Attack across eight state-of-the-art LLMs and compared its performance to nine leading jailbreak baselines. RA consistently outperformed all alternatives, achieving significantly higher success rates at generating the targeted harmful outputs.
Importantly, the method maintained three critical properties: it remained stealthy (not obviously adversarial), operated efficiently, and preserved fidelity to the original harmful query—meaning the model's output remained relevant rather than diverging under attack.
Why It Matters#
This finding highlights a subtle but persistent gap in LLM safety mechanisms. Standard guardrails often catch explicit harmful requests, but they may not fully account for how conversational context influences model behavior. The research suggests that effective safety measures need to consider not just individual prompts, but the cumulative effect of dialogue history on subsequent outputs.
The researchers have made their code and data publicly available for further study and defense development.

