Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesAdvanced Prompt Engineering
Get started free

Online course, Engineering

Advanced Prompt Engineering: reasoning techniques, evaluation and prompts in production

14 lessons of 25–30 minutes, 5 modules: from a mental model of LLMs to DSPy and drift monitoring. A measured task in every lesson.

Start: 7 days freePreview the first lesson, no sign-in

No card needed. The first two lessons are free after sign-up, all lessons come with Pro at $9 a month.

A tree of thoughts: weak branches are cut, one leads to the answerLesson 1, 30 minLLM as a text completion engine
  • Advancedlevel
  • 6 h 50 min14 lessons, 5 modules
  • At your own paceupdated Dec 2, 2026
  • Certificatewith a check code
What you will learnLessonsCertificateQuestionsStart the course

What you will learn

  • Explain unstable output with a model of the LLM as a next-token predictor
  • Structure prompts with XML tags or markdown and stop delimiter injection with a unique delimiter
  • Choose few-shot examples: class diversity, a negative example, dynamic selection of similar ones by embeddings
  • Apply chain-of-thought, built-in thinking with effort and self-consistency with voting, and find tasks where CoT makes the answer worse
  • Implement Tree-of-Thoughts (BFS, k=3, beam 2) without a framework on Game of 24
  • Write a ReAct thought → action → observation loop with tool use, a step limit and loop detection
  • Lock a persona in the system prompt and test it with six role-change attacks
  • Set format and length constraints and measure the share of valid JSON
  • Build a meta-prompt loop that rewrites the prompt from its errors on labeled examples
  • Assemble a regression set of 12 attacks: jailbreaks, encodings, multi-turn, injections in a RAG document
  • Evaluate prompts with promptfoo and LLM-as-judge and check the judge for position bias
  • Optimize few-shot with DSPy BootstrapFewShot and decide whether it beat the hand-written prompt
  • Version prompts, log version, model and tokens, plan A/B tests and catch drift

What the advanced prompt engineering course teaches

The course is for developers who build LLM pipelines and want to measure prompt quality with numbers. 14 lessons of 25–30 minutes, each with a measured task: structure and few-shot, chain-of-thought and self-consistency, Tree-of-Thoughts, ReAct, system prompt hardening, output constraints, meta-prompts, attacks and red-teaming, LLM-as-judge with promptfoo, DSPy and prompt versioning in production.

Pricing and what's free →
01
Free lesson

LLM as a text completion engine

At every step an LLM estimates the probability of the next token, so any word in the prompt shifts the answer. In the task you write three versions of a sentiment prompt (a short question, a role with an explicit label set, the same plus an output format), run each 5 times on one input and compare which is more stable.

Open the lesson →

Course lessons

Foundations of systematic prompting → reasoning techniques → instruction design patterns → reliability and evaluation → optimization and scale. The first two lessons of module 1 are free.

Module 1 · 3 lessons · 1 h 20 min

Foundations of Systematic Prompting

The LLM mental model, prompt structuring (XML/markdown, roles), and balancing zero-shot vs few-shot.

1LLM as a text completion enginefree30 minThe LLM as a probabilistic next-token predictor, and why the wording of a prompt changes the output so much.2Structuring prompts: XML, markdown, rolesfree25 minXML tags for Claude, markdown for GPT/Gemini, separating system/user/assistant, and defending against delimiter injection.3Zero-shot vs few-shot: when and how25 minWhen zero-shot is enough, how to pick few-shot examples (diversity, format matching), negative examples, and dynamic selection.
Module 2 · 3 lessons · 1 h 40 min

Reasoning Techniques

Chain-of-thought and self-consistency, tree-of-thoughts, ReAct — how to make the model reason reliably.

4Chain-of-thought and self-consistency35 minCoT patterns, zero-shot CoT 'Let's think step by step', self-consistency (sampling + voting), when CoT hurts.5Tree-of-Thoughts30 minThe ToT algorithm, BFS/DFS exploration, evaluator prompts, a practical framework-free implementation.6

Who the course is for

  • Developers and AI engineers who run prompts in a product and own answer quality
  • Anyone who wants to compare prompt versions on a test set instead of eyeballing them
  • Teams that need to protect bots and agents from prompt injection and jailbreaks
  • People who took a basic prompting course and keep hitting unstable output

