How Prompting Works — Foundations Lesson 3
Scenario
You've typed into ChatGPT: "Write an email." The result was vague and generic. You typed "Write a better email." Still generic. You try again with more detail and suddenly ChatGPT gives you exactly what you need. You realize: What I put in directly affects what I get out. But how? What makes a prompt good or bad? Is there a formula?
---
Learning Objectives
By the end of this lesson, you will be able to:
1. Understand the prompt-response mechanism — why input quality affects output quality
2. Identify the five components of an effective prompt
3. Write prompts that produce professional outputs for your role
4. Refine prompts iteratively when first attempts don't work
5. Recognize common prompt mistakes and fix them
---
Think Before You Prompt
Before writing any prompt, ask:
---
The Prompt-Response Mechanism
Simple fact: The LLM's response quality directly reflects your prompt quality.
Vague prompt → Vague response
Detailed prompt → Detailed response
Prompt with examples → Output mimicking those examples
Prompt with constraints → Output respecting those constraints
This isn't magic. It's pattern-matching: The LLM predicts the next token based on what you gave it. If you give it 2 words, it predicts 2-word-worth of content back. If you give it a detailed specification, it has more patterns to work from.
---
The Five Components of an Effective Prompt
1. Role / Context
What it does: Tells the LLM who it should "be" or what lens to use.
Why it works: LLMs are trained on massive amounts of text from different perspectives. "Write as an HR manager" triggers patterns associated with professional HR language.
Examples:
In practice: You don't always need a role. Short tasks ("Fix this typo") don't need one. Complex outputs (policies, strategies, sensitive communications) benefit from one.
2. Context / Background Information
What it does: Gives the LLM information it doesn't have.
Why it works: The LLM can't access your company's files, past emails, or internal knowledge. You have to provide it.
Examples:
In practice: Give the LLM only what's relevant. Too much context = longer responses and potential confusion. Strike a balance.
3. Task / Request
What it does: Clearly states what you want the LLM to do.
Why it works: The LLM predicts text based on your request. A clear request = clear predictions.
Examples:
In practice: Use verbs: Write, summarize, explain, compare, list, format, rewrite. Avoid vague words like "handle," "address," or "think about."
4. Format / Constraints
What it does: Specifies how the output should look.
Why it works: Constraints narrow the prediction space. The LLM knows exactly what type of output to generate.
Examples:
In practice: Specify:
5. Verification Criteria (Optional but Powerful)
What it does: Tells the LLM what "good" looks like.
Why it works: If you define quality upfront, the LLM can self-check. It doesn't always catch mistakes, but it helps.
Examples:
In practice: Include success criteria when stakes are high or outputs are complex.
---
Complete Prompt Template
Here's a formula you can use:
`
[ROLE] You are a [job title or persona].
[CONTEXT] [Background information: what the LLM needs to know]
[TASK] [Clear action: Write/summarize/explain/etc.]
[FORMAT] [How the output should look: length, structure, tone]
[VERIFICATION] [How to know if it's good]
`
Real example:
`
You are an administrative assistant at a mid-sized tech company.
Your manager needs a memo to leadership about Q3 hiring plans.
Here's the context: We're planning to hire 5 engineers, 2 marketers,
and 1 operations coordinator. Budget is approved. Hiring should start
in 2 weeks.
Write a 2-paragraph professional memo summarizing the hiring plan and timeline.
Format: Standard memo format (To/From/Date/Subject, then body).
Tone: Professional and optimistic. Keep it under 250 words.
Success criteria: A new employee should understand what's being hired
for and when without reading anything else.
`
---
Prompting in Practice: Common Mistakes
Mistake 1: Vagueness
Why it fails: "Something about" doesn't give the LLM a clear pattern to follow.
Mistake 2: Too Much Information
Why it fails: LLMs can get lost in noise. More context ≠ better output.
Mistake 3: No Format Specification
Why it fails: Without format guidance, the LLM guesses. You get rambling paragraphs instead of clear bullets.
Mistake 4: Unclear Success Criteria
Why it fails: "Better" is subjective. The LLM doesn't know what you want.
Mistake 5: Assuming Shared Context
Why it fails: The LLM doesn't know who John is or what he complained about.
---
Prompt Refinement (Iteration)
Rarely does a prompt work perfectly on the first try. Here's how to iterate:
Step 1: Test the Prompt
Write your prompt and try it.
Step 2: Evaluate the Output
Ask: What's missing? What's wrong? What worked well?
Step 3: Refine and Retry
Change one thing at a time:
Step 4: Repeat
Test the refined prompt. Document what worked. Save good prompts for reuse.
Example Iteration
First attempt:
"Write an email to a client about a price increase"
Result: Generic, doesn't explain why
Refinement:
"Write a professional but apologetic email to a long-time client explaining a 10% price increase due to rising material costs. Emphasize that this is our first increase in 3 years and offer a 3-month transition period at the old price."
Result: Much better, but too formal
Refinement:
"Write a warm but professional email to [Client Name] explaining a 10% price increase starting next quarter. Acknowledge this is our first increase in 3 years, thank them for their loyalty, and offer 3 months at the old price to soften the transition. Keep it under 200 words."
Result: Perfect. Save this prompt template.
---
Mission: Craft Three Effective Prompts
The Task
Using your role and current work, write three prompts for tasks you actually do (or want to delegate to AI). For each:
1. Identify the task (What do you currently do manually?)
2. Write the prompt using the 5-component template (Role, Context, Task, Format, Verification)
3. Test it with an LLM (ChatGPT, Claude, Gemini — your choice)
4. Document results (Did it work? What needed refinement?)
Example tasks to consider:
---
Deliverables
Prompt Document (for your reference):
`
TASK 1: [Your task name]
Prompt: [Your full prompt]
Result: [Did it work? What was good/bad?]
Refined Prompt: [Version 2 if needed]
TASK 2: [Your task name]
[Same structure]
TASK 3: [Your task name]
[Same structure]
`
Keep these. You're building a personal prompt library.
---
AI Coach: Prompting is a Skill, Not a Secret
Here's what many people believe: "Some people are good at prompting; some aren't."
Truth: Prompting is learnable. It's not magic, and it's not mysterious. It's simply being specific about what you want.
The best prompters aren't smarter — they're more intentional. They:
1. Think through what they actually need
2. Provide context the AI lacks
3. Specify format and constraints
4. Test and refine
You just learned the technique. Now it's practice and feedback.
Key insight: Every prompt you write teaches you something about what works. Keep iterating. Your prompts will get better.
---
Reflection: How Does Prompting Change Your View of AI?
Before this lesson, you might have thought: "AI either gets it or doesn't."
Now you know: "I control the quality by how specific I am."
This is powerful. It means you're not at the mercy of AI — you're directing it.
Reflect: What task do you want to try prompting for first? What would you ask the AI to do?
---
Portfolio Check
Portfolio principle: Any AI output you include must be prompted well. This means:
Lesson 3 is where you start building this discipline. Document your prompts. Track what works.
---
Bonus Challenge
Prompt archaeology: Find a prompt you wrote recently (or write one now) and score it on the 5 components:
Score 5/5? Excellent. Score less? Rewrite it to hit all 5 components.
---
Key Takeaways
Next: Lesson 4 teaches Verification & Accuracy — how to trust (and distrust) AI output and catch mistakes.