Lesson 2.2 – Prompt Engineering
Prompt Engineering
How you ask changes what you get. Learn the prompting moves, how to iterate, how to build a reusable template, and how to evaluate what AI gives you.
Lesson Objectives
By the end of this lesson you will be able to:
- Apply prompting techniques: context-setting, constraints, role assignment, and examples
- Iterate on prompts systematically to improve output quality
- Build a prompt template that produces consistent results for a specific task
- Evaluate outputs for accuracy, bias, and relevance
Four Prompting Moves
A strong prompt is not magic; it is built from a few clear moves. Use them together and your results get far more consistent.
Iterate to Improve
Your first prompt is a draft. The skill is iterating: read the output, change one thing, and try again. Better prompts produce better, more consistent outputs, and the link is direct.
Evaluate Your Output
Never use an output just because it looks polished. Check it against three questions before you trust it.
| Check | Ask yourself |
|---|---|
| Accuracy | Is it actually true? Did I verify the key facts? |
| Bias | Is it fair? Does it leave anyone out? |
| Relevance | Does it answer what I actually asked? |
๐งโ๐ป Activity: Build a Prompt Template
Make a reusable prompt
A template is a prompt you can reuse for a task you do often. Build one and test that it gives consistent results.
- Pick a repeated task. For example: writing a friendly reminder, or summarizing an article.
- Write the template. Include a role, the task, the context, and the format.
- Test it twice. Use it on two different inputs and check the results are consistent.
- Evaluate. Check both outputs for accuracy, bias, and relevance, then refine the template.
Lesson Summary
| Idea | Why it matters |
|---|---|
| Four moves | Context, constraints, role assignment, and examples. |
| Iterate | Change one thing at a time to improve the output. |
| Quality link | Better prompts produce better outputs. |
| Templates | A reusable prompt gives consistent results for a repeated task. |
| Evaluate | Always check accuracy, bias, and relevance. |
Vocabulary: tap a card to flip
Tap a card (or press Enter) to reveal its meaning.
Knowledge Check
1. 'Context-setting' in a prompt means:
2. Which of these is a prompting technique?
3. 'Iterating' on a prompt means:
4. A prompt template is useful because it:
5. When you evaluate an output, you check:
