Prompting and context concept
How to write an AI prompt
ReferenceHow to write an AI prompt: state the task clearly, include the context the AI needs, and describe what a useful answer should look like. Then read the response and adjust your request if it misses the goal. A prompt is a starting point for a conversation, not a guarantee of a correct answer.
Reviewed 2026-10-09
What a prompt needs to do
A prompt is the request or input you give an AI system. For a useful first draft, make the task concrete: say what you want done, who or what it is for when that matters, and what information the system should use. If you have a source passage or other relevant material, include it and make clear which part is the material to work from.
Also describe the answer you can use. For example, specify whether you want a short explanation, a draft email, or a fixed number of ideas. Add constraints that affect the result, such as length, audience, tone, or details to include. Keep the request focused; if it contains several distinct tasks, it may be easier to handle them in separate prompts.
Build the request in a useful order
Start by deciding what a successful answer would let you do. Turn that into a clear task, then add only the background the AI needs, such as definitions, audience, constraints, or a source passage. Separate that background from your instructions with labels or clear formatting when the two could be confused.
Next, describe the answer’s shape: its format, length, tone, or required parts. An example can help show a pattern when the format or style is hard to describe, but it should match the task you actually want. Try the prompt, inspect the response, and change the part that caused the mismatch: clarify the task, add missing context, or adjust the output requirements. This process is iterative, so a first draft is something to evaluate.
Common ways a prompt can miss
A vague request leaves important choices unstated. “Tell me about this” does not say what to focus on or what form the response should take. A request can also be overloaded: several unrelated goals in one prompt may be clearer as smaller, focused tasks.
Missing context is another common problem. If the answer depends on a particular audience, source, definition, or constraint, say so rather than expecting the AI to infer it. Instructions and examples can also pull in different directions; make sure an example demonstrates the kind of answer you want. Finally, a polished or confident-sounding response is not proof that it meets your needs. Check it against the task and the material you supplied.
Check the response before using it
Compare the response with your request. Did it do the task, use the relevant context, follow the requested format, and cover the points you needed? If not, identify the specific gap and revise the prompt around it. For example, missing details may call for more context; the wrong format calls for a more explicit format requirement.
For a factual answer, check important claims against reliable source material rather than treating the response itself as verification. If you supplied a passage, check whether the answer reflects that passage. For a draft or creative task, judge it against your audience and purpose. Try a revised prompt and review the new response too; prompting guidance treats refinement as part of the process, not a one-time setup.
Questions people ask
How specific should an AI prompt be?
Specific enough to state the task, relevant context, and the answer format or constraints you care about. Add detail where it helps the AI understand your goal; for a complex task, break it into smaller requests.
Should every prompt include examples?
No. An example can help show a desired format, tone, or pattern when words alone are unclear. Use examples that match your task, and check that they do not suggest something different from your instructions.
What should I do if the AI gives a poor answer?
Identify what missed the mark, then revise the relevant part of the prompt: clarify the task, add context, or specify the expected response more clearly. Review the next answer against your original goal as well.
Can a well-written prompt guarantee a correct answer?
No. A clear prompt can make your request easier to understand, but you should still check important factual claims against reliable sources.
Learn more
- How do I create a good prompt for an AI model?
A concise guide to clarifying the task, adding context, and working through follow-up prompts.
- Prompt design strategies
Examples of clear instructions, context, constraints, examples, and response formats.
- Prompting best practices
Practical guidance on clarity, relevant context, examples, and organizing a prompt.
What changed
Sources
Part of Prompting and context: Instructions, examples, and response shapeSupply and separate relevant contextTest the result and revise the prompt