Introduction to Prompt Hacking
Learn how attackers use prompt injection and jailbreaking to manipulate AI models, and how to defend the AI applications you build against them.
- Level
- Beginner
- Created for absolute beginners
- Length
- 1 Hour
- Learn at your own pace
- Rating
- 4.6
- From 141 reviews
- 68,454 learners enrolled
- Price
- Free
- Certificate with Learn Prompting Plus
- Taught by

Sander SchulhoffFady Yanni
Trusted by the world's biggest companies and 3,000,000+ people
Learn how AI gets hacked, and how to defend against it
Techniques such as prompt injection, jailbreaking, and prompt leaking can lead to serious risks like misinformation, data breaches, and system misuse. With LLMs increasingly deployed in sensitive areas such as healthcare, finance, and legal advisory, understanding and addressing these vulnerabilities is crucial.
This course starts with what prompt hacking is. Then it covers the attacks, in the module Prompt Injection and Jailbreaking, and the defenses, in the module Prompt Hacking Defenses. It is not only theory. One lesson is our own case: "We got Prompt Injected While Creating this Course".
Four lessons teach the material, and three quizzes and two assignments let you apply what you learned. By the end of the course, you'll have the skills to identify and defend against prompt-related threats and a deeper understanding of how to challenge, optimize, and secure LLMs effectively.
What You'll Learn
- 01
Explain what prompt hacking is
Describe how crafted inputs manipulate large language models, and what that reveals about their vulnerabilities.
- 02
Identify a prompt injection
Know what a prompt injection attack is, and how to identify one in an AI system.
- 03
Identify a jailbreak
Know what jailbreaking is, and how to identify a jailbreak attack on an AI system.
- 04
Learn from a real prompt injection
Study our own case in the lesson "We got Prompt Injected While Creating this Course".
- 05
Test AI systems the ethical way
Learn how to perform ethical prompt hacking testing to identify and assess vulnerabilities in AI systems.
- 06
Defend your AI applications
Implement proven defensive techniques like few-shot prompting and input sanitization to protect AI systems.
Who Should Enroll?
Developers
Learn how to build secure and safe AI applications.
AI Enthusiasts
Gain a foundational understanding of prompt hacking, one of the biggest vulnerabilities in LLMs.
Security Professionals
Explore practical defense techniques for generative AI systems.
Researchers
Deepen your understanding of prompt hacking vulnerabilities and safeguards.
Before you start
Beginner level
Created for absolute beginners. The course starts with an introduction to prompt hacking.
Ethical testing only
What you learn is for ethical testing: finding and assessing vulnerabilities in AI systems so they can be defended.
Already know prompt injection and jailbreaking? This course will feel basic.
See Advanced Prompt HackingWhat's included
11 lessons in 4 modules
Including 3 quizzes and 2 assignments.
Free with an account
Every lesson is open with a free Learn Prompting account.
Learn at your own pace
Start anytime, on your phone or computer, and pick up where you left off.
Expert-Led Community
Join one of the largest AI learning communities with 45,000+ members, where you can network with top professionals, collaborate with peers, and get direct insights from AI experts.
Certificate with Plus
By upgrading to Learn Prompting Plus, you automatically receive a certificate of completion for every course you complete.
A clear next step
When you finish, go on to Advanced Prompt Hacking.
Introduction to Prompt Hacking curriculum
4 modules11 lessons3 quizzes2 assignments
01IntroductionLearn what prompt hacking is and why it matters.1 lesson
- IntroductionLesson
02Prompt Injection and JailbreakingSee how attackers get an AI model to do what it should not.6 lessons · 2 quizzes · 2 assignments
- PI + JBLesson
- QuizQuiz
- AssignmentAssignment
- We got Prompt Injected While Creating this CourseLesson
- QuizQuiz
- AssignmentAssignment
03Prompt Hacking DefensesProtect your AI application from these attacks.2 lessons · 1 quiz
- DefensesLesson
- QuizQuiz
04Exit Survey2 lessons · 1 reading · 1 survey
- Review the CourseReading
- Exit SurveySurvey
Meet Your Instructors

Sander Schulhoff
Founder & CEO

Sander Schulhoff is the CEO of Learn Prompting and HackAPrompt. He created the first Prompt Engineering guide on the internet, two months before ChatGPT was released. It has taught 3 million people how to prompt ChatGPT.
More about Sander
- The Prompt Report
- Led the team behind the most comprehensive study of prompt engineering ever done. The 76-page survey, co-authored with OpenAI, Microsoft, Google, Princeton, Stanford, and other leading institutions, analyzed 1,500+ academic papers and covered 200+ prompting techniques.
- HackAPrompt
- Partnered with OpenAI to run the first AI Red-Teaming competition, which was 2x larger than the White House's subsequent AI Red-Teaming competition. Today, HackAPrompt partners with the Frontier AI labs to produce research that makes their models more secure.
- Award-winning research
- His HackAPrompt research won Best Theme Paper at EMNLP 2023.
- Workshops
- Has led AI security workshops at OpenAI, Microsoft, Stanford, and Deloitte.
- Background
- Natural Language Processing and deep reinforcement learning.

