Skip to content
GEEKnodes

Computing · Updated on

How to Write Good Prompts for ChatGPT and Other AI Assistants

A practical guide to writing prompts that work in ChatGPT, Claude, Gemini or Copilot: structure, context, examples, ready-made templates and mistakes to avoid.

A prompt is the text you write to an AI assistant: the question, the instruction and all the context you give it. ChatGPT, Claude, Gemini, Copilot and the rest work in a similar way: the better you explain what you need, the better the answer.

This guide isn’t about “magic words”. It’s about how to ask so the first answer is already useful, with templates you can copy and adapt to any assistant.

The structure of a good prompt

A useful prompt usually has five parts. You don’t always need all of them, but the more you include, the less you’ll have to fix later:

  1. Task: what you want it to do, with a clear verb (write, summarize, compare, review, translate).
  2. Context: who it’s for, what you’ll use it for, what you already know.
  3. Material: the text, data or code it has to work on.
  4. Format: length, structure (list, table, steps), tone and language.
  5. Criteria: what to avoid, what to prioritize, how you’ll know it’s right.
Five connected parts of a prompt: task, context, material, format and criteria.
A complete prompt brings these five parts together to guide the answer better.

Compare these two prompts:

Write an email asking for a raise.
Write an email to my manager asking for a salary review.
Context: I've been at the company for 3 years as a support technician, and this year
I took on training two new colleagues.
Tone: professional and friendly, without sounding demanding.
Format: 150 words max, with a subject line, and propose a meeting.

The second gives the assistant what it needs so it doesn’t make things up or pad the answer.

Techniques that work

Give it context, not just a role

“Act as an expert in…” doesn’t help much on its own. It works much better to explain the situation: who will read the result, what their level is and what they need it for. “Explain it for someone who has never used Terminal” is more useful than “act as a teacher”.

Paste the material instead of describing it

If you want it to summarize, review or translate something, paste the full text. If the assistant lets you attach files, attach it. Mark clearly where the material starts and ends, for example with triple quotes or tags:

Summarize the following text in 5 points for someone with no technical background.

"""
(paste the text here)
"""

Show an example of the result you want

If you need a specific format, show it. One example is worth more than three paragraphs of explanation:

Convert this product list to the format in the example.
Example: Mechanical keyboard | $85 | In stock
List: (paste the list here)

Ask it to reason before concluding

For multi-step problems (calculations, comparisons, diagnosing an error), ask it to analyze first and give the conclusion at the end: “Analyze the three options, list the pros and cons of each and finish with a justified recommendation”.

Break big tasks down

Instead of asking it to “write a complete article”, first ask for an outline, review it and then go section by section. You get more control and fewer mistakes.

Iterate in the same conversation

The first answer is a draft. Correct it with specific instructions: “shorter”, “remove the jargon from the second paragraph”, “add an example with numbers”. There’s no need to start over.

Improvement cycle going from draft to adjustment to a revised answer.
A specific instruction lets you refine the draft without starting over.

Ready-to-use templates

Explain a concept

Explain what [concept] is as if I had basic computer knowledge.
Use an everyday example and finish with a 2-line summary.

Solve a technical problem

I have this problem: [describe what's happening].
System: [Windows 11 / macOS / Raspberry Pi OS…], version [X].
I've already tried: [what you've done].
Exact error message: [copy it].
Give me the steps ordered from simplest to most complex.

Compare options

Compare [option A] and [option B] for [your specific use].
Do it in a table with: approximate price, pros, cons and who it's best for.
If you're missing information to recommend one, ask me.

Review a text

Review this text: fix spelling and grammar, and flag confusing sentences.
Don't change the style or content. Show me only the changes with a brief explanation.

Write code

Write a script in [language] that [what it has to do].
Input: [what it receives]. Expected output: [what it returns].
Add brief comments and explain how to run it.

Create a table

Create a table with 4 action movies: title, release year and a one-line synopsis.

Check that the answer is good

Checking data, code and sources before accepting an answer.
Verify the data, test the code and confirm the sources before using the answer.
  • Verify the facts. Assistants can make up dates, figures, quotes or references with complete confidence. Check anything important against the original source.
  • Test the code in a safe environment before using it for real, and review any command that deletes or modifies files.
  • Ask for sources if the assistant can search the internet, and open them to confirm they say what it summarizes.
  • Check that it does what you asked: length, format, tone. If not, tell it explicitly.

Common problems

The answers are generic and padded. It’s missing context. Add who it’s for, what you’ll use it for and an example of the result you expect.

It makes up facts. Ask it to say explicitly when it isn’t sure, paste the reference material in and always check the figures.

It ignores part of the instructions. The prompt is too long or messy. Organize it into sections (task, context, format) or split the task into steps.

It loses track in very long conversations. Start a new conversation with a summary of what matters: the assistant works better with a clean context.

The answers are too long. Set a specific limit: “100 words max” or “in 3 points”.

Frequently asked questions

Do the same prompts work for every assistant? Yes, essentially. They all respond better to clear instructions with context. The style of the answer may vary, but the structure in this guide works with any of them.

Can I paste personal or company data? Check the privacy policy of the service and of your company before doing so. As a rule, don’t paste passwords, customer data or confidential information.

What language should I write the prompt in? The one you want the answer in. If you mix languages, say which one you want the result in.

Accessibility preferences

Quick profiles

Text and reading

Text size
Default
Line height
Default
Letter spacing
Default
Word spacing
Default

Colour

Motion and orientation

Cursor