---
title: "How to Write Better AI Prompts: 6 Techniques That Work in Any Chatbot"
url: https://theairanking.com/guides/how-to-write-better-ai-prompts/
published: 2026-11-26
updated: 2026-11-26
---

# 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.

- URL: https://theairanking.com/guides/how-to-write-better-ai-prompts/
- Type: Guides
- Category: AI Chatbots and Assistants
- Author: The AI Ranking Editorial Team, The AI Ranking
- Published: 2026-11-26
- Last updated: 2026-11-26
- Cite as: The AI Ranking Editorial Team, "How to Write Better AI Prompts: 6 Techniques That Work in Any Chatbot", The AI Ranking, November 26, 2026, https://theairanking.com/guides/how-to-write-better-ai-prompts/

**Short answer:** Good prompts read like a brief to a smart colleague who knows nothing about your situation: say exactly what you want, give the context and audience, show an example of a good result, separate your instructions from the material, and ask for the format you need. Then iterate on the answer instead of starting over.

## 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](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/be-clear-and-direct), 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](https://platform.claude.com/docs/en/prompt-library/library) 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](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-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](https://docs.anthropic.com/claude/docs/prompt-engineering): 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](https://theairanking.com/guides/ai-hallucinations-explained/).

## Sources

1. [Prompting best practices, Claude documentation, Anthropic](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/be-clear-and-direct)
2. [Use XML tags to structure your prompts, Anthropic](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags)
3. [Prompt engineering overview, Anthropic](https://docs.anthropic.com/claude/docs/prompt-engineering)
4. [Prompt engineering techniques and best practices, AWS Machine Learning Blog](https://aws.amazon.com/blogs/machine-learning/prompt-engineering-techniques-and-best-practices-learn-by-doing-with-anthropics-claude-3-on-amazon-bedrock)
