Prompting Techniques That Work
- Use role prompting to shape AI perspective and style
- Apply few-shot examples to guide output style
- Use chain-of-thought to improve reasoning accuracy
- Specify output format explicitly to get structured results
From Basic to Effective: Four Techniques
Writing a clear prompt gets you most of the way there. But once you understand a few specific techniques, your results improve dramatically. These are not tricks — they are reliable patterns that work because of how LLMs process language.
1. Role Prompting
Ask the AI to adopt a specific persona or expertise. This shifts the style, depth, and perspective of the response toward what you actually need.
Basic: "Explain compound interest."
Role-prompted: "You are a patient high school economics teacher. Explain compound interest to a 16-year-old who has never studied finance, using a simple everyday analogy."
The role gives the AI a target to aim for. It affects vocabulary, tone, assumed knowledge, and the kinds of examples it reaches for.
2. Give It Examples (Few-Shot Prompting)
If you want output in a specific style or format, show the AI an example of what you mean. This is called few-shot prompting — giving a few shots, or examples, alongside your request.
For instance, if you want product descriptions written in a particular voice, include one or two existing descriptions you like and say: "Write product descriptions in this style for the following items." The AI will pick up on patterns in your examples — sentence length, vocabulary, structure — and apply them to new content.
3. Ask It to Think Step by Step
For any task involving reasoning — maths problems, decision-making, analysis, planning — add the phrase "think step by step" or "work through this carefully before answering." This simple addition prompts the model to reason through the problem sequentially rather than jumping straight to a conclusion.
Research and user experience consistently show that this produces more accurate and more reliable answers, especially for anything involving logic or multiple interdependent steps.
4. Control the Output Format
Be explicit about how you want the answer structured. LLMs are extremely good at following format instructions if you give them clearly:
- "Give me three options as a numbered list, one sentence each."
- "Format this as a table with columns for Pros, Cons, and Cost."
- "Write this in JSON format with the keys: title, summary, tags."
- "Answer in two sentences max."
Format control is especially valuable when you plan to use the output programmatically or need to copy it directly into a document with a specific structure.
Combining Techniques
These four techniques are most powerful when combined. A single prompt might assign a role, provide an example, request step-by-step thinking, and specify an output format — all at once. That sounds like a lot, but in practice a well-structured prompt takes under a minute to write, and the result will be dramatically more useful than an unstructured one.
- Role prompting shifts vocabulary, tone, and assumed knowledge
- Examples are the fastest way to communicate style
- Asking to think step by step reduces reasoning errors
- Explicit format instructions are almost always followed accurately