Category leaders
The AI Ranking

GuidesAI Chatbots and Assistants

How to Write Better AI Prompts: 6 Techniques That Work in Any Chatbot

Six prompting techniques from AI labs that work in ChatGPT, Claude and Gemini: be specific, give context, show examples, structure input and more.

Guides: How to Write Better AI Prompts: 6 Techniques That Work in Any Chatbot

Why prompts matter

AI models follow instructions closely, so vague prompts get generic answers. The techniques below come from the labs' own guides, such as Anthropic's prompting best practices, and they work in any major assistant.

Step 1: Be clear and specific

Say what you want, for whom, and how long. "Write a 150 word email to a client explaining a two week delay, apologetic but confident" beats "write an email about the delay". Anthropic's golden rule: show your prompt to a colleague; if they would be confused, the model will be too.

Step 2: Give context

Explain the situation, the goal and the audience, and what you have already tried. Context helps the model make the same choices you would.

Step 3: Show an example

If you want a particular style or format, paste one or two examples of what good looks like. Anthropic suggests three to five varied examples for best results in demanding tasks.

Step 4: Separate instructions from material

When you paste a document, mark where it starts and ends, with headings or tags such as a document label, so the model does not confuse your material with your instructions. Anthropic recommends XML style tags for this.

Step 5: Ask for the format you need

A table, five bullet points, a JSON object or a two sentence summary: say so. Asking for structure also makes answers easier to check.

Step 6: Break big jobs into steps and iterate

For complex work, chain prompts: outline first, then draft each part. When an answer is close, say what to change rather than starting again.

A template you can reuse

Part Example
Task Summarise this report for our board
Context They care about cost and risk; they have 2 minutes
Material The report, clearly marked
Example A summary you liked
Format 5 bullets, under 100 words, then one recommendation

To reduce made up facts, also read AI hallucinations explained.

Sources

  1. Prompting best practices, Claude documentation, Anthropic
  2. Use XML tags to structure your prompts, Anthropic
  3. Prompt engineering overview, Anthropic
  4. Prompt engineering techniques and best practices, AWS Machine Learning Blog

Related articles

AppsAI Chatbots and Assistants

Qwen: Alibaba's Free AI Assistant App Explained (2026)

Qwen explained: Alibaba's free AI assistant app, the Qwen models behind it, how they rank for chat, search and coding, and what international users should know.

· 2 min read