EFFECTIVE/AT LIFE Module 1
AI for Friends/ Module 1/ Lesson 1.2

Prompt Engineering vs. Context Engineering

Master the two levers that determine AI output quality — and learn when to use each one.

20 MIN STEP 2 OF 4

1The Core Distinction

Two concepts control AI output quality. Prompt engineering controls how you ask. Context engineering controls what information you give the AI to work with. Most people spend all their time on the first and ignore the second — but the second matters more.

DimensionPrompt EngineeringContext Engineering
FocusUser-facing text (how you ask)System-oriented data (what you provide)
NatureTransient, single-turnPersistent, memory-managed
MethodTrial-and-error iterationDeterministic, structured pipelines
InputA single text instructionAn organized information payload
AnalogyWriting a clear email subject lineAttaching the right documents to the email

Three rules for applying both: front-load relevant information instead of asking the model to guess from nothing; constrain the scope by being explicit about which sources are authoritative; persist and refine by reusing a conversation with accumulated context for one workstream.

The Key Principle

Good outcomes depend at least as much on context as on the wording of a single prompt. Stop optimizing your prompt. Start optimizing your context.

Diagnose Before Fixing

When the AI gives a wrong or weak answer, ask "Did I give it the right information?" before "Did I phrase my question correctly?" Context problems cause most AI failures.

2Better Prompts in Practice

A vague prompt forces the AI to guess, and every guess introduces error. The fix isn't better writing — it's more specificity.

HR

❌ Before: "Summarize this."

Vague. For whom? How long? What format?

✅ After: "Summarize this interview transcript as 5 bullet points for the hiring manager. Focus on the candidate's strengths and any concerns raised."

Marketing

❌ Before: "What's late?"

Late compared to what? Which campaign?

✅ After: "Which social posts for this launch campaign are more than 2 days past their scheduled date? Show as a table: platform, scheduled date, days late. Sort by days late descending."
More examples — HR, Industrial Engineering, and Legal

HR

✅ "Write a job description for a Senior Account Manager on the customer success team. Requirements: 5+ years in B2B account management, CRM experience, track record of client retention. Use our standard format: summary, responsibilities, requirements, benefits. Tone: professional but warm."

Industrial Engineering

❌ Before: "Check the downtime report."

Which line? Which shift? What counts as downtime?

✅ After: "Which production lines in this week's downtime report exceeded 30 minutes of unplanned downtime? Show as a table: line, date, duration, stated cause. Sort by duration descending."

Legal

✅ "Review this NDA for missing standard clauses. Check for: definition of confidential information, term length, return-of-materials, governing law. List each missing or weak clause with a one-line note on the risk it creates."
The Specificity Rule

Every vague word in your prompt forces a guess. A prompt with five vague elements has roughly a 3% chance of producing exactly what you want. Five specific elements produce accurate results nearly every time.

3Five Prompting Patterns That Cover 90% of Your Work

You don't need dozens of techniques — five patterns cover almost everything you'll do in Claude.

PatternWhat It IsWhen to Use It
1. Zero-ShotAsk once with clear instructions, no examplesSimple, well-defined tasks with an obvious format
2. Few-ShotProvide 1–3 examples before asking the model to continue the patternTransforming notes, classifying items, consistent formatting
3. Role PromptingExplicitly assign the AI a role to align tone and depthWhen you need a specific expertise level or style
4. Chain-of-ThoughtAsk the model to reason step by step before answeringAnalysis, safety-relevant decisions, complex tradeoffs
5. Interview-StyleAsk the model to ask YOU clarifying questions firstWhen you're unsure what you need, or the task is ambiguous

Pattern 2 example (Few-Shot)

Convert these raw notes from our campaign retro into formatted action items:

Input: "landing page load time hurt conversions, need dev to fix before next launch"
Output: Action Item: Fix landing page load time before next launch. Owner: [Your Name]. Source: Campaign retro. Due: Before next launch.

Input: "email open rates dropped, subject lines felt generic"
Output: Action Item: A/B test more specific email subject lines. Owner: [Your Name]. Source: Campaign retro. Due: Next email send.

Now convert this:
Input: "paid social spend ran over budget, no one was watching the daily caps"
Pattern 4 example — Chain-of-Thought
I need to decide whether to escalate a vendor contract renewal that is 30 days from expiring. Walk me through the decision step by step:
(1) What is the current expiration date?
(2) When does a renewal decision need to be made?
(3) What is the cost of renewing vs. switching?
(4) What is the risk of letting it auto-renew?
(5) Based on these factors, recommend escalate or hold.
Pattern 5 example — Interview-Style
I need to write a business case for a new employee onboarding tool.
Before you draft anything, ask me 5 clarifying questions about the problem, the audience, the budget, and the timeline.
Combine Patterns for Best Results

