Prompt Engineering

Prompt Engineering

Practice the working loop of prompt engineering: draft a prompt, test it on a real task, evaluate the output, and refine.

promptsAIworkflow

Tutorial overview

What you will learn

  • Run the draft-test-evaluate-refine loop on a real task
  • Define success criteria before prompting
  • Decide when a prompt is good enough to save and reuse

By the end, you will have

  • A tested reusable summarization prompt and a repeatable refinement workflow

Introduction

Prompt engineering is not writing one perfect prompt; it is a working loop: draft, test, evaluate, refine, repeat. Good results come from running that loop a few times against a real task with clear success criteria. This tutorial walks you through the full loop using a task almost everyone has: summarizing a document.

What you will build or practice

You will build a summarization prompt through three rounds of testing and refinement, and you will leave with a saved prompt you can reuse plus a workflow you can apply to any task, from drafting emails to explaining code.

Before you begin

You need an AI chat assistant and a real document of one to three pages: a meeting recap, an article, or a report. If you have not learned the parts of a prompt yet, read Prompt Engineering Basics first — this lesson assumes you know them and focuses on the process.

Key concept

Treat every prompt like a draft, and define "good" before you start. If you cannot say what a good summary looks like — length, audience, what must be included — you cannot tell whether the output succeeded or how to fix it. Criteria first, prompt second.

Step 1: Define success before you prompt

Write down two or three criteria for your summary. For example: under 150 words, keeps every decision and deadline, readable by someone who missed the meeting. These criteria are your evaluation checklist for every round.

Step 2: Write a fast first draft

Do not aim for perfection. State the task, paste the document, and add your criteria as instructions.

Summarize the document below for a teammate who missed the meeting.
Keep it under 150 words. Include every decision made and every deadline.

[paste document here]

Step 3: Test and evaluate the output

Run the prompt and score the result against each criterion, one by one. Be specific about failures: "it dropped the budget deadline" is fixable; "it feels off" is not. Also spot-check facts against the source — assistants can state things confidently that are not in the document. See how to verify AI answers for a quick routine.

Step 4: Refine one thing and run again

Change the prompt to target the biggest failure, then re-test. If it dropped deadlines, add "List deadlines in a separate bullet list at the end." If the tone was too formal, add a sample sentence in the tone you want. Change one thing per round so you know what worked. Two or three rounds is normal; when all criteria pass, save the prompt in your notes with a name and the date.

Practice exercise

Run the full loop on a different task: turning rough notes into a polite email. Write three success criteria, draft a prompt, test it on real notes, and refine until every criterion passes. Save the final prompt.

Common mistakes

  • Evaluating by vibes instead of written criteria.
  • Rewriting the entire prompt after one bad output instead of fixing the specific failure.
  • Testing on one document and assuming the prompt works for all documents — try at least two.
  • Never saving good prompts, then rebuilding them from scratch next week.

Check your understanding

  1. What are the four stages of the prompt engineering loop?
  2. Why do success criteria come before the first draft?
  3. Why change only one thing per refinement round?

Key takeaways

  • Prompt engineering is iteration, not inspiration.
  • Written success criteria turn "this feels wrong" into a fixable instruction.
  • A tested, saved prompt is a small reusable tool.

Next steps

Understand why this loop works in Prompt Engineering from First Principles, then browse ready-made structures in the Prompt Patterns Cheat Sheet.

Related resources

Newsletter or next lesson

Join the newsletter for a clear weekly lesson, or continue with the AI Beginner Roadmap.