Cyber Monday Sale30% OFFApplied automatically. Ends Fri Dec 4.

Claim nowClaim nowApplied automatically. Ends Fri Dec 4.New

The Google AI Studio Specialization. Build 12 real apps, no code needed.

Enroll nowEnroll now
All Courses
FreeBeginner course · Self-paced

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

  • OpenAI
  • Google
  • Microsoft
  • Dropbox
  • TikTok
  • BCG
  • Scale
  • Deloitte
  • ByteDance
Overview

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.

Results

What You'll Learn

  1. 01

    Explain what prompt hacking is

    Describe how crafted inputs manipulate large language models, and what that reveals about their vulnerabilities.

  2. 02

    Identify a prompt injection

    Know what a prompt injection attack is, and how to identify one in an AI system.

  3. 03

    Identify a jailbreak

    Know what jailbreaking is, and how to identify a jailbreak attack on an AI system.

  4. 04

    Learn from a real prompt injection

    Study our own case in the lesson "We got Prompt Injected While Creating this Course".

  5. 05

    Test AI systems the ethical way

    Learn how to perform ethical prompt hacking testing to identify and assess vulnerabilities in AI systems.

  6. 06

    Defend your AI applications

    Implement proven defensive techniques like few-shot prompting and input sanitization to protect AI systems.

Who it's for

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 Hacking
In the course

What'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.

Full syllabus

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
Taught by

Meet Your Instructors

  • Sander Schulhoff

    Founder & CEO

    Learn Prompting

    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

    Learn Prompting

    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.
Plans

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.

$349pay once

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
Start learning

14-day money-back guarantee. Not satisfied? Get a refund within 14 days of the charge.

Prefer to subscribe?

Annual

Save $219

$21/month

Billed yearly ($249)

Start learning

Quarterly

Save $72 a year

$33/month

Billed quarterly ($99)

Start learning

Monthly

$39/month

Billed monthly ($39)

Start learning

Turn off auto-renewal any time. 14-day money-back guarantee.

Teams

$199per seat/year

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.

FAQ

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 Hacking
Is 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 plans
How 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 plans
Do 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 Sales

Join more than
3 million learners
worldwide

Free with a Learn Prompting account.

Not ready yet?

Get the Learn Prompting newsletter

Our weekly email. Free.

We respect your privacy. Unsubscribe at any time.