# Learn Prompt Hacking

> A comprehensive open-source course covering prompt engineering, prompt hacking, LLM security, jailbreaks, prompt injection, and adversarial machine learning techniques.

Learn Prompt Hacking is an open-source educational repository maintained by TrustAI-laboratory, published under the MIT License. It covers prompt engineering, generative AI development, and the full spectrum of prompt hacking and LLM security topics, from jailbreaks to adversarial machine learning. The project is hosted on GitHub and accompanied by a tech blog at securaize.substack.com authored by Han (Andrew) Zheng, Co-founder & CTO at Infron.

## What It Is

Learn Prompt Hacking is a Jupyter Notebook-based course repository that documents progress on prompt engineering and prompt hacking education. It targets data scientists, AI developers, and security practitioners who need to understand both how to use LLMs effectively and how to defend against the attack surfaces they introduce. The course is structured around four major pillars: Prompt Engineering Technology, GenAI Development Technology, Prompt Hacking Technology, and LLM Security Defence Technology.

## What the Course Covers

The repository organizes its content into clearly defined topic areas:

- **Prompt Engineering Technology** — techniques for effective interaction with large language models
- **GenAI Development Technology** — building applications on top of generative AI
- **Prompt Hacking Technology** — including ChatGPT jailbreaks, GPT Assistants prompt leaks, GPTs prompt injection, LLM prompt security, super prompts, prompt hack, and adversarial machine learning
- **LLM Security Defence Technology** — mitigating and preventing GenAI application risks
- **LLM Hacking Resources, Security Papers, and Conference Slides** — curated reference material for practitioners

## Background and Motivation

The repository's README situates the course in the context of the post-ChatGPT era, noting that 2023 marked a turning point in mass adoption of general-purpose language models across industries. It argues that the rapid arrival of AI has introduced a large number of new attack surfaces and risks to the IT software ecosystem, making LLM security knowledge essential alongside prompt engineering skills. The course draws on foundational NLP research including the "Attention is All You Need" paper, BERT, GPT-2, GPT-3, and related models.

## Audience and Use Case

The primary audience is data scientists and AI developers who need to stay current with LLM techniques while also understanding the security implications of deploying generative AI. The dual objective — mastering prompt engineering for effective solutions and understanding LLM application risks — makes it relevant for both builders and security reviewers working in AI-driven environments.

## Current Status

The repository was created in August 2024 and last updated in September 2026, with the most recent push to the main branch in April 2025. It has accumulated 393 stars and 52 forks on GitHub. The project is tagged with topics including jailbreak, llm-security, prompt-engineering, prompt-injection, and security-ctf, reflecting its dual focus on learning and adversarial research.

## Features
- Prompt engineering techniques
- ChatGPT jailbreak examples
- GPT Assistants prompt leak demonstrations
- GPTs prompt injection coverage
- LLM prompt security guidance
- Super prompts and prompt hacking
- Adversarial machine learning content
- LLM security defence techniques
- Curated LLM hacking resources
- LLM security papers and conference slides
- Jupyter Notebook format
- MIT licensed and freely distributable

## Integrations
Jupyter Notebook, ChatGPT, GPT Assistants, OpenAI GPTs

## Platforms
WEB, API, CLI

## Pricing
Open Source

## Version
main

## Links
- Website: https://securaize.substack.com/
- Documentation: https://github.com/TrustAI-laboratory/Learn-Prompt-Hacking
- Repository: https://github.com/TrustAI-laboratory/Learn-Prompt-Hacking
- EveryDev.ai: https://www.everydev.ai/tools/learn-prompt-hacking
