π Learn Prompt Engineering¶
A structured, seven-module curriculum for mastering prompt engineering β from foundational concepts through advanced techniques and autonomous agent architectures. No prior prompt engineering experience is assumed.
Choose Your Path¶
| Path | Who It's For | Start Here |
|---|---|---|
| Beginner / Non-Programmer | High-school students, writers, researchers, or anyone new to AI | Beginner's Reading Guide β a curated path through the curriculum with plain-language signposts and code-free exercise alternatives |
| Developer / CS Practitioner | Graduate students, professional developers, and prompt engineers | Continue below with the full Learning Roadmap |
Learning Roadmap¶
Start at Module 1 and work through in order. Each module builds on the previous one and includes 2β3 hands-on exercises.
| Module | Topic | You'll Learn | Level | Time |
|---|---|---|---|---|
| 00 β Orientation | Narrative On-Ramp | A story-first guide that shows prompt improvement in action β no jargon, no code | Beginner | 15 min |
| 01 β Introduction | What & Why | What prompt engineering is, the anatomy of a prompt, naive vs. engineered prompts | Beginner | 30 min |
| 02 β Core Principles | How to Think | Specificity, decomposition, iteration, evaluation β the four pillars | BeginnerβIntermediate | 45 min |
| 03 β Patterns | What to Use | Zero-shot, few-shot, chain-of-thought, role-playing, constrained output, ReAct | Intermediate | 60 min |
| 04 β Best Practices | Production Skills | Token management, version control for prompts, team workflows, anti-patterns | IntermediateβAdvanced | 45 min |
| 05 β Advanced Patterns | Cutting Edge | RAG, prompt injection defense, multimodal prompting, evaluation pipelines | Advanced | 60 min |
| 06 β Agentic Patterns | Autonomous Agents | Plan-and-execute, reflection loops, multi-agent collaboration, memory, tool-use design, agent safety | Advanced | 60 min |
Total estimated time: ~6 hours (reading + exercises). Add ~20 hours for the full Research Extension Track, or ~2 day for the optional lab experiments.
Deep-Dive Comparisons¶
After completing the modules (or when referenced from within them), these standalone analyses provide detailed, research-backed comparisons of specific techniques.
| Document | Compares |
|---|---|
| Chain-of-Thought Comparison | Few-Shot CoT vs. Zero-Shot CoT vs. Self-Consistency CoT |
| ReAct Comparison | ReAct (reasoning + acting) vs. standard prompting |
| Instruction Tuning Comparison | FLAN, T0, InstructGPT approaches |
| PromptSource Comparison | Template-based vs. freeform prompting |
| Few-Shot Comparison | Zero-shot, one-shot, and few-shot strategies |
| Adversarial Robustness Comparison | Attack types, defenses, and safety-aware prompting |
| Automatic Prompt Optimization | DSPy, OPRO, APE, and PromptBreeder β when to automate vs. hand-craft |
| Cross-Model Portability | GPT-4o, Claude 3.5, Gemini 1.5, Llama 3 β behavioral differences and portable prompt strategies |
Worked Examples¶
| Document | What It Covers |
|---|---|
| Prompt Patterns in Practice | One worked example for each of the six patterns from Module 3, showing naive vs. pattern-applied prompts |
| Advanced Patterns in Practice | Worked examples for Module 5: RAG grounding, injection-resistant system prompts, evaluation pipelines, and multimodal UI review |
Glossary¶
Unfamiliar with a term? The Glossary provides concise definitions for all key terms used across the curriculum β from "token" and "context window" to "RAG" and "prompt injection."
Quick Reference¶
Want to track your progress? Fork or download the Progress Tracker β a one-page checklist for every module, lab, comparison doc, and research paper in the curriculum.
Need a refresher without re-reading an entire module? The Cheat Sheet provides a one-page reference card covering all five prompt components, six patterns, four principles, five anti-patterns, and a copy-paste prompt template.
Prompt not working? The Prompt Debugging Guide provides a systematic decision tree for diagnosing failures β fifteen failure categories, a diagnostic flowchart, and targeted fix strategies for each.
Want to use LLMs to write better prompts? The Meta-Prompting Guide covers prompt generation, evaluation, and refinement β with copy-paste templates and a four-step workflow.
Ready to add prompts to your CI pipeline? The CI/CD Integration Guide covers regression testing, schema validation, security scanning, and complete GitHub Actions workflows.
Looking for ready-to-use prompts? The Prompt Cookbook provides 20 copy-paste prompts for everyday non-programming tasks β writing, analysis, research, communication, and decision-making β each tagged with the patterns it uses.
New to prompt engineering but already have LLM calls in your code? The Prompt Engineering for Your Existing Codebase guide walks you through auditing, scoring, and incrementally improving prompts without a full rewrite.
Want to see good vs. bad prompts side-by-side? The Before & After Gallery shows 15 prompt comparisons organized by task β no pattern jargon required.
Want to understand why prompt design decisions were made? The Architecture Decision Records document the reasoning behind four real-world prompt design choices, with alternatives considered and trade-offs accepted.
Want to read the primary research? The Research Extension Track provides curated study guides for 15 foundational papers β with summaries, discussion questions, and connections back to the curriculum.
Hands-On Labs¶
Ready to experiment with a real API? The Labs directory contains six runnable Python experiments that let you observe prompt-engineering concepts first-hand:
| Lab | Concept | Module Link |
|---|---|---|
| Lab 1 β Zero-Shot vs. Few-Shot | Classification with/without examples | Module 3 Β§3.2βΒ§3.3 |
| Lab 2 β Chain-of-Thought | Step-by-step reasoning | Module 3 Β§3.4 |
| Lab 3 β Specificity Spectrum | Vague β moderate β specific prompts | Module 2 Β§2.1 |
| Lab 4 β Evaluation Pipeline | LLM-as-Judge scoring | Module 5 Β§5.4 |
| Lab 5 β Tool-Calling & Structured Output | JSON-mode vs. function-calling reliability | Module 5 Β§5.4 + Module 3 Β§3.6 |
| Lab 6 β Plan-and-Execute Agent | Planner + Executor agent in pure Python | Module 6 Β§6.2 |
See the Lab README for setup instructions.
Exercise Solutions¶
Finished the exercises? Compare your work against the Reference Solutions for all 20 exercises across Modules 1β6. (Module 0 is a narrative on-ramp with no exercises.) Exercises marked (Exemplar) show one valid approach β your answers may differ and still be correct.
Prerequisites¶
For the developer path (full roadmap): You should be comfortable with at least one programming language (Python or TypeScript preferred) and have basic familiarity with what large language models are.
For the beginner path: No programming experience is required β just curiosity and access to any LLM (ChatGPT free tier, Claude free tier, Google Gemini, or similar). See the Beginner's Reading Guide for the recommended route.
If you have access to an LLM, you'll get the most out of the exercises. No prior prompt engineering experience is required for either path.
How This Connects to the Prompt Templates¶
Throughout these modules, you'll encounter cross-references to real production prompts in the prompts/ directory. These are not decorative β they show you how the concepts you're learning are applied in practice. For example, Module 3 references the cybersecurity audit prompt to demonstrate multi-pattern composition, and Module 5 references the safety-gate prompt to illustrate constrained output and LLM-as-judge patterns.
Citation¶
All empirical claims are cited using entries in references.md. Performance figures are explicitly flagged as either exact (from a cited source) or approximate (for pedagogical purposes). See the bibliography for DOIs and stable URLs.