---
title: "Advanced Prompt Engineering — free course with certificate"
description: "Context engineering, structured outputs, thinking controls, tool and agent prompts, caching, evals and optimisation for production"
url: https://optimizeall.com/learn/advanced-prompt-engineering
updated: 2026-10-05
---

AI · Advanced · 383 minutes · free · updated Sep 2026

# Advanced Prompt Engineering

Context engineering, structured outputs, thinking controls, tool and agent prompts, caching, evals and optimisation for production

- **Lessons:** 17 in 7 modules
- **Video lectures:** 17 lectures, 131 minutes
- **Updated:** Sep 2026

## Tools you'll use

- Claude API
- OpenAI API
- Gemini API
- Python
- Pydantic
- DSPy
- Promptfoo

[Start the course](https://optimizeall.com/learn/advanced-prompt-engineering/designing-system-prompts)

## About this course

This advanced course turns prompting into an engineering discipline for teams shipping AI features in 2026. You will design system prompts and practise context engineering: deciding exactly what the model sees, in what order, and what to leave out. You will build few-shot sets and schema-enforced structured outputs, decompose work into chains, and learn when reasoning models and extended or adaptive thinking pay off, with hands-on effort controls in the Claude, OpenAI and Gemini APIs. A dedicated module covers tool definitions and system prompts for agents, including long-running context management. You will reduce hallucinations, defend against prompt injection, build evaluation sets, calibrate LLM judges and use automated prompt optimisation safely. Finally, you will run prompts like production code: versioning, prompt caching, cost and latency. Every lesson includes copy-paste Python you can run today.

## What you will learn

- Design system prompts and curate context for accuracy, cost and latency
- Build few-shot sets and schema-enforced structured outputs with validation in code
- Choose when to use reasoning models and tune thinking effort with evidence
- Write tool definitions and agent system prompts that behave safely over long runs
- Reduce hallucinations and defend against direct and indirect prompt injection
- Build eval sets, calibrate LLM judges and run automated prompt optimisation safely
- Operate prompts in production with versioning, prompt caching and cost controls

## Course content

### System prompts and context engineering

Design system prompts that behave like a clear job brief, then decide exactly what information the model sees, in what order, and why.

- [Designing system prompts and roles](https://optimizeall.com/learn/advanced-prompt-engineering/designing-system-prompts): 12 min
- [Context engineering: what the model sees, and in what order](https://optimizeall.com/learn/advanced-prompt-engineering/context-engineering): 13 min

### Few-shot examples and structured outputs

Use examples to teach patterns the instructions cannot, and get machine-readable outputs that downstream systems can trust.

- [Few-shot and example design](https://optimizeall.com/learn/advanced-prompt-engineering/few-shot-example-design): 12 min
- [Structured outputs and JSON schemas](https://optimizeall.com/learn/advanced-prompt-engineering/structured-outputs-json-schemas): 12 min

### Decomposition, reasoning and verification

Break complex work into reliable steps, understand when explicit reasoning helps or hurts with modern reasoning models, and add verification loops.

- [Decomposition and prompt chaining](https://optimizeall.com/learn/advanced-prompt-engineering/decomposition-and-prompt-chaining): 12 min
- [Reasoning models: when step-by-step helps and when it hurts](https://optimizeall.com/learn/advanced-prompt-engineering/reasoning-models-step-by-step): 13 min
- [Self-critique and verification loops](https://optimizeall.com/learn/advanced-prompt-engineering/self-critique-verification): 11 min

### Prompting tools and agents

Write tool definitions models use correctly, and system prompts that keep agents effective, safe and on-task over long runs.

- [Tool definitions and tool-use prompts](https://optimizeall.com/learn/advanced-prompt-engineering/tool-definitions-and-tool-use-prompts): 14 min
- [System prompts for agents and long-running tasks](https://optimizeall.com/learn/advanced-prompt-engineering/system-prompts-for-agents): 14 min

### Reducing hallucinations and defending against prompt injection

Make models say only what they can support, admit uncertainty, and resist malicious instructions hidden in the content they process.

- [Reducing hallucinations: grounding, citations and 'I don't know'](https://optimizeall.com/learn/advanced-prompt-engineering/reducing-hallucinations): 13 min
- [Prompt injection and defence basics](https://optimizeall.com/learn/advanced-prompt-engineering/prompt-injection-defence): 13 min

### Evaluation sets and grading

Replace 'it looks good' with evidence: build evaluation sets, write rubrics, and use LLM-as-judge carefully.

- [Building evaluation sets that reflect reality](https://optimizeall.com/learn/advanced-prompt-engineering/building-eval-sets): 12 min
- [Grading outputs: code checks, rubrics and LLM-as-judge](https://optimizeall.com/learn/advanced-prompt-engineering/grading-rubrics-llm-judge): 13 min
- [Automated prompt optimisation and auto-prompting](https://optimizeall.com/learn/advanced-prompt-engineering/automated-prompt-optimisation): 13 min

### Prompt operations: versioning, cost and latency

Run prompts like production software: versioned, tested, monitored and tuned for cost and speed.

- [Versioning and managing prompts in production](https://optimizeall.com/learn/advanced-prompt-engineering/versioning-prompts): 11 min
- [Cost and latency trade-offs](https://optimizeall.com/learn/advanced-prompt-engineering/cost-latency-tradeoffs): 12 min
- [Prompt caching in practice](https://optimizeall.com/learn/advanced-prompt-engineering/prompt-caching-in-practice): 12 min

## Certificate: Certified Advanced Prompt Engineer

The holder can design production-grade prompts: precise system prompts, engineered context, few-shot examples and JSON schemas, prompt chains and verification loops. They can reduce hallucinations, defend against prompt injection, build evaluation sets with calibrated graders, and manage prompts with versioning and cost-latency trade-offs.

- **Final assessment:** 25 questions, 40 minutes
- **Passing score:** 80%
