Quick answer: The most effective prompt engineering techniques are giving clear context, assigning a role, being specific, showing examples, defining the output format, setting constraints, breaking big tasks into steps, providing source material and iterating with specific feedback. These prompt engineering techniques work with ChatGPT, Claude, Gemini and other models.
Table of Contents
Two people can use the same AI model and get completely different results. One gets vague, generic answers and concludes AI is overhyped. The other gets precise, useful work and saves hours every week. The difference is usually not the tool. It is the prompt.
Prompt engineering sounds technical, but at its core it is simply the skill of communicating clearly with an AI system. You do not need to learn special codes or magic phrases. You need to give the model the information, structure and feedback it needs to do good work, much like briefing a capable new colleague. This guide covers twelve techniques that reliably improve results, with examples you can adapt to your own work.
Why prompts matter so much
Large language models generate responses based on the text they receive. They do not know your goals, your audience, your standards or the background of your project unless you tell them. When a prompt is vague, the model fills the gaps with the most generic, average interpretation, which is why short prompts produce bland answers. When a prompt is clear and specific, the model can aim directly at what you need. If you want to understand why, our explainer on what a large language model is covers the basics.
Technique 1: Give clear context
Context is the single biggest lever. Tell the model who you are, who the output is for, what it will be used for and any background it needs.
Weak: “Write an email about the project delay.”
Better: “I manage a small web design agency. Write an email to a long-term client explaining that their website launch will be delayed by one week because a third-party payment integration failed testing. The client is friendly but under pressure from their own boss. Keep it honest, reassuring and under 150 words.”
The second prompt gives the model the relationship, the reason, the tone and the length, so the first draft is often usable.
Technique 2: Assign a role or perspective
Asking the model to adopt a role helps it choose relevant knowledge, vocabulary and priorities. “Act as an experienced high school biology teacher” or “Review this as a skeptical investor” shapes the response in useful ways. Roles work best when combined with a clear task. The role alone does not make the model an expert, but it focuses the answer.
Technique 3: Be specific about the task
Vague verbs produce vague results. Instead of “help me with my resume”, specify: “Rewrite the three bullet points under my most recent job so each starts with a strong action verb and includes a measurable result where possible. Do not invent numbers. Mark places where I should add a figure.”
Specific tasks also make it easier to judge whether the output is good.
Technique 4: Show examples
Examples, sometimes called few-shot prompting, are one of the most powerful techniques. If you want a particular style, format or level of detail, show one to three examples.
“Here are two product descriptions I like: [example 1] [example 2]. Write a description in the same style for this product: [details].”
The model will pick up tone, length, structure and vocabulary from your examples far more reliably than from a description of the style.
Technique 5: Define the format
Tell the model exactly how to structure the output: bullet points, a numbered list, a table with specific columns, a short paragraph, headings, JSON, or a word limit. For example: “Give me a table with three columns: tool name, best use case and main limitation.” Clear formats save editing time and make outputs easier to use in documents and spreadsheets.
Technique 6: Set constraints
Constraints guide the model toward what you actually want and away from common failure modes.
- Length: “under 100 words”, “exactly five bullet points”.
- Audience: “for a 12-year-old”, “for senior engineers”.
- Style: “no jargon”, “conversational”, “no exclamation marks”.
- Content: “only use information from the text I provide”, “do not mention pricing”.
- Honesty: “if you are not sure, say so”.
Negative constraints, telling the model what not to do, are especially useful for avoiding clichés and filler.
Technique 7: Ask for step-by-step reasoning
For problems involving logic, math, planning or analysis, asking the model to work through the problem step by step often improves accuracy. “Think through this step by step before giving your final answer” encourages the model to break the problem down instead of jumping to a conclusion. Many newer reasoning models do this automatically. Our guide to AI reasoning models explains how they work.

Technique 8: Break big tasks into smaller ones
Asking for a complete 3,000-word report in one prompt usually produces something shallow. Instead, chain smaller prompts:
- “Suggest an outline for this report.”
- “Expand section two with these notes.”
- “Now write section three, keeping the same tone.”
- “Review the whole draft for repetition and gaps.”
Each step is easier for the model and easier for you to check and steer. This approach, sometimes called prompt chaining, is how many professionals use AI for substantial work.
Technique 9: Provide source material
When accuracy matters, give the model the facts instead of asking it to recall them. Paste the article, report, transcript, data or notes and say: “Answer using only the information below. If something is not covered, say so.” This grounding dramatically reduces made-up information, a problem explained in our guide to AI hallucinations.
Technique 10: Iterate with specific feedback
The first response is a draft, not a final answer. Treat the conversation as a collaboration. Useful follow-ups are specific:
- “Make the second paragraph more concrete with an example.”
- “This is too formal. Rewrite it as if you are talking to a friend.”
- “Cut it by a third without losing the main argument.”
- “The audience already knows the basics. Remove the introductory explanations.”
Vague feedback like “make it better” produces vague changes. Specific feedback produces specific improvements.
Technique 11: Ask the model to critique and improve its own work
Models can often spot weaknesses when explicitly asked to review. Try: “Review your answer as a critical editor. What is unclear, missing or possibly wrong? Then provide an improved version.” Or ask for multiple options: “Give me three different versions with different approaches, then tell me which you think is strongest and why.” This works well for writing, plans and strategies, though it does not replace your own judgment or fact-checking.
Technique 12: Ask the model to ask you questions
When you are not sure what details matter, let the AI interview you. “Before writing the proposal, ask me up to five questions that would help you make it more specific and persuasive.” This turns a vague request into a well-informed one and often reveals considerations you had not thought about.
A reusable prompt template
Combining these techniques gives you a simple template you can use for almost any task:
- Role: Who should the AI act as?
- Context: What is the situation and background?
- Task: What exactly should it produce?
- Audience: Who is the output for?
- Format: How should the output be structured?
- Constraints: Length, tone, what to avoid, what sources to use.
- Examples: Optional, but powerful.
Example: “You are an experienced career coach. I am a civil engineer with six years of experience applying for project manager roles in construction. Rewrite my LinkedIn summary for recruiters in that field. Use first person, keep it under 200 words, highlight leadership and budget management, avoid buzzwords like ‘synergy’ and ‘passionate’, and end with what kind of role I am looking for. Here is my current summary: [text].”
Common prompting mistakes
- Being too brief. One-line prompts leave too much to guesswork.
- Packing too much into one prompt. Many unrelated requests at once lead to shallow answers.
- Assuming the model knows your context. It does not know your company, your audience or your previous work unless you tell it or it has access through memory or connected tools.
- Accepting the first answer. Iteration is where the real quality comes from.
- Not checking facts. Good prompts reduce errors but do not eliminate them.
- Using copy-paste “magic prompts” without adapting them. Templates help, but your specific context is what makes them work.

