Lesson 1, Topic 1
In Progress

Lesson 2.2 – Prompt Engineering

Unit 2 ยท Lesson 2.2 โ€“ Prompt Engineering | Knowledge Pillars ยท AWS AI Explorers
Unit 2 ยท Lesson 2.2

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.

AWS AI Explorers - Student~45 MinutesBeginner

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.

๐ŸŽฏ
Context-setting
Say what the task is for and who it is for.
๐Ÿ“
Constraints
Set length, style, and format.
๐ŸŽญ
Role assignment
Tell the AI who to be.
๐Ÿงฉ
Examples
Show a model of what you want.
Put them together: You are a study coach. Explain photosynthesis to a 9th grader in 3 short steps. That single line uses a role, a constraint, and context.

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.

Change one thing at a time. If you change everything at once, you will not know what helped.

Evaluate Your Output

Never use an output just because it looks polished. Check it against three questions before you trust it.

CheckAsk yourself
AccuracyIs it actually true? Did I verify the key facts?
BiasIs it fair? Does it leave anyone out?
RelevanceDoes it answer what I actually asked?

๐Ÿง‘โ€๐Ÿ’ป Activity: Build a Prompt Template

Activity

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.

  1. Pick a repeated task. For example: writing a friendly reminder, or summarizing an article.
  2. Write the template. Include a role, the task, the context, and the format.
  3. Test it twice. Use it on two different inputs and check the results are consistent.
  4. Evaluate. Check both outputs for accuracy, bias, and relevance, then refine the template.

Lesson Summary

IdeaWhy it matters
Four movesContext, constraints, role assignment, and examples.
IterateChange one thing at a time to improve the output.
Quality linkBetter prompts produce better outputs.
TemplatesA reusable prompt gives consistent results for a repeated task.
EvaluateAlways check accuracy, bias, and relevance.

Vocabulary: tap a card to flip

Tap a card (or press Enter) to reveal its meaning.

Context-setting
Telling the AI what the task is for and who it is for
Constraints
Limits like length, style, or format
Role assignment
Telling the AI who to act as
Iterate
Changing one thing at a time to improve the result
Prompt template
A reusable prompt that produces consistent results
Evaluate
Checking an output for accuracy, bias, and relevance

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:

Lesson Checklist