How each lesson works

  1. A 25–30 minute lessonThe technique with a link to the original paper, prompt examples and when it pays off. Python code in 6 of the 14 lessons.
  2. A measured task in every lessonFor example, run 15 GSM8K-style problems three ways and compare accuracy and tokens, or build a promptfooconfig.yaml with 15 test cases and compare two prompt versions. AI checks your solution and explains what to fix (after sign-up).
  3. A ready prompt and common mistakesFor example: self-consistency voting on raw strings, where “60” and “60 km/h” count as different answers; a ReAct Observation written by the model itself; user data placed inside the system prompt.
  4. A 4-question quiz and an AI tutorThe quiz locks in the lesson, the tutor answers questions on the topic.
  5. CertificateAfter all lessons you get a certificate with a unique verification code.

Certificate of completion

You get it when you finish every lesson. Each certificate has its own code, so an employer can check it on our site. You can add it to LinkedIn.

See how a certificate is checked
Sample

Original papers and notes for Claude

The course techniques come from the papers that first described them, linked below.

Two notes if you do the tasks on Claude. API version 2026-10-21 removed the temperature parameter and a request with it returns a 400 error; Claude 4.7 and later models already accepted only the default. Default sampling runs at temperature 1.0, so self-consistency still gets varied answers without the parameter.