Prompting differs slightly between models
Most techniques work across ChatGPT, Claude, Gemini and other models, but each has quirks. Some follow long, detailed instructions especially well. Some are better with structured formats or example-heavy prompts. Reasoning models may need less step-by-step instruction because they reason on their own. If a prompt does not work well in one tool, try rephrasing rather than assuming the task is impossible. Our comparison of ChatGPT vs Claude vs Gemini covers differences between popular assistants.
Building your own prompt library
Once you find prompts that work, save them. Keep a simple document or note with your best prompts for recurring tasks: weekly reports, email replies, social posts, meeting summaries, code reviews. Many AI tools now let you save custom instructions, create reusable assistants or set default preferences, which is like building a prompt library into the tool itself. Our guide to building a custom AI assistant without code shows how.
Before and after: a real prompt makeover
Seeing techniques combined makes them easier to remember. Imagine a small bakery owner who wants help with social media.
Before: “Write some Instagram posts for my bakery.”
The result will be generic: cheerful captions about “fresh baked goodness” that could belong to any bakery anywhere.
After: “You are a social media manager for small food businesses. I run a family bakery in a busy neighborhood, known for sourdough and cardamom buns. Our customers are young professionals and families. Write five Instagram captions for next week: one introducing our new pistachio croissant, one about our 6 a.m. baking routine, one customer appreciation post, one weekend special and one behind-the-scenes post about my grandmother’s recipes. Keep each under 60 words, warm and slightly playful, with one relevant emoji at most and two or three local hashtags. Avoid the words ‘delicious’ and ‘mouthwatering’. Here is one past caption I liked: [example].”
This version uses role, context, a specific task, audience, format, constraints and an example. The output will be far closer to something the owner can post immediately.
Prompting for different kinds of tasks
Different tasks reward different techniques:
- Writing: Examples and tone constraints matter most.
- Analysis: Provide the data, ask for step-by-step reasoning and request a clear structure for findings.
- Learning: Ask the model to explain at your level and then quiz you.
- Coding: Share the exact error, the relevant code and what you expected to happen.
- Planning: Ask it to ask you questions first, then propose options with trade-offs.
Matching techniques to the task is what turns prompting from guesswork into a reliable skill.
Advanced techniques: prompt chaining and structured output
Once the basics feel natural, two techniques make AI far more reliable for bigger jobs.
Prompt chaining means splitting a task into a series of prompts, where the output of one becomes the input of the next. Instead of asking for a finished report in one go, you might ask for an outline, approve it, then ask for each section, then ask for a final edit. Each step is easier for the model and easier for you to check. Chaining is how most professional AI workflows are built.
Structured output means asking for a fixed format you can reuse, such as a table with named columns, a bulleted checklist or JSON. For example: “Return a table with columns Task, Owner, Deadline and Risk. Use one row per task. Do not add commentary.” Structured output is easier to paste into a spreadsheet, compare across runs and spot gaps in.
- Name every field or column you expect.
- Give one filled-in example row.
- Tell the model what to do when information is missing, for example “write Unknown”.
- Ask it to check its output against the format before replying.
Our free AI prompt library has 100 ready-made prompts that already use these patterns.
Final thoughts
Prompt engineering is not about tricks. It is about clear communication: giving context, being specific, showing examples, defining the format, setting constraints and iterating with useful feedback. Master these twelve techniques and you will get noticeably better results from any AI model, whether you are writing, analyzing, coding, learning or planning. For a hands-on beginner walkthrough, see our step-by-step guide on how to write better AI prompts.
Sources and further reading on prompt engineering techniques: Anthropic prompt engineering guide, OpenAI prompt engineering guide.
Frequently asked questions
What is prompt engineering?
Prompt engineering is the practice of writing instructions for AI models in a way that produces accurate, useful and well-formatted results.
Do I need technical skills to write good prompts?
No. Good prompting is mostly clear communication: context, specific tasks, examples, formats and feedback. Anyone can learn it.
What is the most important prompt technique?
Giving clear context is usually the biggest improvement, followed closely by providing examples and specifying the format you want.
Are there magic words that make AI perform better?
Not really. Phrases like “think step by step” can help for reasoning tasks, but clarity and context matter far more than special wording.
Will prompt engineering still matter as AI improves?
Models are getting better at understanding vague requests, but clearly explaining what you need will always improve results, just as it does when working with people.