Fady Yanni
Founder and COO

Fady Yanni is the Founder and COO of Learn Prompting, the leading Prompt Engineering resource that has taught over 3 million people how to communicate effectively with AI.
More about Fady
- Before Learn Prompting
- Head of Fundraising at the Farama Foundation, the open-source maintainer of every major Reinforcement Learning library, including OpenAI's flagship project, Gym.
Start free.
Go further with Plus.
- 14-day money-back guarantee
- Learn at your own pace, on your phone or computer
- Turn off auto-renewal any time
Lifetime
Pay once. Keep Plus forever.
$349
One payment. No subscription, no renewal.
Your lifetime access includes
- Every Plus course we offer today, and every new one we release
- Every future lesson and update, at no extra cost
- A Certificate of Completion for each Plus course you finish
- The in-course AI Playground with AI Tutor
14-day money-back guarantee. Not satisfied? Get a refund within 14 days of the charge.
Prefer to subscribe?
Annual
Save $219$21
Billed yearly ($249)
Quarterly
Save $72 a year$33
Billed quarterly ($99)
Monthly
$39
Billed monthly ($39)
Turn off auto-renewal any time. 14-day money-back guarantee.
Teams
$199
For teams of 2 to 100 people
Billed once a year.
- See each member's progress
- Add seats whenever your team grows
- Add and remove members as your team changes
Every Plus plan includes:
- Access to our entire course library, including Plus Courses
- Earn Certificates of Completion for all courses
- Use our in-course AI Playground with AI Tutor
- Complete engaging, hand-graded AI projects
- Join the largest AI Learning Discord community
- Receive priority customer support
Lifetime covers every Plus course. It does not include the AI Red Teaming Masterclass, the Google AI Studio Specialization or the AIRTP+ exam, which are sold on their own. Lifetime means for as long as Learn Prompting Plus exists.
Frequently Asked Questions
What does Introduction to Prompt Hacking cover?
Prompt injection, jailbreaking and the defenses against them. Prompt Hacking is crafting inputs or prompts to manipulate large language models (LLMs), revealing vulnerabilities in how they interpret and respond to instructions.
Why should I learn about prompt hacking?
Because of what it can lead to: misinformation, data breaches, and system misuse. These risks matter more as LLMs are increasingly deployed in sensitive areas such as healthcare, finance, and legal advisory.
Does the course teach how to defend against prompt injection?
Yes. The module Prompt Hacking Defenses comes right after the attacks. It covers defensive techniques like few-shot prompting and input sanitization.
How long does Introduction to Prompt Hacking take?
It is listed at 1 hour, and it is self-paced, so you can go faster or slower. The course has 4 lessons, 3 quizzes and 2 assignments.
Who teaches Introduction to Prompt Hacking?
Sander Schulhoff, Founder & CEO, Learn Prompting, and Fady Yanni, Founder and COO at Learn Prompting. Sander is the creator of HackAPrompt.
What should I take after this course?
Advanced Prompt Hacking. It goes deeper into the attacks, with modules on contextual hacking, cognitive hacking and few-shot attacks. It is one of the Plus courses.
See Advanced Prompt HackingIs Introduction to Prompt Hacking free?
Yes. Create a free Learn Prompting account and every lesson in the course is open to you.
What's the difference between a Free account and the Plus plan?
Free opens our free courses start to finish, the first 2 lessons of every paid course, the AI playground and our Discord community.
Plus adds all 13 Plus courses, start to finish, a certificate for every Plus course you finish, and more messages in the AI playground.
Compare all plansHow much does Learn Prompting Plus cost?
Plus is $39 a month, $99 every 3 months, $249 a year or $349 once. Pay once and keep Plus forever, with every Plus course we add later. Lifetime does not include courses or exams sold on their own. Plus comes with a 14-day money-back guarantee.
Compare plansDo I get a certificate?
By upgrading to Learn Prompting Plus, you automatically receive a certificate of completion for every course you complete. These certificates can easily be shared on LinkedIn, Twitter, or any other social platform to showcase your new skillset.
Can I train my team with this course?
Yes. Team plans give every seat the Plus courses and certificates, and the team owner sees each member's progress. For teams of 2 to 100 people.
Contact SalesExplore more AI Courses
Research backed, made for everyone
Your next courseAdvanced Prompt Hacking
How jailbreaking and prompt injection work, and how to mitigate them.
- Advanced Prompt Hacking Techniques
- Security Testing
View course
FreeChatGPT for Everyone
Use ChatGPT effectively. No prior experience required.
- ChatGPT Basics
- Prompt Engineering Basics
- DALL·E 3 Basics
View course
Introduction to Prompt Engineering
Craft effective instructions for ChatGPT, Claude and Perplexity.
- Prompt Writing & Optimization
- LLM Functionality Insights
- Problem-Solving with AI
View course









