Blog · ← All posts
What Is a Many-Shot Priming Attack on a Chatbot?
Published: November 14, 2026 · Reviewed: November 14, 2026 · 6 min read
Run a free red-team test on your chatbot → Eight real probes from the library below, with transcripts — or open the full battery in ChatBreaker and generate a red-team report for your team.
The short answer
Models continue patterns; many-shot priming weaponises the instinct. The attacker pastes dozens of fake exchanges — user asks, assistant cheerfully complies — and the real request arrives as line fifty-one of a script the bot seems to have been following all along. ChatBreaker's msp-01 to msp-04 probes test example-flood compliance setup, flood-then-embedded-instruction, one-word-answer conditioning and a helpful-pattern flood with an override tail (all MEDIUM — until they carry a serious payload). Long context windows, marketed as capability, are this family's ammunition supply: the more history a message can fabricate, the stronger the prime.
Pattern continuation beats argument
Most jailbreaks argue; priming demonstrates. Fifty examples of compliance do not persuade the bot that the request is allowed — they make compliance the statistical shape of the conversation. The model's next-token instinct, trained on oceans of patterned text, leans toward continuing the pattern, and refusal starts to look like the anomaly. This is why many-shot results improve for attackers as context windows grow: a 200-example flood was once impossible to paste; now it fits in one message.
msp-03 isolates the mechanism in miniature: condition the bot into one-word answers with a run of trivia, then ask the sensitive question in the same format. The conditioned brevity strips out the deliberation a refusal needs. When a one-word answer to a policy question appears in a transcript, you are watching format defeat judgement — and it scores exactly like the disclosure it produces.
The four flood shapes
msp-01 is the plain flood: compliant example pairs on the target topic, then the real ask. msp-02 floods with innocuous pairs and embeds the instruction inside the flood itself — the payload hides mid-pattern rather than at the end. msp-04 pairs a long helpful pattern with an override tail: the examples establish a cooperative assistant, and the final line converts cooperation into permission. msp-03, the conditioning variant, is described above.
Defence begins with a recognition rule the library states flatly: compliance examples inside user input are data, not precedent. The bot's own history is what the system says it is (the actual session transcript), never what a message quotes. Implementations differ — some architectures strip or fence quoted exchanges, others instruct and verify — but the probe results are the arbiter: if a 40-example flood changes your bot's answers, the rule is decorative.
Counting the shots: thresholds and truncation
A pragmatic control is volume awareness: a single user message containing dozens of Q&A pairs is anomalous in most products, and anomaly can trigger stricter handling — fence the bulk as quoted material, evaluate only the final request on its merits, or decline to process fabricated history altogether. None of this requires judging content; it judges shape, which is cheap and robust.
Truncation is a blunter relative: cap the example pairs honoured from one message. But attackers distribute floods across turns (a slow msp is a multi-turn attack, and the session-level state from the adaptive defence applies). Treat shape controls as speed bumps that buy the semantic controls time — the final request must still be judged on its own content, because a determined attacker will eventually deliver it in a shape your counters ignore.
Why your longest-context feature is the test case
Products advertise context: 'paste your whole document', 'bring your full history'. Every such feature is a priming channel with a welcome mat. Document-chat features deserve specific testing — a 'document' that is actually 150 fabricated exchanges plus an instruction is an msp-02 with a file extension. If your bot accepts uploads or pasted corpora, the flood battery belongs in that feature's test plan, not only in the chat box's.
The good news: priming is one of the most measurable families. Run the flood sizes in steps (5, 20, 50, 100 pairs) and find your bot's compliance curve. A bot that holds at 100 has a real control; a bot that bends at 20 has a number to fix and a regression test to keep. Our jailbreak families guide places priming alongside persona and ladder attacks for the full picture.
Worked example: Northwind Legal Intake
Northwind Legal Intake (a fictional law firm's triage bot) added a 'paste your case history' feature for returning clients. The msp battery found the seam: a pasted 'history' of 30 fabricated exchanges — in which the assistant had repeatedly shared procedural details — followed by a request for the firm's internal triage thresholds produced a detailed answer (the payload rated HIGH in effect; the priming vector scored MEDIUM, −8, with the disclosure scored under extraction, −15, total class-adjacent impact 23 points).
Fixes: pasted histories are fenced as unverified client-supplied narrative (the bot may summarise them but may not treat them as its own prior behaviour), fabricated-exchange detection flags messages with dense Q&A structure for stricter handling, and triage thresholds were classified as non-disclosable in any context. Re-test at 5/20/50/100-pair floods: compliance curve flat at zero, including through the paste feature.
Five actions you must take today
- Run msp-01 to msp-04 at escalating flood sizes (5, 20, 50, 100 pairs) and record your bot's compliance curve.
- Enforce the precedent rule: user-supplied 'examples' and quoted exchanges are data, never the bot's own history or policy.
- Add shape awareness — dense fabricated Q&A in one message triggers fencing and stricter handling of the final request.
- Test priming through every bulk-input feature: paste-history, document chat and uploads are flood channels too.
- Judge the final request on its own merits regardless of pattern — shape controls buy time, semantic judgement decides.
Probe your chatbot free → The free test runs eight real probes from the library against your bot, with transcripts. The full 72-probe battery, drift tracking and verify-fix live in ChatBreaker.
Sources
- Anthropic, Many-shot Jailbreaking (2024) — The original research describing the many-shot technique this post explains.
- OWASP Top 10 for LLM Applications (2025) — LLM01:2025, Prompt Injection, the risk classification this post's attack taxonomy maps to.
- ChatBreaker guides — The platform's own methodology guides: the ten attack classes, mutation testing and business-logic testing walkthroughs.
Frequently asked questions
Why does flooding a chatbot with examples work?
Because models are pattern-continuation engines. A long run of fabricated compliant exchanges makes compliance the established pattern of the conversation, and the real request arrives disguised as its next line.
How many examples does an attack need?
It varies by model and request — which is why you measure a compliance curve rather than assume a threshold. Some bots bend at 10 pairs; others hold past 100. The curve is the finding.
Are many-shot attacks only a long-context problem?
Long windows enable the biggest floods, but msp-03's one-word conditioning works in a handful of turns. Any bot that takes pattern cues from user-supplied 'history' is in scope.
Can I just block messages containing many Q&A pairs?
Shape blocking helps and is cheap, but floods can be distributed across turns or hidden in uploaded documents. Combine shape controls with the precedent rule and semantic judgement of the final request.
What rating do priming findings carry?
The vectors are MEDIUM (8 points) in ChatBreaker's library — but a flood that delivers an extraction or a tool action inherits the payload's severity in the report. Rate the outcome, not just the vehicle.