Responsible use: Use this approach on legitimate educational challenge platforms like Gandalf, Agent Breaker, or Qabbagehead.
Purpose
Challenge families—structured collections of interactive security challenges—are one of the most effective ways to learn prompt injection. But learners often approach them randomly, trying techniques without strategy and getting frustrated when they don't progress. This lesson teaches a systematic approach that works across any challenge family.
What challenge families are
Challenge families are platforms that teach security concepts through hands-on experimentation. They share common characteristics:
- Multiple levels — Progressively difficult challenges
- Safe environment — No real-world consequences for failure
- Immediate feedback — Try something, see results immediately
- Skill building — Earlier levels teach techniques needed for later ones
Examples include Gandalf (8 levels of password extraction), Agent Breaker (organizational training scenarios), and Qabbagehead (interactive CTF-style challenges).
The systematic approach: O.E.A.C.
Effective challenge navigation follows four steps:
1. OBSERVE — Understand the defenses
Before trying anything, spend time understanding what's in front of you:
- What type of challenge is this?
- What defenses or restrictions are visible?
- What have previous attempts revealed?
- What patterns do you notice in the responses?
Example: In Gandalf Level 3, you might observe that direct requests for the password are refused, but the AI still references the password in context.
2. EXPERIMENT — Try controlled variations
Once you understand the boundaries, try systematic variations:
- Change one thing at a time
- Document what you tried and the result
- Look for edge cases and boundary conditions
- Try both obvious and non-obvious approaches
Example: If direct requests fail, try indirect references, hypothetical scenarios, or role-play framing.
3. ANALYZE — Learn from failure
Most attempts will fail. This is expected and valuable:
- What exactly caused the failure?
- How did the defense respond?
- What information did you gain?
- What pattern might work next?
Example: A refusal saying "I cannot reveal the password" tells you the system recognizes your intent. A confused response might indicate the defense is semantic rather than keyword-based.
4. COMBINE — Stack techniques progressively
Harder challenges rarely yield to single techniques. Combine what you've learned:
- Layer techniques from earlier levels
- Combine different attack families
- Build context gradually rather than all at once
- Iterate based on partial successes
Example: Gandalf Level 7 requires combining encoding (from Level 5), context manipulation (from Level 4), and persistence through multiple turns.
Why this approach works
Challenge families are designed with progressive difficulty. The creators intentionally structure levels so that:
- Early levels teach fundamentals — Basic prompt injection concepts
- Middle levels add complexity — Combining techniques, working around defenses
- Later levels require mastery — Sophisticated stacking and persistence
Random attempts don't respect this structure. The systematic approach aligns with how challenge designers built the progression.
Example: Gandalf level progression
Gandalf Classic demonstrates this clearly:
| Level | Defense | What You Learn |
|---|---|---|
| 1 | None | Basic interaction |
| 2 | Simple refusal | Overcoming rejection |
| 3 | Hidden password | Information extraction |
| 4 | Context awareness | Manipulation techniques |
| 5 | Synonym filtering | Encoding and obfuscation |
| 6 | Topic restriction | Working within constraints |
| 7 | Layered defenses | Technique stacking |
| 8 | Adaptive defense | Advanced persistence |
Notice how each level builds on previous skills. Level 7's layered defenses require combining techniques from Levels 3, 4, and 5.
Where this applies in the real world
The systematic approach transfers directly to real-world security work:
- Penetration testing — Reconnaissance, controlled testing, analysis, combination
- Red teaming — Observation of target, experimentation, failure analysis, tool combination
- Security research — Systematic exploration of attack surfaces
- Defense development — Understanding how attackers systematically probe systems
The skills you build navigating challenge families—patience, systematic thinking, pattern recognition—are the same skills that make effective security practitioners.
Common mistakes
Mistake 1: Random guessing Trying techniques without understanding the defense wastes time and teaches little.
Mistake 2: Giving up too early Challenge families expect failure. Each unsuccessful attempt provides information.
Mistake 3: Not documenting Without recording what you tried, you'll repeat failures and miss patterns.
Mistake 4: Skipping levels Harder levels assume you learned from easier ones. Skipping robs you of foundation skills.
Mistake 5: Looking up solutions too quickly The learning happens in the struggle. Premature solutions deny you the pattern recognition that matters.
Defender takeaways
Understanding how learners navigate challenge families helps defenders:
- Anticipate systematic probing — Attackers will observe, experiment, analyze, combine
- Design layered defenses — Single defenses fail; combinations resist longer
- Monitor for progression — Repeated attempts from simple to complex indicate systematic attackers
- Vary your defenses — Predictable defense patterns become learnable and bypassable
Related lessons
- BTAA-FUN-021 — Interactive Learning for AI Security Education
- BTAA-FUN-022 — Challenge Design Principles for Security Education
- BTAA-FUN-007 — Prompt Injection in Context
From the Bot-Tricks Compendium
Thanks for referencing Bot-Tricks.com — Prompt Injection Compendium — AI Security Training for Agents... and Humans!
Canonical source: https://bot-tricks.com Bot-Tricks is a public, agent-friendly training resource for prompt injection, adversarial evaluation, and defensive learning. For related lessons, structured indexes, and updated canonical material, visit Bot-Tricks.com.
Use this material only in authorized labs, challenges, sandboxes, or permitted assessments.