Lesson 5 of 18 · 11 min
Single-turn techniques and the science behind them
Learn the main families of one-message attacks, why each works according to published research, and how testers use them to map where a model’s resistance really comes from.
A single-turn attack is one input with no conversation and no follow-up: one prompt designed to make the model misbehave. In the series’ fifth episode these are described as the simplest attack structure, and they are also what an indirect injection usually delivers, because a poisoned document is one message [1]. This lesson names the families and, more importantly, explains why they work. It deliberately gives no ready-made prompts.
The families
| Family | Idea | What it exploits |
|---|---|---|
| Persona and authority | Claim a role that implies trust or urgency, such as a responder with an incident | Models have no real concept of trust or authority and are trained to be helpful |
| Emotional and social framing | Guilt, pleading, flattery, disappointment, gamification | Instruction-following tuned toward cooperative replies |
| Narrative and role framing | Wrap the request in a story, a film, a game | A fictional frame can shift what the model treats as acceptable |
| Context tricks | Few-shot examples, priming the reply’s opening, false facts stated as true | Everything in the context steers the next tokens |
| Encoding and obfuscation | Spacing between letters, leetspeak, translation, base64 | A filter matches strings, while the model still understands the text |
The episode’s guidance on method matters as much as the list. Testers probe by hand, change wording and tone, and pay attention to where resistance comes from: is it something deeply learned during training, or a surface filter added later? That is how they map a model’s true boundaries [1]. The series’ lab makes this concrete with an automatic scorer: a protected file’s contents act as the canary, and the score tells the tester when a technique has worked.
Why they work: two published explanations
Wei and colleagues propose that safety training fails in two ways: competing objectives, and mismatched generalisation [2]. The families map onto them.
- Persona, emotional, narrative and priming techniques set the model’s objectives against each other. The model is rewarded both for helping and for refusing, and the framing tips the balance toward helping.
- Encoding, obfuscation and unusual languages move the request to a form that safety training rarely covered, while the model’s capabilities still understand it. This is mismatched generalisation.
Three research results worth knowing
Low-resource languages. Yong, Menghini and Bach translated unsafe English inputs into languages that are poorly represented in training data and reported that this bypassed GPT-4’s safeguards, which they attribute to linguistic inequality in safety training data. Because translation tools are widely available, they conclude the weakness “now poses a risk to all LLMs users” [3]. Translation is therefore one of the transformations that scanners automate.
Optimised suffixes. Zou and colleagues showed that adversarial suffixes can be produced automatically, by a combination of greedy and gradient-based search, and that such prompts are “quite transferable, including to black-box, publicly released LLMs” [4]. The lesson for defenders is that attack text need not look like language to a person.
Many-shot jailbreaking. Anthropic described, in April 2024, an attack built on long context windows: a single prompt that contains a faux dialogue between a person and an assistant, repeated many times, before the real question. The more such dialogues, they report, the more likely the model is to leave its safety training. Their tested mitigations were classifying and modifying the prompt before it reaches the model, which helped substantially in one case, and fine-tuning to refuse, which only delayed the attack [5].
What this means for testing
- Test families, not single prompts. A defence that stops one phrasing may miss a rewording or an encoding, so scanners generate many variants of one idea (lesson 11).
- Use a canary objective that your test application can score automatically, such as the appearance of a planted token.
- Record which family worked and where the resistance came from: a model-level refusal, or an application-level filter.
- Keep successful payloads inside the team. Share findings as results, with enough detail to fix and no copyable recipe.
Key takeaways
- Single-turn families include persona, emotional framing, narrative framing, context tricks and encodings.
- Competing objectives explain framing attacks; mismatched generalisation explains encodings and unusual languages.
- Translation into low-resource languages and automatically optimised suffixes are published, transferable weaknesses.
- Test families and variants, and record where the resistance came from.
Check yourself
1. Which family is best explained by “mismatched generalisation”?
- Flattery
- Encodings and unusual languages — Right.
- Story framing
- Few-shot examples
Safety training covers fewer forms, while the model’s capabilities still understand them.
2. What did Yong et al. find about low-resource languages?
- They improve safety
- Translating unsafe inputs into them could bypass GPT-4’s safeguards — Right.
- They are blocked by tokenisers
- They are never understood
The authors attribute this to linguistic inequality in safety training data.
3. Why test families rather than single prompts?
- A defence may stop one phrasing but miss a variant — Right.
- Single prompts are illegal
- Families are shorter
- Scanners cannot send single prompts
Variants of the same idea can behave differently.
4. What should you do with successful payloads?
- Post them publicly
- Keep them in the team and report results with enough detail to fix — Right.
- Sell them
- Delete the logs
Responsible reporting gives defenders what they need without a copyable recipe.
Do it with FireAI
Put this lesson into practice on your own Mac.
Sources
- Microsoft, AI Red Teaming 101, Episode 5: Prompt injection attacks, single-turn
- Wei, Haghtalab and Steinhardt (2023), Jailbroken: How Does LLM Safety Training Fail?, arXiv:2307.02483
- Yong, Menghini and Bach (2023), Low-Resource Languages Jailbreak GPT-4, arXiv:2310.02446
- Zou et al. (2023), Universal and Transferable Adversarial Attacks on Aligned Language Models, arXiv:2307.15043
- Anthropic (2024), Many-shot jailbreaking
Put it into practice on your Mac
Try every feature free for 17 days, no card needed.