Your first prompt
A prompt is just a message — but specific messages get specific answers. Learn the simplest effective form and when to use follow-ups.
- Describe what a prompt is and the simplest effective form it can take
- Explain why specificity improves AI responses
- Contrast a vague prompt with a specific one for the same task
- Use follow-up questions to refine an AI response rather than restarting
The word "prompt" sounds technical, but it is just what you send to the AI. A prompt is a message. The reason the word gets its own jargon is that the quality of that message has an outsized effect on what you get back, and most people send worse messages than they need to.
This lesson covers the fundamentals — not advanced prompting techniques, but the basic habits that will immediately improve your results.
The simplest form: just ask
The most common mistake beginners make is not asking in the first place, or adding excessive preamble. If you want to know how to read a file in Python, the effective prompt is:
How do I read a file in Python?
Not:
Hi, I hope you're doing well! I've been learning Python and I wanted to ask, if it's not too much trouble, whether you might be able to help me with a question I have about reading files. I'm not very experienced so please be patient with me. My question is: how do I read a file?
The preamble wastes context and provides nothing the model needs. AI tools are not social creatures — they do not need warming up. Start with the question.
Talking to AI should feel like talking to a very capable but very literal assistant. It responds to what you say, not what you meant to say. Politeness is neither required nor harmful — but precision is.
Why specificity helps
Consider the difference between these two prompts:
Vague: "Write me a function."
Specific: "Write a Python function that takes a list of integers and returns the three largest values, sorted descending. If the list has fewer than three elements, return all of them."
The vague prompt forces the model to invent missing details — language, input type, output type, behaviour on edge cases. Those invented details may not match what you need, and you will spend time correcting them. The specific prompt gets you something closer to what you actually want in the first response.
This does not mean you have to write a paragraph for every question. Simple tasks get simple prompts. The principle is: supply the details the model would otherwise have to guess, especially:
- The language or tool (Python vs. JavaScript, pandas vs. plain lists)
- The input and output format
- Any important constraints ("no external libraries," "must work offline")
- The intended use case, when it changes what "good" means
Comparing vague and specific prompts
Here are three pairs. In each case, notice what the model would have to invent for the vague version:
| Task | Vague | Specific |
|---|---|---|
| Data parsing | "Parse this text" | "Parse this comma-separated string into a Python list of integers" |
| Error fix | "Fix my code" | "This Python function raises a KeyError when the key is missing from the dict. Handle that case by returning None instead" |
| Explanation | "Explain recursion" | "Explain recursion using a concrete example in Python, for someone who understands loops but has never seen recursion" |
The specific versions are longer, but they are longer because they contain the information the model needs. A longer prompt that provides relevant context is almost always better than a shorter one that makes the model guess.
You can always ask follow-up questions
One of the most common errors: abandoning a response and writing a new prompt from scratch when the first answer isn't quite right. The conversation model means you can just ask the follow-up.
If the response:
- Is at the wrong level of detail: "Can you make that more concise?" or "Can you go deeper on the second point?"
- Uses the wrong approach: "Show me how to do that with a for loop instead of a list comprehension."
- Missed part of the requirement: "That works, but what if the input is an empty list?"
- Contains something you don't understand: "What does
enumeratedo in that example?"
Each of these follow-ups costs nothing and takes seconds. The model has the whole conversation in context — it knows what "that" refers to. Use this. Treat the first response as a draft, not a final answer, and iterate.
Iterating via follow-ups is often faster than writing one perfect prompt upfront. Think of the first response as a starting point you can redirect, not a result you accept or reject wholesale.
What a good first prompt looks like
There is no one correct template, but a pattern that works well for technical tasks:
- Action verb — what you want the AI to do (write, explain, fix, compare, summarise).
- Subject — what it is acting on (a Python function, this code snippet, the concept of closures).
- Constraints or context — what matters about the result (return type, no external libraries, for a beginner audience).
- Success criterion (optional but powerful) — how you will know it worked ("it should handle an empty list," "it should produce output I could paste into a GitHub PR description").
Example applying that pattern: "Explain the difference between a list and a tuple in Python, for someone who knows what a list is but has never seen a tuple. Focus on when you would choose one over the other."
Check your understanding
Knowledge check
- 1.You want AI to write a function that validates email addresses. Which prompt is most likely to get a useful result on the first try?
- 2.If the first AI response does not fully meet your needs, the best approach is to start a new conversation and rewrite the prompt from scratch.
- 3.Which details are most useful to include when prompting AI for a technical coding task?
Where to go next
You know how to ask. Next: giving context — the single biggest lever for improving AI output quality on complex tasks, and how to decide what context is actually relevant.
The conversation model
AI chat works through a message history fed to the model each time — understanding that explains everything from context limits to session memory.
Giving context
Context transforms AI responses from generic to precisely useful — learn what to include, what to leave out, and why it matters.