
You've typed a question into an AI tool, hit enter, and gotten back something that's… technically an answer, but not quite what you needed. Maybe it was too vague. Maybe it answered a question you weren't actually asking. Maybe it gave you five paragraphs when you wanted three bullet points. If this sounds familiar, you're not alone — and the good news is that this problem almost never comes from the AI being "broken." It comes from the instruction itself.
This lesson is about fixing that. The skill of writing clear AI instructions — often called prompt engineering — is one of the most immediately useful skills you can develop right now. You don't need to understand how AI models work under the hood to get dramatically better results. You just need to understand how to express your intent clearly, completely, and in a way the model can act on. Think of it like giving directions: a GPS needs a destination, not a vibe.
By the end of this lesson, you'll be writing instructions that consistently get you useful, accurate, and appropriately formatted responses from tools like ChatGPT, Claude, Gemini, or any other large language model (LLM).
What you'll learn:
No prior experience with AI tools or programming is required. If you've used a search engine or written an email, you have all the background you need. It helps to have access to any conversational AI tool (ChatGPT, Claude, Gemini, or similar) so you can try the examples as you read.
Before we can write better instructions, it's worth being precise about what a prompt is. A prompt is simply the input you give to an AI language model — the text you type before the model generates a response. The model reads your prompt and predicts the most useful continuation or reply based on everything it was trained on.
Here's the key insight: the model has no idea what you actually want beyond what you write. It can't see your screen, doesn't know your job title, doesn't know whether you're writing for an expert audience or a five-year-old, and has no memory of conversations you've had in other sessions. Every prompt is a fresh introduction.
This is very different from talking to a human colleague. If you lean over to a coworker and say "can you write something up about the Q3 numbers?", they already know the context — what Q3 means for your company, who the audience is, what format the team uses for updates, and roughly how long it should be. The AI has none of that unless you provide it.
Mental model: Treat your AI prompt like a work order, not a casual request. The more precisely you specify what you need, the less guesswork the model has to do — and the better your results will be.
Almost every high-quality prompt contains four elements: role, context, task, and format. You don't always need all four, but knowing each one gives you a menu of tools to reach for when a response isn't landing right.
You can direct the model to respond from a particular perspective by assigning it a role. This shapes vocabulary, assumptions, depth of explanation, and tone.
Compare these two prompts:
Weak prompt:
Explain data normalization.
Stronger prompt:
You are a database instructor explaining concepts to first-year computer science students.
Explain data normalization.
The first prompt gets a technically correct but often textbook-dry response. The second prompt produces an explanation calibrated for a learner, with analogies and simpler language. The content topic is identical — the role is doing the shaping work.
Roles don't have to be job titles. They can describe a perspective, a communication style, or a level of expertise:
Context is the background information the model needs to produce a relevant answer. Without context, the model defaults to the most generic interpretation of your request.
Weak prompt:
Write an email about the data pipeline delay.
Stronger prompt:
I manage a data engineering team. We promised our stakeholders a new analytics pipeline by Friday, but a dependency on a third-party API isn't ready. The delay will push delivery to next Wednesday.
Write an email to our internal business stakeholders explaining the delay.
Notice what the stronger version adds: who you are, what was promised, what went wrong, who the audience is, and what the email needs to accomplish. That's not padding — each piece of context directly shapes the output.
A useful habit: before you write a prompt, ask yourself "what would I need to know to do this task well?" Then put that information in the prompt.
Tip: You don't need to write perfect prose in your context. Bullet points, rough notes, even pasted-in data are fine. The model is excellent at parsing messy input.
The task is the actual instruction — what you're asking the model to produce. Most beginners write prompts that are all task and nothing else, but even the task itself often needs more precision than people expect.
The two dimensions that most often need tightening are scope and action:
Scope defines the boundaries of the work. "Summarize this document" is wide open — does that mean one sentence, three paragraphs, or ten bullet points? "Write a three-sentence summary of the key findings" is scoped.
Action specifies the verb precisely. There's a big difference between:
Use the specific verb that matches what you actually need. "Write something about X" forces the model to guess at the action.
This is the component beginners skip most often, and it causes the most friction. If you don't specify format, the model will make a reasonable guess — and reasonable guesses are often wrong for your actual use case.
Format instructions can include:
Here's a prompt that uses all four components together:
You are a data analyst writing internal documentation. [ROLE]
Our team recently migrated from a manual Excel-based reporting process to
an automated pipeline using Python and Airflow. The migration took three
months and involved five team members. [CONTEXT]
Write a brief summary of what the migration accomplished and why it matters
for the business. [TASK]
Format it as three bullet points, each one sentence long, written for a
non-technical executive audience. Avoid technical jargon. [FORMAT]
That prompt gives the model almost no room to produce something off-target. The output will be short, business-friendly, and exactly three bullets. You've done the thinking; the model does the writing.
Here's something that trips up a lot of beginners: they write one prompt, get an imperfect result, and either accept it or abandon the tool. The better mental model is that prompting is iterative — you start somewhere reasonable and refine from there.
When a response misses the mark, your job is to diagnose why and adjust one thing at a time. Changing everything at once makes it hard to know what actually improved the output.
A simple iteration framework:
Read the response critically. What's wrong with it? Is it too long? Wrong tone? Missing key information? Technically incorrect?
Identify the gap. Map the problem to one of the four components. Too long → format issue. Wrong assumptions → context issue. Wrong action taken → task issue. Wrong voice → role issue.
Add a follow-up instruction. You can refine in the same conversation. Something like:
Let's trace a real iteration. Suppose you're a business analyst preparing for a meeting and you type:
First attempt:
Tell me about churn rate.
The model gives you a long, textbook-style explanation of what churn rate is. Correct, but not what you needed.
Second attempt:
I know what churn rate is. I need to explain to a VP of Sales why our monthly
churn rate increasing from 2% to 3.5% over six months is a significant problem.
Give me three talking points I can use in a meeting, written in plain business language.
Now you've added context (who the audience is, what the numbers are), scoped the task (three talking points for a meeting), and specified format (plain business language). The output will be far more useful.
Tip: In most AI tools, you can continue refining in the same chat window. The model retains the context of your conversation, so you don't need to restate everything with each follow-up. Just explain what to change.
One underused technique is giving the model negative constraints — explicit instructions about what to leave out or avoid. These are especially useful when you've gotten responses that keep including something unhelpful.
Common negative constraints:
Do not include a disclaimer at the end.
Do not suggest that I consult a professional.
Do not repeat information I've already provided.
Do not use bullet points — write in prose only.
Do not make assumptions about data I haven't given you.
If a model keeps hedging every response with "but please consult an expert before acting on this," and you're an expert who finds that patronizing, you can simply say so: "I am a licensed data engineer. Do not add disclaimers about consulting professionals." The model isn't being stubborn — it's defaulting to safe behavior. Explicit constraints override the defaults.
One of the most powerful techniques in prompt engineering is showing the model an example of the output you want, rather than just describing it. This is sometimes called few-shot prompting — giving the model a few examples so it learns the pattern.
Suppose you're asking a model to help you write data dictionary entries for database columns, and you want a very specific format. Rather than describing the format in the abstract, show it:
I'm writing a data dictionary for our warehouse. Here's an example of the
format I want:
Column: customer_lifetime_value
Type: FLOAT
Description: The total predicted net revenue from a customer over their
entire relationship with the company. Calculated using the LTV model v2.
Updated daily.
Nullable: No
Now write entries in the same format for these three columns:
- session_duration_seconds (INTEGER)
- last_purchase_date (DATE)
- email_opt_in_status (BOOLEAN)
You've given the model a template without having to write a paragraph explaining every formatting choice. Examples are often clearer than instructions.
Put these concepts to work with the following exercise. You'll write three versions of the same prompt, observing how each improvement changes the output.
Scenario: You have a dataset of monthly sales by region, and you want to write a brief executive summary of the results.
Step 1 — Baseline prompt (intentionally weak): Open your AI tool and type exactly:
Write an executive summary of sales data.
Read the response. Note how generic it is — the model doesn't know your data, your audience, or your format preference.
Step 2 — Add context and task specificity: Now try this version:
Our company sells enterprise software. In Q3, the Northeast region grew
revenue by 18% year-over-year, the West Coast was flat at 1% growth, and
the Midwest declined by 7%. Total company revenue was $4.2M for the quarter.
Write an executive summary of these results.
The response is now grounded in real information. But it might still be the wrong length or format.
Step 3 — Add role and format:
You are a business analyst presenting quarterly results to a company leadership team.
Our company sells enterprise software. In Q3, the Northeast region grew
revenue by 18% year-over-year, the West Coast was flat at 1% growth, and
the Midwest declined by 7%. Total company revenue was $4.2M for the quarter.
Write an executive summary of these results. Format it as:
- One opening sentence stating the overall result
- Three bullet points highlighting the key regional findings
- One closing sentence identifying the single biggest priority for Q4
Keep the total length under 150 words. Write for a non-technical executive audience.
Compare all three responses. The progression from vague to precise dramatically changes the output — same AI, same underlying topic, radically different quality.
Bonus challenge: Take the Step 3 response and write one follow-up prompt to refine it. Pick one specific thing you'd change (tone, length, emphasis) and write the instruction to make that change.
Mistake 1: Assuming the model knows your situation The fix: Always include the "who, what, why" — your role, what you're trying to accomplish, and who will consume the output.
Mistake 2: Asking multiple disconnected questions in one prompt When you stack three different requests in one message, the model often handles each one partially. Break complex work into sequential prompts. Finish one task, then start the next.
Mistake 3: Accepting the first response without iterating The first response is a starting point, not a final answer. Budget time for at least one round of refinement. Most people see the biggest quality jump between prompt one and prompt two.
Mistake 4: Describing the output vaguely ("make it better," "make it professional") These instructions mean different things to different people — and to the model. Specificity wins. "Make it more formal" is better. "Replace contractions with full words and remove casual phrases like 'let's be honest'" is better still.
Mistake 5: Over-engineering from the start Beginners sometimes read about prompt engineering and try to write the perfect 10-component prompt on the first attempt. This is exhausting and unnecessary. Start simple, iterate toward complexity only where the output actually needs it.
Troubleshooting: The model keeps refusing or hedging If the model adds excessive disclaimers or seems to misread your intent as something problematic, it's usually a framing issue. Clarify your context ("I'm a nurse asking about medication interactions for patient education purposes") and use explicit constraints ("Do not add medical disclaimers — this is for professional use").
Troubleshooting: The model sounds confident but the output seems wrong Language models can generate plausible-sounding errors, especially on specific facts, numbers, or technical details. Always verify factual claims independently. Use AI to generate structure and language; verify the substance yourself.
You now have a complete framework for writing AI instructions that actually work. Let's consolidate what you've learned:
The skill you've built here isn't just useful for one AI tool — these principles transfer to every text-based AI interface you'll encounter, because they're all fundamentally about clear communication of intent.
Where to go next:
The gap between someone who says "AI tools aren't that useful" and someone who says "I use AI tools every day to move faster" is almost always prompt quality. You've just closed a big part of that gap.
Learning Path: Intro to AI & Prompt Engineering