Context & Being Specific
Reviewed & published by Brayan K
The single biggest lever in everyday prompting is specificity. The more the AI knows about your goal, your audience, and your situation — and the more precisely you describe what you want — the more useful its answer.
Part of the free Prompt Engineering course at LearnCodingFast — hands-on lessons with worked examples and the output they print, plus practice exercises and a quick quiz.
Vague prompts get vague replies. In this lesson you’ll learn how to add the right context and turn fuzzy requests into specific ones — without drowning the model in irrelevant detail.
What You'll Learn in This Lesson
- What context is and why it shapes the answer
- How naming your audience changes the tone
- Turning vague requests into specific ones
- The details that matter: goal, audience, situation
- How to avoid burying the AI in noise
- A quick checklist for adding the right context
1 Context: the background only you know
The AI can’t see your life. It doesn’t know who will read the email, what you’re trying to achieve, or what you’ve already tried. Context is where you hand it that background so it can tailor the answer.
The most valuable context is usually: your goal, your audience, your situation, and any key facts unique to you.
2 Vague vs specific — side by side
Same topic, two prompts. The specific one tells the AI exactly who, how long, and what angle:
A thousand directions — you’ll get a bland, average answer.
Audience, length, angle, and tone — a focused, usable answer.
Try it for real
Context is a budget, not a bucket — when it overflows, something is dropped, and the only question is whether you chose what. Run both loops on identical content. The naive one keeps whatever came first and loses a policy; the prioritised one loses chat history instead, which is almost always the right trade.
# Context is a budget, not a bucket. When it overflows something gets dropped —
# the only question is whether you chose what, or the truncation did.
def tokens(text):
return max(1, len(text) // 4) # rough industry rule: ~4 chars per token
BUDGET = 40
chunks = [
("system rules", "Answer only from the context. Cite the source id."),
("policy: refund", "Refunds are available within 30 days of delivery for unopened items."),
("policy: faults", "Faulty goods are collected free of charge at any time."),
("chat history", "User asked about delivery yesterday and was told 3 to 5 days."),
("policy: gifts", "Gift cards are non-refundable once revealed."),
]
print(f"budget: {BUDGET} tokens\n")
# Naive: first come, first served — whatever is at the end falls off a cliff.
used, kept = 0, []
for name, text in chunks:
n = tokens(text)
if used + n <= BUDGET:
kept.append(name); used += n
print("NAIVE (in order):")
print(" kept:", kept, f"({used} tokens)")
print(" dropped:", [n for n, _ in chunks if n not in kept])
# Prioritised: rank what must survive, then fill.
priority = ["system rules", "policy: refund", "policy: faults", "policy: gifts", "chat history"]
order = sorted(chunks, key=lambda c: priority.index(c[0]))
used2, kept2 = 0, []
for name, text in order:
n = tokens(text)
if used2 + n <= BUDGET:
kept2.append(name); used2 += n
print()
print("PRIORITISED:")
print(" kept:", kept2, f"({used2} tokens)")
print(" dropped:", [n for n, _ in chunks if n not in kept2])
print()
print("Same budget, same content, different survivors. Chat history is usually the")
print("cheapest thing to lose and the first thing a naive loop keeps.")# 🎯 YOUR TURN — decide what survives the budget.
def tokens(text):
return max(1, len(text) // 4)
BUDGET = 25
chunks = [
("rules", "Answer only from the context."),
("recent", "The customer asked about refunds this morning."),
("policy", "Refunds are available within 30 days."),
]
# Rules must never be dropped; policy matters more than chat history.
priority = ["rules", "policy", "recent"]
# 1) Sort the chunks so the most important one is handled first.
order = sorted(chunks, key=lambda c: priority.index(c[___]))
# 👉 replace ___ with 0
used, kept = 0, []
for name, text in order:
n = tokens(text)
# 2) Only keep a chunk if it still fits inside the budget.
if used + n <= ___:
# 👉 replace ___ with BUDGET
kept.append(name); used += n
print("kept:", kept)
print("tokens used:", used, "of", BUDGET)
# ✅ Expected output:
# kept: ['rules', 'policy']
# tokens used: 16 of 25Common Mistakes (and the fix)
- Leaving out the audience. — Say who it is for so the tone fits.
- Staying vague to keep options open. — Vague gets generic; be specific and refine later.
- Dumping irrelevant detail. — Include only what changes the answer.
- Hiding your real goal. — State what a great result would do for you.
⏱ Test Yourself — Timed Quiz
10 quick questions, 12 seconds each. Instant feedback — beat the clock!
🎉 Lesson Complete
- ✅ Context is the background only you can supply
- ✅ Goal, audience, situation, and key facts matter most
- ✅ Specific prompts beat vague ones every time
- ✅ Naming the audience sets the right tone and depth
- ✅ Keep context relevant — don’t bury the signal
Practice quiz
What does 'context' mean in a prompt?
- The font you use
- The AI's mood
- The relevant background the AI needs to do the task well
- The login details
Answer: The relevant background the AI needs to do the task well. Context is the background information that helps the AI tailor its answer.
Why does naming the audience improve a prompt?
- The AI can match the tone and detail level to who will read it
- It does not
- It makes the answer longer
- It changes the color
Answer: The AI can match the tone and detail level to who will read it. Audience shapes tone and complexity, so the answer fits its readers.
Which is more specific?
- write about dogs
- tell me stuff
- do dogs
- Write a 150-word intro for beginners on why crate training helps anxious rescue dogs
Answer: Write a 150-word intro for beginners on why crate training helps anxious rescue dogs. It names length, audience, angle, and topic precisely.
Vague prompts tend to produce…
- Perfect answers
- Generic, one-size-fits-all answers
- Shorter login times
- Errors only
Answer: Generic, one-size-fits-all answers. Without specifics, the AI defaults to broad, generic output.
A good way to add context is to state…
- Your goal, audience, situation, and any key details
- Your favorite color only
- Nothing extra
- The time of day
Answer: Your goal, audience, situation, and any key details. Goal, audience, situation, and key facts are the most useful context.
Specificity helps because…
- It slows the AI
- It is required by law
- It narrows the likely answers toward what you want
- It hides your intent
Answer: It narrows the likely answers toward what you want. Specific details steer the model toward your exact need.
If your first answer is too generic, you should…
- Give up
- Add specifics: audience, length, angle, examples, and ask again
- Repeat the same words
- Switch devices
Answer: Add specifics: audience, length, angle, examples, and ask again. Adding specifics turns a generic reply into a targeted one.
Which detail is context, not a constraint?
- Under 100 words
- No medical jargon
- Use only 3 bullets
- My readers are new parents with no medical background
Answer: My readers are new parents with no medical background. Describing the audience is context; word limits and rules are constraints.
Over-explaining with irrelevant detail can…
- Always help
- Bury the important points and distract the model
- Speed it up
- Change the temperature
Answer: Bury the important points and distract the model. Too much noise can crowd out the signal; keep context relevant.
The core habit from this lesson is…
- Be vague to stay flexible
- Use capital letters
- Be specific and give the background only you know
- Send the prompt twice
Answer: Be specific and give the background only you know. Specificity plus relevant background is what lifts answer quality.
Continue this course
- Previous: Anatomy of a Great Prompt
- Next: Role & Persona Prompting — 'Act as a…' — set expertise, audience, and tone for sharper answers
- From the blog: Best AI Tools for Learning to Code (and How to Use Them)
Frequently asked questions
What counts as 'context' in a prompt?
Context is the relevant background the AI needs to do your task well: your goal, who the answer is for, the situation you are in, and any key facts only you know. For example, 'I am writing for first-time parents with no medical background' tells the AI exactly how simple and reassuring to make its explanation.
Why are specific prompts so much better than vague ones?
An AI gives the most likely answer to the words you provide. Vague words like 'write about dogs' could mean a thousand things, so the model defaults to something generic. Specific words like '150-word beginner intro on crate training for anxious rescue dogs' narrow the field to the exact answer you want.
Can I give too much context?
Yes. Piling on irrelevant detail can bury the important points and pull the answer off track. Aim for the background that actually changes the answer, the audience, goal, and key facts, and leave out trivia that does not. Relevant and specific beats long and noisy.
How do I fix an answer that came back too generic?
Add specifics and ask again. Name the audience, set a length, pick an angle, and include one concrete example of what good looks like. Each detail you add steers the model from a broad, average reply toward the focused one you actually need.