Prefilling “{” for JSON stopped working with Claude 4.6: use structured outputs or a tool with a schema instead.

promptfoo has belonged to OpenAI since March 2026 and remains open source under the MIT license.

  • Wei et al., 2022 — Chain-of-Thought Prompting (arXiv)
  • Wang et al., 2022 — Self-Consistency (arXiv)
  • Yao et al., 2023 — Tree of Thoughts (arXiv)
  • Yao et al., 2022 — ReAct (arXiv)
  • Khattab et al., 2023 — DSPy (arXiv)
  • Bai et al., 2022 — Constitutional AI (arXiv)
  • DSPy documentation
  • promptfoo documentation
  • Claude API — Prompting best practices
  • Claude API — migrating to 2026-10-21 (sampling parameters)
  • OpenAI — Reasoning best practices

What is free and what it costs

  • The first two lessons, the LLM mental model and prompt structure, are open with no payment after a free sign-up.
  • After sign-up you get 7 days of full access to all 14 lessons and the whole catalog, no card needed.
  • After that, Pro costs $9 a month or $79 a year. Online card payment is not connected yet: write to info@academl.com and we open access manually.
  • Model API calls in the tasks run on your own key and are billed by the provider at its rates.

Questions about the course

How is it different from Prompt Engineering from Scratch and the Prompt Engineering Guide course?+

Prompt Engineering from Scratch is for people who write requests in a chat and do not code. The Prompt Engineering Guide course follows the open guide by DAIR.AI. This course is for developers: you measure each technique on a set of examples, count tokens and calls, and decide whether it pays off in production.

When does chain-of-thought hurt?+

On simple tasks such as a lookup or trivial classification, reasoning adds noise and tokens and sometimes leads to a wrong answer. With a strict output format it gets in the way of clean JSON, so leave reasoning to the model's built-in thinking and get the answer through structured outputs. Reasoning models need no CoT instructions: OpenAI advises avoiding them, and effort sets the reasoning depth. CoT also makes the answer longer, which matters when latency is tight.

What is Tree-of-Thoughts in simple terms?+

It is a tree search instead of a single reasoning chain. At each step the model proposes several candidates, a separate evaluator prompt marks them sure, maybe or impossible, and only promising branches continue. Yao et al. described it in 2023; it costs several times more than CoT and pays off on search problems like Game of 24.

How do I protect a prompt from prompt injection?+

The lesson combines several measures: unique delimiters with an explicit note that the text inside is data, least privilege for the agent, input and output classifiers, normalizing encoded input, and repeating the rules after the data. One prompt cannot give full protection, so dangerous actions are blocked in code and the attack success rate is tracked with a regression set.

When is DSPy worth it over a hand-written prompt?+

DSPy wins when you have a training set and an automatic metric, a multi-step pipeline, or a pipeline you need to move between models. Hand tuning is better for one-off simple tasks, for generation without a metric and where every word matters. In the lesson task you compare both on accuracy and number of calls.

The course in short

level
Advanced
For whom
For developers
Task
Code and products
Format
Lessons, quizzes and tasks checked by AI
Lesson language
English

Is this course right for you?

Check your level in 3 minutes. We will show which course to start with.

Check my level

More courses on this topic

Full catalog
Advanced, Claude

Prompt Evaluations: Based on Anthropic Materials

An LLM evals course based on Anthropic's materials: test cases and golden answers, Playground, code-graded evals, promptfoo, LLM as a judge. 8 Python lessons.

4 h 10 min, 8 lessonsCertificate
Advanced, Gemini

Gemini in Practice: Real Google Examples

8 advanced Gemini API projects from Google: a ReAct agent, Google Search reports, Barista Bot, PDF to JSON, anomaly detection and embedding re-ranking.

4 h 5 min, 8 lessonsCertificate
Intermediate, Claude

Design with Claude: from idea to design system

7 lessons: how to give Claude design tasks, build a DESIGN.md with tokens and components, generate screens in Stitch and code from Figma over MCP.

3 h 12 min, 7 lessonsCertificate
Intermediate, Claude

Claude Code & Agentic Development

10 lessons on Claude Code in real projects: CLAUDE.md, slash commands, task plans, git and PRs, test-first debugging, MCP servers, VS Code, JetBrains and CI.

4 h 10 min, 10 lessonsCertificate

What next

Prompt evaluations: evals and promptfoo, Anthropic's course →Adversarial prompting and defending AI systems →Anthropic's interactive prompt engineering tutorial →Tool use in Claude: the base for a ReAct agent →AI safety: prompt injection and data protection →AI Agents (Advanced) track →

Start with the LLM mental model

The lessons on the LLM mental model and prompt structure are open after a free sign-up. Sign up with email or Google to get 7 days of full access to every lesson in the course and the whole catalog.

Sign up
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
ReAct: reasoning + acting
35 min
The ReAct pattern (Reason + Act), tool-augmented reasoning, the thought/action/observation loop, a manual implementation with function calling.
Module 3 · 3 lessons · 1 h 25 min

Instruction Design Patterns

Roles and personas, output constraints, and meta-prompts — how to precisely control model behavior.

7Roles, personas, and system-prompt hardening25 minRole prompting, persona locking, hardening the system prompt against jailbreak, the difference between role and identity.8Output constraints: format, length, negative30 minFormat constraints (JSON, CSV, XML) via a schema in the prompt and structured outputs in the API, length limits, negative constraints with a reason, and constraint order in long context.9Meta-prompts and self-improving prompts30 minPrompt generators, self-improving prompts, output self-critique, the constitutional AI pattern.
Module 4 · 3 lessons · 1 h 25 min

Reliability & Evaluation

Self-consistency in production, adversarial robustness, automated prompt-quality evaluation.

10Self-consistency in production25 minSelf-consistency decoding, majority-voting implementation, ensemble prompts, cost vs accuracy tradeoffs.11Adversarial: injections, jailbreak, red-teaming30 minPrompt injection, jailbreak vectors (DAN, role-play, encoding tricks), defensive patterns, red-teaming your own prompts.12Prompt evaluation: LLM-as-judge and test harnesses30 minThe LLM-as-judge pattern, rubric design, pairwise comparison, automated harnesses (PromptFoo), regression testing of prompts.
Module 5 · 2 lessons · 1 h

Optimization & Scale

Automated prompt optimization (DSPy) and production practices: versioning, A/B, cost, drift monitoring.

13Automated optimization: DSPy30 minDSPy overview, automatic few-shot selection, prompt optimization loops, when it beats manual tuning.14Prompts in production: versions, A/B, cost, drift30 minPrompt versioning, A/B testing, cost optimization (caching, shorter prompts), drift monitoring, prompt as code.
Certificate
Your name
for the course
Advanced Prompt Engineering
ACADEML · VERIFIED · ACADEML · VERIFIED · SAMPLE
Can I do the tasks on Claude?+

Yes, with two adjustments. Claude API version 2026-10-21 removed temperature: delete it from the code and sampling runs at temperature 1.0. Prefill stopped working with Claude 4.6, so use structured outputs for JSON. Everything else (tool use for ReAct, XML tags, LLM-as-judge) works as in the lessons.

What level do I need?+

The course is advanced. You need Python, an API key from one provider (Anthropic or OpenAI) and some experience writing prompts. If prompting is new to you, start with Anthropic's interactive tutorial.

How much does the course cost?+

The first two lessons are always free. After sign-up you get 7 days of full access with no card. Pro opens every lesson in the catalog for $9 a month or $79 a year.