Prompt Engineering

Write prompts that work reliably: structure, examples, reasoning, structured output, context limits, safety and evaluation, with small runnable harnesses to test your prompts.

Start course →

Syllabus

Foundations of Prompting

  1. What Prompt Engineering Is
  2. How Models Read Your Prompt
  3. The Anatomy of a Good Prompt
  4. System, User and Assistant Messages

Core Techniques

  1. Be Clear and Specific
  2. Few-Shot Examples
  3. Role, Audience and Tone
  4. Controlling the Output Format
  5. Delimiters and Separating Data from Instructions

Reasoning and Multi-Step Tasks

  1. Step-by-Step Reasoning (Chain of Thought)
  2. Self-Consistency: Sample Several, Take the Majority
  3. Prompt Chaining and Decomposition
  4. Self-Critique and Verification

Structured Output and Validation

  1. Asking for JSON and Validating It
  2. Retry With Feedback
  3. Extraction Patterns and "Unknown" Handling

Context: Budgets, Memory and Retrieval

  1. Context Windows and Token Budgets
  2. Long Prompts: Order and Placement
  3. Grounding With Retrieved Documents
  4. Conversation Memory and Summarisation

Safety and Robustness

  1. Prompt Injection and Defences
  2. Privacy, Secrets and Responsible Use
  3. Handling Refusals, Uncertainty and Off-Topic Requests

Evaluating and Operating Prompts

  1. Building a Test Set and Harness
  2. Versioning and Change Control for Prompts
  3. Cost, Latency and Prompt Length
  4. Monitoring and Continuous Improvement

Putting It Together

  1. Case Study: A Support-Ticket Triage Prompt
  2. Revision: Cheat Sheet and Self-Check