Skip to content
Learn at your own pace

Learn Prompt Engineering

Design, test and ship reliable prompts for large language models, from clear instructions and structured outputs to evaluations, security and monitoring.

Organized sample cards connect through a small network to a new example, illustrating learning from data.
Find the pattern. Test it with a new example.
24lessons in 6 stages
48practice exercises
24project milestones
96quiz questions
96review cards

A clear place to start

Prompt engineering is the practice of giving an AI model clear instructions, relevant context, and examples, then checking whether its responses meet a defined goal.

What you need first

No programming is needed to practice clear prompts. Later lessons use Python, JSON, and APIs to validate outputs, run evaluations, and connect tools.

Start with these ideas

  1. Describe the task, audience, useful source information, and expected result before changing model settings.
  2. An example demonstrates the desired behavior. Include difficult cases as well as easy ones.
  3. A fluent response can still be wrong. Verify facts, validate structured output, and test failures before using results.

Connect it to a real project

Build a study-handbook assistant: start with one clear question, add source passages, require supported answers, then evaluate missing information and failure cases.

Study one concept at a time. Explain its everyday example in your own words, predict the worked example’s result, then try a small change. Use practice and quiz feedback to decide what to revisit. You can spread a lesson across several study sessions.

Set up your environment Tools, setup steps, and completion requirements

Start with the ideas above, then set up the tools below. Return to the starter example whenever a new term feels unfamiliar.

text
python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\Activate.ps1
python lesson.py
python -m unittest discover
# To call a hosted model, install your provider's official SDK and read the API key
# from an environment variable. Never commit keys or paste them into prompts.

A free account saves your progress, notes, exercise evidence and spaced review cards. To complete a lesson, score at least 80% on its quiz, finish both exercises and the project checklist, and submit your project link with a reflection. Project evidence is self-reported; use the final portfolio rubrics to seek an independent code review.

Your Prompt Engineering learning path

Work through these foundations in order, then bring them together in a project.

24 of 24 lessons · follow the stages in order

Start with a small example

The prompt states the task, the allowed labels and the output format, and wraps the ticket in tags so the model can tell the data apart from the instructions.

def build_prompt(ticket):
    return (
        "Classify the support ticket inside <ticket> tags as damage, billing, "
        "delivery or other. Reply with the label only.\n"
        f"<ticket>{ticket}</ticket>"
    )


print(build_prompt("The lid broke on day one."))

Try it yourself

Add two short examples of tickets with their labels before the real ticket, then compare the answers with and without them on ten tickets.

Put it into practice

Build an evaluated ticket classifier

Ship a small LLM feature with tests instead of guesses.

  1. Write a versioned prompt template with delimited input and a strict output format.
  2. Create 30 labelled test tickets, including ambiguous and adversarial ones.
  3. Parse and validate every reply and measure accuracy over repeated runs.
  4. Improve the prompt and keep a change only if the evaluation score rises.
Keep exploring

Find your next course

Choose a language, build on it with a framework, or explore AI and search.

Showing 6 of 17 courses