To prompt an AI well, tell it who to be, give it the context it cannot guess, ask for one specific task, describe the format you want, show an example, and set any limits. Then read the answer and steer it with precise corrections. Structure plus iteration is the whole skill, and it works in ChatGPT, Claude, and Gemini.
A prompt is just the text you hand the model, and the model only knows what that text tells it. This guide is the practical side: how to build one, fix one, and use it on an agent. It is learnable in an afternoon.
The official guides from Anthropic, OpenAI, and Google describe the same core ingredients in slightly different words. You will not need all six every time, but when an answer disappoints, the missing part is usually the fix.
Put together, a full prompt reads like a short brief:
You are [role]. Context: [who it's for, the background, why it matters]. Task: [the one thing to do]. Format: [length, structure, tone]. Example: [one sample of good output]. Constraints: [limits, and what to do if information is missing].
Want this pre-filled for common jobs? Our prompt templates are ready to copy, and the prompt writing tutorial walks you through saving your own.
Same model, same goal, very different results. Each strong version adds the parts the weak one skipped.
Think you can spot the stronger prompt every time? Test yourself in Prompt Battle, or try the daily challenge.
Examples are the most reliable way to steer format and tone. Adding a few is called few-shot prompting; Anthropic suggests three to five relevant, varied examples, while a prompt with none is zero-shot. For math, logic, or multi-step problems, asking the model to work through the problem before answering, known as chain-of-thought, tends to help. For a long job, split it into a sequence of smaller prompts, a pattern called prompt chaining.
Good prompters do not write one perfect prompt, they steer. When an answer is close, keep the conversation going and say exactly what to change.
If a rephrased prompt still misses, Google's guide suggests trying different wording or reordering the content in the prompt, since small changes can shift the result.
In a chat, you steer every reply. An AI agent takes many steps on its own, so the steering has to be written down in advance, in its system prompt (we call a rich one a soul file). The six parts still apply, plus a few agent-only ones:
Ready-made versions are in our agent system prompt templates, and the build an agent pillar puts it all together.
Everything above is prompting: asking well in the moment. Prompt engineering is the same craft done systematically, with success criteria, test runs, and versions, for prompts that run again and again inside apps and agents. For every term on this page, see the prompting section of the AI glossary.
Prompting is the skill of asking an AI clearly enough to get the result you want. It means giving the model a role, context, a specific task, a format, examples, and limits, then refining the answer with targeted corrections.
Cover six parts: the role the model should play, the context it needs, one specific task, the output format, an example of what good looks like, and any constraints. You will not need all six every time, but adding the missing one usually fixes a weak answer.
Being specific about the task and format, supplying context the model cannot guess, showing examples instead of only describing, breaking big jobs into steps, and iterating with precise feedback rather than starting over.
As long as it needs to be and no longer. A quick factual question can be one line. A task with an audience, a format, and rules needs those details written down, because the model only knows what the prompt tells it.
With a chatbot you steer each reply as you go. An agent works through many steps on its own, so its standing instructions, the system prompt, must spell out its goal, which tools it may use, when to stop and ask a person, and how to treat untrusted content it reads.
Yes. The official prompting guides from OpenAI, Anthropic, and Google recommend the same core habits: clear instructions, context, examples, and a defined format. Each model has quirks, but the structure on this page carries across all three.