Start with Role Prompting ("You are a senior recruiter..."), add Few-Shot examples, then request Chain-of-Thought reasoning. Stacking patterns produces the highest-quality outputs.

4Context Engineering in Practice

A model is only as smart as its context. Without it, AI systems hallucinate — they invent facts. Engineered context fixes this.

RoleBad ContextGood Context
HRPaste 40 résumés and ask "help me screen these"Paste job requirements first, then 3 résumés at a time: "Score each 1–5 on relevant experience, years, leadership indicators. Show as a table."
Industrial EngineeringPaste an entire month of maintenance logs and ask "what's wrong with the line"Extract just this week's entries: "Which failure codes appear more than twice? List code, frequency, and affected line."
LegalPaste a 40-page merger agreement and ask "are there any risks?"Extract just Indemnification and Termination: "Which clauses deviate from our standard template? List clause number, deviation, risk level."
MarketingAsk "how did the campaign do?" with no data attachedPaste the campaign CSV filtered to last 30 days: "Which channels underperformed target CPA? Show channel, target, actual, gap."
Context QualityWhat Happens
No contextAI guesses. High hallucination rate. Output is useless.
Partial contextAI gets some things right and invents others — dangerous because it looks plausible.
Full, structured contextAI delivers accurate, grounded answers. Minimal hallucination.
Partial Context Is the Most Dangerous State

It produces output that looks correct but contains invented details. Always verify AI output against source data when you suspect your context was incomplete.

5Managing Your Context Window

Every conversation has a limit. As it grows, the AI may forget earlier instructions or mix up old and new tasks. Knowing when to keep going vs. start fresh is a daily skill.

Reuse the same conversation when

  • Same workstream — same document, decision, or meeting prep
  • Earlier turns are still relevant ("we agreed high risk means X")
  • The conversation isn't yet noisy or mixing multiple projects

Start fresh when

  • The topic has genuinely changed
  • The thread is long and messy with dead ends
  • The AI starts reusing outdated assumptions from 20 turns ago

The summarize-and-reset technique

Ask: "Summarize the key decisions and constraints from this conversation in 5 bullet points." Copy that summary, start a new conversation, and paste it into a CONTEXT block at the top of your first new prompt:

CONTEXT (from previous conversation):
- Decision 1: [AI-generated bullet]
- Decision 2: [AI-generated bullet]
- Decision 3: [AI-generated bullet]

TASK: [Your new question or request]
Watch for the Contamination Signal

If the AI references something from 20 turns ago that's no longer relevant, your context window is contaminated. Start fresh and carry over only what matters.

6Putting It All Together

Great AI Output = Clear Prompt + Right Context + Appropriate Pattern. This is one complete, production-ready prompt combining context, role, task, format, and constraints:

CONTEXT:
[Paste relevant data here — e.g., this week's applicant tracking system update]

ROLE:
You are a senior HR coordinator writing a weekly hiring pipeline update.

TASK:
Based on the pipeline data above, draft a weekly status update for the hiring manager.

FORMAT:
- Group by: Offers Extended, In Interview, New Applicants, Stalled
- Include candidate name, role, and one-line status for each item
- Add a "Decisions Needed" section at the bottom
- Keep total length under 1 page

CONSTRAINTS:
- Only include candidates with activity in the last 7 days
- Flag anyone stalled in one stage for more than 10 days
- Do not include candidates already rejected
SectionWhat It ControlsWithout It
CONTEXTThe data and ground truth to reason fromAI invents facts or gives generic answers
ROLETone, depth, vocabulary, expertise levelAI defaults to a generic style
TASKThe core instruction and deliverableAI misinterprets what you want
FORMATStructure, length, grouping, layoutAI picks its own format — you reformat later
CONSTRAINTSWhat to exclude, flag, or followAI includes irrelevant content, misses edge cases
You Don't Need All Five Every Time

Simple tasks need only TASK and FORMAT. Use CONTEXT, ROLE, and CONSTRAINTS when the task is complex, when accuracy matters, or when the output will be shared with others.

Verification

You can explain the difference between prompt and context engineering in one sentence
You can name at least three of the five prompting patterns and when to use each
You know the three context quality levels and which one produces convincing hallucinations
You know when to reuse a conversation and when to start fresh

Related Resources

Lesson complete

You now know the two levers that control AI output quality, five patterns that cover 90% of your work, and a formula for any complex request.