How to write a good prompt on the first try
Learn how to write a clear prompt for ChatGPT, Claude, or Gemini, with before-and-after examples and a simple five-step method for beginners.
If you've ever asked an AI for something and gotten back a generic, overly long, or useless answer, the problem is almost never the tool: it's the message. Knowing how to write a prompt is the skill that changes the result the most, and you don't need to know how to code to learn it. In this guide you'll see what a prompt is, what it should include, and a simple method for writing a good one on the first try.
What is a prompt
A prompt is the message you write to an AI to ask it for something. It can be a question ("what is inflation?"), a command ("summarize this text"), or a long instruction with data, rules, and examples. Besides whatever is already in the conversation, it's the only information the AI has about what you want.
That's why it helps to think of a prompt as a request to someone who doesn't know you. Anthropic, the company behind Claude, puts it this way in its official best practices guide: treat the model like a brilliant but new employee who doesn't know your rules or how you work. The more precise your explanation, the better the result.
The same guide suggests a very useful test: show your prompt to a colleague who knows nothing about the task and ask them to follow it. If that person would be confused, the AI will be too.
Why a vague prompt gets vague answers
The AI can't guess what you didn't write. If you ask "write me an email," it has to make up who it's for, what it's about, what tone to use, and how long it should be. It fills those gaps with the most common option, and the most common option is almost never what you needed.
In its article on best practices, Anthropic stresses two ideas: tell the model exactly what you want to see, and don't assume it will infer goals you never mentioned. Google says something similar in its prompting strategies guide for Gemini: give clear, specific instructions, and add the context the model needs instead of expecting generic answers.
A before-and-after example
Here's what a vague prompt looks like:
Write me an email asking for a raise.
And here's the same request with what the AI needs to know:
Write an email asking my direct manager for a raise.
Context: I've worked as a purchasing analyst at a mid-sized company for two years. This year I took over negotiations with three new suppliers and cut delivery times. We have a friendly relationship and talk on a first-name basis.
What I want: to ask for a meeting to discuss it, not to negotiate the number over email.
Format: 150 words max, respectful and direct tone, no over-the-top phrases. End by suggesting two times we could meet.
The second one is longer, but every line answers a question the AI would otherwise have had to answer by making things up.
What a good prompt should include
There's no single formula, but the official guides agree on a few pieces. Google, in its help page about Gems, groups them into four: the persona the AI should take on, the task, the context, and the format. It points out that you don't always need all four, but using several helps.
- Task: what you want it to do, with a clear verb: summarize, compare, draft, fix, explain.
- Context: what it's for, who will read it, and what information it should use.
- Format: how you want the answer: a list, a paragraph, a table, how many words.
- Persona or role: the perspective it should answer from, for example "act as a copy editor."
- Examples (optional): a sample of what you expect, when style really matters.
If you want to see each piece in detail, with examples of each one, we explain it in the parts of a good prompt.
How to write a prompt in five steps
This method works for almost any request, from a weekly meal plan to a work report.
- Write the result you want in one sentence. "I want a two-week study plan for my statistics exam." If you can't say it in one sentence, the request isn't clear yet.
- Add the context only you know. Your level, your country, your budget, your audience, what you've already tried. That's what turns a generic answer into a useful one.
- Set the limits. Length, tone, what it shouldn't include. Google specifically mentions telling the model what it should and shouldn't do, like a length limit.
- Ask for a specific format. "Give me a numbered list," "a table with three columns," "a 100-word paragraph." That way you get something you can use without reworking it.
- Review and adjust. The first answer is rarely perfect. Anthropic says it plainly in its article: your first prompt will almost never work perfectly, so test and improve. If something's off, don't start over: tell it what to change.
Explain the why behind your rules
One detail that improves results a lot: when you set a rule, say why. Anthropic's guide shows this case: instead of writing "NEVER use ellipses," it's better to explain that the response will be read aloud by a text-to-speech program that doesn't know how to pronounce them. With the reason, the model understands the goal and applies it to cases you didn't foresee.
Before: Don't use technical words.
After: My mom is going to read this, and she's never used a spreadsheet. Avoid technical words and, if one is unavoidable, explain it in one simple sentence.
Full example: from vague request to useful prompt
Let's say you want to plan the week's meals.
Before: Give me a cheap weekly menu.
After:
Put together a lunch and dinner menu, Monday through Friday, for two adults in {{city and country}}.
- Approximate budget for the week: {{budget}}
- What I already have at home: {{available ingredients}}
- Restrictions: {{allergies or things we don't eat}}
Use ingredients that are easy to find at a neighborhood grocery store. Use leftovers from one dinner for the next day's lunch when possible.
Return it as a list by day and, at the end, a shopping list grouped by store section.
Notice the parts in curly braces: they're the details that change every time. That's the idea behind BibliotecaPrompts templates with blanks: the prompt is already written and you only fill in your part. For example, Un menú semanal que cuida el bolsillo (a budget-friendly weekly menu) works exactly like that. We explain why this format gives better results in prompt templates with blanks.
Three habits that save time
Ask it to tell you what it doesn't know
AI tools sometimes answer confidently even when they're missing information. Anthropic recommends explicitly giving the model permission to express uncertainty instead of guessing, because that reduces made-up answers. One line is enough:
If you don't have a piece of information or you're not sure, say so instead of guessing.
Break big tasks into parts
If your request has many stages (research, compare, decide, write), it usually works better to split it into several messages. Anthropic calls this prompt chaining: each prompt does one thing well. Google recommends the same for complex tasks in its Gemini guide. We go deeper in prompting techniques made simple.
Don't overcomplicate it
Longer isn't always better. The same Anthropic article warns that longer, more complex prompts don't always give better results. Add what the AI needs to do the task well and nothing more. If you want to review the most common slip-ups, check out common mistakes when writing prompts.
Ready-made prompts to get started
If you'd rather learn by looking at well-written prompts, these are good starting points from the catalog:
- Dale claridad a cualquier texto: improves a draft without changing your voice or adding facts.
- Convierte el caos en un plan: turns a to-do list into clear steps.
- Aprende algo difícil, paso a paso: to understand a new topic at your own pace.
- Escribe instrucciones que otra persona pueda seguir: useful for practicing the clarity a good prompt also needs.
Open them and see how they're built: a clear task, context, rules, and output format. It's the best way to train your eye.
Frequently asked questions
Does a prompt have to be in English to work well?
No. You can write it in any language the AI understands and ask for the answer in that same language. What matters is that the request is clear and specific, whatever the language. If you need the answer in a different language, ask for it explicitly.
How long should a prompt be?
Just long enough for someone without context to understand the task. A simple question can fit on one line; a report or a plan needs context, limits, and format. If in doubt, use the colleague test: would someone who knows nothing about the topic understand it?
Does the same prompt work for ChatGPT, Claude, and Gemini?
Generally, yes: the basic best practices are the same in all three providers' guides. Each one has a few nuances, which we explain in how to adapt a prompt for ChatGPT, Claude, and Gemini.
What do I do if the answer isn't useful?
Don't delete the conversation. Tell the AI what went wrong and what you expected: "it's too long, cut it in half" or "the tone is too formal, it's for a friend." Adjusting what's already there is usually faster than starting from scratch.
Do I have to tell the AI to act like an expert?
It helps, but it's not magic. A role guides the tone and approach; what improves the answer most is context and a well-explained task. A role without details still gets generic answers.