The Research Report
Anthropic's Free Prompt Engineering Course Is Better Than Most Paid Ones
Anthropic published an interactive prompt engineering tutorial on GitHub. It has 34,966 stars. That is more than most programming languages.
The repository is anthropics/prompt-eng-interactive-tutorial. It is a Jupyter Notebook course with 9 chapters, hands-on exercises, and an answer key. It teaches you how to write prompts for Claude by actually writing prompts for Claude. Not reading about it. Doing it.
What It Covers
The course runs through 9 chapters in order. Each chapter has a lesson and a set of exercises. Each lesson includes an "Example Playground" at the bottom where you can modify prompts and see how the changes affect Claude's responses.
Chapter 1: Basic Prompt Structure. The foundation. How to construct a prompt that gives Claude enough context to produce useful output. This is where most people stop learning. The course keeps going.
Chapter 2: Being Clear and Direct. The 80/20 of prompt engineering. Most prompt problems come from vague instructions. This chapter teaches you to say exactly what you want. No hedging. No ambiguity. The results from fixing clarity alone solve a large fraction of common failures.
Chapter 3: Assigning Roles. Giving Claude a persona changes its behavior. Tell it to act as a legal analyst and it shifts its vocabulary, reasoning depth, and output format. This chapter shows when role assignment helps and when it is just noise.
Chapter 4: Separating Data from Instructions. Mixing your input data with your instructions confuses the model. This chapter teaches you to use XML tags, delimiters, or clear section headers to keep data and instructions apart. The technique is simple but it fixes a common failure mode where Claude confuses your examples with your instructions.
Chapter 5: Formatting Output and Speaking for Claude. How to control the format of Claude's response. Specifying output structure, using Claude's own voice to set tone, and pre-filling part of the response to steer the direction.
Chapter 6: Precognition. This is chain-of-thought prompting. Ask Claude to think step by step before giving an answer. The chapter shows how this improves accuracy on reasoning tasks and when it adds unnecessary overhead.
Chapter 7: Using Examples. Few-shot prompting. Providing input-output pairs so Claude can learn the pattern. This chapter covers how many examples you need, what makes a good example, and when examples beat instructions.
Chapter 8: Avoiding Hallucinations. The hard problem. Claude can generate plausible-sounding but incorrect information. This chapter teaches techniques to reduce hallucinations. Ask Claude to admit uncertainty. Provide reference material. Use grounded generation patterns. None of these eliminate hallucinations entirely, but they reduce the rate.
Chapter 9: Building Complex Prompts. Industry use cases. Chatbot design. Legal services prompts. Financial services prompts. Coding prompts. This is where you put the first 8 chapters together into real systems.
The appendix goes beyond standard prompting. It covers chaining prompts together, tool use, and search and retrieval patterns. These are the building blocks of agentic systems.
What Makes It Work
Three things separate this tutorial from the average prompt engineering guide.
It is interactive. You do not read about prompting. You write prompts in a Jupyter Notebook, run them against a live Claude model, and see the results immediately. The Example Playground in each lesson lets you modify the provided prompts and experiment. Reading that "being clear and direct improves results" is one thing. Watching a vague prompt produce a vague answer and then rewriting it to get a precise answer is different.
It uses the smallest model. The tutorial runs on Claude 3 Haiku, Anthropic's smallest, fastest, cheapest model. This is a deliberate choice. If a prompt technique works on Haiku, it works on everything. Haiku exposes prompt weaknesses faster than larger models because it has less capacity to compensate for bad instructions. When your prompt is unclear, Haiku fails obviously. That makes it a better learning tool.
It has an answer key. Every exercise has a reference solution in a shared Google Sheets document. You can check your work. You can see what a good prompt looks like before you write your own. This turns the course from a lecture into a practice session.
The Google Sheets Alternative
Anthropic also published the tutorial as a Google Sheets version using the Claude for Sheets extension. Many users find this format more approachable than Jupyter Notebooks. You do not need Python installed. You do not need to know how to run a notebook. You just open a spreadsheet and start typing prompts.
The spreadsheet version is at the link in the repository README. Both versions cover the same material. Pick the one that fits your workflow.
Who Should Take It
Anyone who writes prompts for production systems. That includes developers building LLM-powered features, product managers specifying AI behavior, and content designers shaping conversational agents.
The course assumes no prior experience with prompt engineering. It builds from first principles. Chapter 1 starts with "what is a prompt." By Chapter 9, you are building multi-step industry prompts with tool use and retrieval.
Experienced prompt engineers will still find value in the later chapters and the appendix. The chaining, tool use, and retrieval patterns are the foundation of production agentic systems. If you have not worked through those systematically, this is a clean way to do it.
What It Does Not Cover
This is a Claude-specific tutorial. The techniques transfer to other models, but the examples and the live model are Claude. If you primarily work with GPT or Gemini, you will need to adapt.
The course focuses on prompt engineering, not prompt optimization. It does not cover automated prompt tuning with DSPy, prompt compression, or systematic prompt evaluation frameworks. It teaches you to write good prompts by hand. That is still where most production work happens.
It also does not cover structured output enforcement, constrained decoding, or schema-based generation. These are increasingly important for production systems. The course teaches you to ask for JSON in your prompt. Constrained decoding enforces it at the token level. Both skills matter.
Why 34K People Starred It
The star count tells you something about the state of prompt engineering education. There is real demand for structured, practice-based learning. Most prompt engineering content is either too shallow (a blog post with three tips) or too theoretical (a research paper on attention patterns). This tutorial hits the middle ground. It is practical enough to use immediately. It is deep enough to change how you think about prompting.
The fact that Anthropic published it for free, with an answer key, using their cheapest model, suggests they want developers to get better at using Claude. Better prompts mean better results. Better results mean more usage. The tutorial is a developer experience investment that pays for itself.
If you have not worked through it, set aside an afternoon. The 9 chapters take 2 to 4 hours depending on how much you experiment. The exercises are where the actual learning happens. Do not skip them.