What is prompt engineering?
An AI model only "sees" the words you give it. Prompt engineering is the skill of writing those words so you reliably get good, useful output. Learn what makes a prompt strong, the parts of a good prompt, and the core techniques — right here on the page.
01Weak prompt vs. strong prompt
Asking an AI for help is a bit like handing a task to a brand-new assistant who can't ask follow-up questions: the clearer your written request, the better the result. That skill of writing the request well is called prompt engineering — and the words you type (your prompt) are all the model has to work with, so structure matters. Take the same task and compare a vague one-liner with a structured prompt. Flip between them below.
A one-line ask leaves every choice — length, audience, format — up to the model, so results vary wildly run to run.
- The same task can give very different output depending on how the prompt is written.
- A strong prompt removes guesswork: it states the task, the context, an example, and the format you want.
- Clear prompts make results more consistent — closer to the same quality every time.
02The parts of a good prompt
A strong prompt is usually built from a few building blocks. You won't always need all of them, but knowing them gives you a checklist. Tap each part to see what it does — the default shows Instruction, the one piece almost every prompt needs.
Instruction
The core ask: say exactly what you want the model to do, as specifically as you can. Replace vague verbs ("help with") with precise ones ("summarize," "rewrite," "list"). This is the one part almost every prompt needs.
Strong: "Summarize the three most common care needs of a Labrador puppy."
03Core techniques to know
Beyond the basic building blocks, a handful of techniques reliably improve results. Switch between them — each is a tool you reach for depending on the task.
Few-shot — show the pattern
Give the model one to three examples of the input → output you want before your real request. Examples teach the desired style and format faster than describing them in words.
Chain-of-thought — think step by step
For reasoning, math, or multi-step tasks, ask the model to work through it step by step before giving an answer. Spelling out the reasoning often improves accuracy on harder problems.
Role & persona — set the framing
Tell the model who it should act as. A role shapes tone, vocabulary, and what it focuses on — useful for matching an audience or a domain.
Output format — set the shape
Say exactly how you want the answer delivered: a bulleted list, a table, JSON, a single sentence. Specifying the format makes output easier to use and easier to reuse.