AI & Future

How to Write Good AI Prompts

A good prompt is the difference between a useless AI reply and a genuinely helpful one. Learn the simple habits that make any chatbot work harder for you.

A glowing keyboard with a chat input field hovering above the keys
Photograph via Unsplash

A good AI prompt does four concrete things: it assigns a role, states the exact task, supplies the context the model cannot see, and defines the output format. Get those four right and almost any chatbot — ChatGPT, Claude, Gemini, or Microsoft Copilot — gives you something usable on the first try instead of the third.

The four-part structure that fixes most bad prompts#

Weak prompts fail because they leave the model guessing. When you type "give me tips for saving money," the model has no idea who you are, what you earn, or what a good answer looks like, so it returns the statistical average of every money article it has ever seen. That average is what most people call "generic AI slop."

Fix it with four labeled parts:

  • Role — who the model should act as. "Act as a practical budgeting coach."
  • Task — the exact deliverable, stated in verbs. "List five monthly savings tactics."
  • Context — the facts only you know. "I am a recent graduate earning about $3,200 a month after tax in a mid-size city, with roughly $900 rent."
  • Format — the shape of the answer. "Return a Markdown table with columns for the tactic, the estimated monthly saving, and the effort level."

Put together, that prompt leaves almost nothing to chance, and the reply reflects it. The thirty seconds you spend front-loading detail saves three rounds of "no, more like this." A useful mental test: if you handed your prompt to a competent stranger with no other information, could they produce what you want? If not, the missing information is exactly what you need to add.

Show examples, do not just describe#

The single most underused technique is giving the model an example. In the research world this is called few-shot prompting, and it consistently beats describing what you want in words.

  • Zero-shot is asking with no example: "Write a product description for wireless earbuds."
  • One-shot adds a single model answer: "Here is a description I like: [paste it]. Write one in this exact style for these earbuds."
  • Few-shot provides two or three examples so the model can infer the pattern — tone, length, structure, and vocabulary all at once.

Large language models are pattern-matchers at their core, so one concrete example often communicates more than a paragraph of adjectives. This works for tone ("match the voice of this sentence"), for structure ("follow this outline exactly"), and for formatting ("every entry should look like this row"). It also works in reverse: show the model what to avoid. "Do not use exclamation marks" or "no corporate jargon like synergy or leverage" draws a hard edge around the target so the model aims inside it.

Make the model reason before it answers#

For anything with multiple steps — math, logic puzzles, planning, comparing options against several criteria — add a line telling the model to work through it: "Think step by step before giving your final answer." This technique, known as chain-of-thought prompting, is well documented to improve accuracy on reasoning tasks because it forces the model to lay out intermediate steps instead of blurting a first guess.

It is not free, though. Step-by-step reasoning makes answers longer and slower, and for a simple lookup ("what is the capital of Peru") it just adds noise. Use it where the answer depends on a chain of logic, not where it depends on a single fact. Newer "reasoning" models do some of this internally, so if you are on one of those, you may not need to ask at all.

Use the built-in settings, not just the chat box#

Most people type everything into the message box every time. The bigger leverage is in the standing settings, where instructions apply to every future chat automatically.

  • ChatGPT Custom Instructions: Settings > Personalization > Custom Instructions. The two fields — what the model should know about you, and how it should respond — let you set your job, your preferred answer length, and your tone once, so you stop repeating them. Memory, in the same menu, also carries facts across conversations.
  • Claude Projects: create a Project in the left sidebar, then attach standing instructions and reference files (a style guide, a brief, past examples). Every chat inside that Project inherits them, which is ideal for recurring work like drafting emails in a fixed voice.
  • Gemini Gems: build a custom "Gem" with a saved role and instructions you reuse, rather than re-describing the setup each session.

If you use a tool through a developer playground (OpenAI Playground, Google AI Studio, or the Anthropic Console) rather than the consumer app, you also get a temperature control. Lower values, near 0, make the output more focused and repeatable — good for factual or structured tasks. Higher values, toward 1, make it more varied and creative. The standard consumer chat apps hide this control, so do not go hunting for it in the message box.

The common mistakes that quietly ruin results#

Stuffing ten requests into one prompt. "Write a business plan, design a logo, name the company, and draft a launch tweet" splits the model's attention and every piece comes out shallow. Break big jobs into stages: ask for an outline, react to it, then expand the parts you liked. Staged prompting gives you a control point at each step.

Being polite-vague. "Could you maybe help me with something about marketing?" wastes a turn. Politeness is fine; vagueness is the problem. Lead with the concrete ask.

Forgetting the format. If you do not specify a table, a numbered list, or a word count, you get a wall of prose you then have to reshape. Name the format up front.

Dumping enormous documents blindly. Models read text in units called tokens — very roughly, 750 English words is about 1,000 tokens. Each model has a context window limit, which today ranges from a few thousand tokens on older models to 200,000 or even a million on the newest ones. Paste more than the window holds and the earliest text silently drops out of the model's memory, which is why a chatbot sometimes "forgets" the file you gave it earlier.

Trusting a confident answer. A polished sentence is not a true one. Models predict plausible text, so they can invent statistics and fabricate citations that look real. Verify names, numbers, dates, and legal or medical claims against a source you trust — and never paste passwords, financial details, or other people's private information, since what you type may be stored or used for training depending on the product's settings.

A repeatable prompting workflow#

  1. Write a first prompt using Role, Task, Context, Format. Do not aim for perfect.
  2. Read the reply and identify the single biggest gap — too long, wrong tone, missed a constraint.
  3. Give one specific correction: "Cut it to 150 words" or "That second idea is best, give me five more like it." The model keeps the earlier thread, so you are editing, not restarting.
  4. Once a phrasing reliably works, save it into Custom Instructions, a Project, or a Gem so you never rebuild it.
  5. Verify anything that matters before you rely on it.

Treating the exchange as a conversation, not a one-shot command, is what separates people who find AI frustrating from those who find it fast. Be specific, show examples, let it reason when the task needs it, and check the facts yourself. Do that and the tool stops feeling random and starts feeling like a collaborator that understands the assignment — because you finally told it.

FAQ#

Is there a magic phrase that makes AI give better answers?#

No. Ordinary, specific language beats any "secret" phrase. The gains come from supplying role, task, context, and format — not from incantations like "you are the world's best expert." Clear instructions a human could follow will always outperform tricks.

How long should a prompt be?#

As long as it needs to be to remove guesswork, and no longer. A one-line question is fine for a simple fact; a paragraph with context and an example is right for a nuanced task. Padding a prompt with filler does not help and can bury the actual request.

Should I be polite to the AI?#

Politeness does not meaningfully change output quality, so use it or skip it as you prefer. What matters is clarity and specificity. "Please" is harmless, but it is the concrete details around it that improve the answer.

Why does the chatbot forget what I told it earlier?#

Every model has a limited context window measured in tokens, and once a long conversation or a large pasted document exceeds it, the oldest text drops out of view. Start a fresh chat for a new topic, and for facts you want remembered across sessions, use the memory or custom-instructions feature instead of relying on scroll-back.

Priya Nadar
Written by
Priya Nadar

Priya translates the fast-moving world of AI and the internet into things you can actually use and understand. She's curious but skeptical, quick to separate genuine progress from hype, and keen to help readers use new tools wisely rather than fearfully.

More from Priya