What is a prompt and how do you write a good one?
A prompt is the instruction and input you give an AI model. It decides what the model does, what it knows and what shape the answer takes.
What is a prompt?
A prompt is everything you write to an AI model: a question, an instruction, an example or an attached document. The model reads the prompt and produces the most fitting continuation. The same model can give very different answers to a well written and a badly written prompt. Designing and improving prompts is called prompt engineering.
What goes into a good prompt?
The model knows nothing about your situation beyond what you give it. An effective prompt usually answers these questions:
- What exactly is the task? "Turn these meeting notes into a five point summary for my manager" works better than "summarize".
- What is the context? Audience, company, goal and constraints.
- What should the output look like? Length, tone, language, a table or a list.
- Is there an example? Showing one or two examples of the answer you expect (few-shot) often works better than a long explanation.
A weak and a strong prompt
Weak: "Write an ad for our product."
Strong: "Write an Instagram ad for our home water filter. The audience is parents of young children who do not trust tap water. Focus on one benefit: the filter is changed only once a year. Keep it friendly, under 150 characters, and give three versions with different angles."
The second prompt tells the model the audience, the message and the format, so the first draft is far more likely to be usable.
Common mistakes
Asking for five unrelated things in one prompt muddies the result; splitting big jobs into steps works better. Words like "short" or "professional" mean different things to different people, so turn them into measurable limits such as "three sentences at most". Asking the model for recent facts it cannot know is also risky, because it may fill the gap with a fluent but wrong answer. That is called hallucination.
Prompt versus system prompt
The text a user types in each message is the prompt. The standing instructions a developer gives the model behind the scenes, valid in every conversation, are the system prompt. When the two conflict, models are usually trained to give the system prompt priority.