# How to write good AI prompts

> A good AI prompt states the task, context, format and constraints clearly. Learn practical steps, examples and common mistakes to get better answers.

URL: https://www.jalkarna.in/based/learn/how-to-write-good-prompts/  
Last updated: 2026-11-16

A good AI prompt states what you want, gives the context the model needs, and says what the answer should look like. The clearer and more specific the request, the less the model has to guess, and the more useful the reply.

A prompt is simply the text you give an AI. Writing it well is sometimes called prompt engineering, though for everyday use it is just clear communication.

## What makes a prompt good?

Strong prompts usually include four things:

1. **Task.** What should the AI do? Use a clear verb: summarize, compare, rewrite, explain, list.
2. **Context.** What does it need to know? Background, audience, and the text to work on.
3. **Format.** How should the answer look: bullet list, table, two short paragraphs, code?
4. **Constraints.** Length, tone, language, or things to avoid.

## Bad prompt vs good prompt

| Weak | Better |
|---|---|
| "Tell me about volcanoes" | "Explain how volcanoes erupt in 3 short paragraphs for a 12-year-old, with one everyday analogy" |
| "Fix this" | "This Python function should return the largest number but returns None. Find the bug and show the corrected code" |
| "Write a message" | "Write a friendly two-sentence message welcoming a new member to a gaming community" |

The better versions remove guesswork about audience, length, and goal.

## Step-by-step: build a prompt

1. Start with the goal in one sentence.
2. Paste in any source text the answer should rely on.
3. Say who the answer is for.
4. Specify the format and length.
5. Add anything to avoid.
6. Read the reply and refine with a follow-up.

## Useful techniques

- **Give an example.** Show one sample of the style or format you want, and the model will imitate it.
- **Assign a role.** "Act as a patient math tutor" sets tone and level.
- **Break big tasks into steps.** Ask for an outline first, then each section.
- **Ask for reasoning on hard problems.** Requesting the steps often improves accuracy and lets you check the logic.
- **Allow "I don't know".** Telling the model to say so when unsure reduces [hallucinations](https://www.jalkarna.in/based/learn/what-are-ai-hallucinations/).

## Common mistakes

- **Being vague.** "Make it better" does not say better how.
- **Stuffing in too much.** Irrelevant text can distract the model and uses up the [context window](https://www.jalkarna.in/based/learn/what-is-a-context-window/).
- **Asking many things at once.** Split multi-part requests.
- **Assuming it remembers.** The model only sees what is in the current conversation. Restate key facts, or see [what is AI memory](https://www.jalkarna.in/based/learn/what-is-ai-memory/).
- **Accepting the first answer.** Treat replies as drafts and iterate.

## Do prompts work the same on every AI?

Roughly, but not exactly. Different models and apps respond a little differently, and some apps add their own hidden instructions. If a prompt does not work, try rewording it. This applies to [chatbots](https://www.jalkarna.in/based/learn/what-is-an-ai-chatbot/) and to image tools. For images, see [what is AI image generation](https://www.jalkarna.in/based/learn/what-is-ai-image-generation/).

## Prompting in Based

On Discord you can talk to Based by mentioning it or replying to its messages. Be specific, include the details it needs, and attach an image if you want to ask about it. To make an image, use `/imagine` with a description, for example `/imagine a cozy library at sunset, watercolor style`. Every slash command also works with the "." prefix, such as `.imagine`. See the [image generation docs](https://www.jalkarna.in/based/docs/image-generation/) and the [AI chat feature page](https://www.jalkarna.in/based/features/ai-chat/). For general background, see [Wikipedia on prompt engineering](https://en.wikipedia.org/wiki/Prompt_engineering).

## FAQ

### What is a prompt in AI?

A prompt is the text or instruction you give an AI to tell it what to do, such as a question, a task, or a description of an image.

### How do I write a better prompt?

State the task clearly, include the context, say what format and length you want, and add constraints. Then refine with follow-ups.

### Should I use long or short prompts?

Use as much detail as the task needs and no more. Specific and focused beats long and cluttered.

### Why does the AI ignore part of my prompt?

Prompts with many competing requests can get partly missed. Split them into smaller steps and put the most important instruction clearly up front.

## Related
- [What is an AI chatbot?](https://www.jalkarna.in/based/learn/what-is-an-ai-chatbot/)
- [What are AI hallucinations?](https://www.jalkarna.in/based/learn/what-are-ai-hallucinations/)
- [What is a context window in AI?](https://www.jalkarna.in/based/learn/what-is-a-context-window/)
- [What is generative AI?](https://www.jalkarna.in/based/learn/what-is-generative-ai/)
- [What is AI image generation?](https://www.jalkarna.in/based/learn/what-is-ai-image-generation/)
