Contents
- 1. What is prompt engineering?
- 2. The three principles that change your results
- 3. [Core] The 6 parts of a good prompt
- 4. 7 practical techniques that work right away
- 5. Before → After, with a real example
- 6. Next-level techniques (CoT, chaining, more)
- 7. 7 common mistakes
- 8. Model-specific tips and safety
- Summary
- FAQ
You ask the same AI the same thing — yet one person calls it "useless" while another is amazed at how "almost too capable" it is. The real cause of that gap is often not the AI's power, but how the prompt (the instruction) is written. AI is like a brilliant new hire who cannot read your mind: the quality of the instruction you give largely determines the quality of the answer you get back.
This article is a practical compendium of that skill — prompt engineering — organized so a beginner can use it right away. In short, the trick is to keep "the 6 parts of a good prompt (role, context, instruction, examples, format, constraints)" in mind, and to refine through conversation rather than nailing it in one shot. We boil down the approach that the public guides from OpenAI, Anthropic, and Google all recommend, in plain language, onto a single page. For concrete cases, see also prompt tips for asking AI to build an app, and for safety, precautions for the information you input.
A good prompt is built from "6 parts"
— you do not need them all; just add the parts you need
These six are the elements that major frameworks worldwide, like COSTAR and RCOF, all list in common. Rather than memorizing them, the trick is to ask while writing: "which part is missing?"
*The techniques here are a summary of general methods widely recommended in the public guides and research of various companies (OpenAI, Anthropic, Google, etc.). Their effect varies by model, task, and input, and results are not guaranteed.
1. What is prompt engineering?
Prompt engineering is the skill of designing and improving your instruction (the prompt) so that an AI — ChatGPT, Claude, Gemini, and so on — returns the answer you want. It is not difficult programming; it is closer to "the craft of how you say things."
Prompt engineering = "the skill of assembling your instruction to an AI so the intended answer comes back, then testing and fixing it." It is the design of words, not code. Anyone can start practicing today.
Why does it work? Today's AI (a large language model, or LLM) builds an answer by predicting, "plausibly," how the given text should continue. In other words, change the words at the entrance (the prompt), and the answer at the exit changes greatly. For the very same question, simply adding a role, context, or output format can sharply raise accuracy and usability — that is the power of prompt engineering. No special talent is needed. Learn the "patterns," and fix things a few times. That alone makes anyone better.
2. The three principles that change your results
Before the fine techniques, lock down just three principles that everything rests on. Miss these, and any technique you add will spin its wheels.
① Be specific
"Make it nice" is out. Spell out for whom, what, and how much with numbers and conditions. Vagueness invites the AI's own guesses.
② Give context
Share the background, goal, and audience. The AI does not know your situation. The more premises you share, the more on-target it gets.
③ Specify the output
Set the shape you want up front — table, bullets, length, tone. Decide the form, and the content falls into place.
One more humble but effective trick: write "do X" rather than "don't do Y." With prohibitions alone, the AI cannot tell what to do instead. Rather than "don't use jargon," say "use words a middle-schooler would understand" — pointing to the direction you want is more stable. It is an iron rule emphasized again and again in the major guides.
3. [Core] The 6 parts of a good prompt
Let us turn the 6 parts from the opening diagram into actual writing. You do not need all six every time. Choosing the parts a task needs, and filling in what is missing, is how pros use it.
| Part | Job | Example phrasing |
|---|---|---|
| ① Role | Fix the AI's stance and expertise | "You are an SEO writer with 10 years of experience" |
| ② Context | Share background, goal, audience | "The reader is a 20-something investing for the first time; prioritize reassurance" |
| ③ Instruction | State the task clearly, with a verb | "Summarize the text below in 300 characters" |
| ④ Examples | Show the pattern with a model | "For example: input 'A' → output 'B'" |
| ⑤ Format | Specify the output structure | "As a table with a heading plus 3 bullets" |
| ⑥ Constraints | Set tone, length, prohibitions | "Polite, avoid jargon, within 500 characters" |
Combine them and you get a prompt like this. The more parts you supply, the more steadily the reply lands where you aimed.
[Context] The reader is a college student who just started living alone, with minimal kitchen tools.
[Instruction] Suggest a dinner recipe that can be made in 15 minutes.
[Format] List the dish name, ingredients, and steps, each as bullet points.
[Constraints] Under $3 per serving, no more than 3 steps that use the stove.
Compare that with "tell me a dinner I can make in 15 minutes," and you can imagine how much more usable the answer will be. The more parts you add, the easier it is for the AI to fit "your situation."
4. 7 practical techniques that work right away
With the 6 parts in mind, here are 7 concrete techniques you can use tomorrow. Each helps even on its own.
① Give it a role
"You are an expert in X" instantly narrows the vocabulary, viewpoint, and premises, and steadies the quality.
② Show a model (few-shot)
Give one or a few input → output examples, and the AI imitates the format and tone. Especially good for classifying and converting.
③ Make it reason step by step
Adding "think it through step by step" raises accuracy on complex problems (chain of thought; details in section 6).
④ Fix the output format
Specify "as a table," "as JSON," "as 3 bullets." Easier to use downstream, and less variance.
⑤ Structure with delimiters
Separate instruction from material with headings or symbols. Make the boundary clear, like "Summarize the text below:".
⑥ Do not over-ask at once
Split big requests. One prompt, one goal raises accuracy and makes fixes easier.
⑦ Refine by conversation (iterate)
Do not aim for perfect in one shot. Add "shorter," "for experts," and grow it — that is the fastest route.
Of these, the highest return comes from ⑦, iteration. The essence of prompt engineering is not "writing one perfect sentence," but steering the answer closer through dialogue with the AI. Treat the first reply as a rough draft, and the whole thing gets easier — and you get better.
5. Before → After, with a real example
Let us put the principles and techniques side by side in a common scenario — a "bad example" versus a "good example." The difference is obvious at a glance.
✗ Before (vague)
"Write a marketing email."
- Unclear recipient or product
- Length, tone, goal unspecified
- You get a bland, generic text
✓ After (6 parts)
"You are a B2B sales rep. Write an email to existing customers announcing a new feature. Polite but concise, 200 characters, in the form of subject + body + CTA."
- Role, audience, goal are clear
- Length, tone, structure specified
- You get usable, concrete text
The point is that the After uses no special expertise. It just adds "who, to whom, what, in what form, in what tone." That difference is what shapes your daily working time and the quality of the output.
6. Next-level techniques (CoT, chaining, more)
Once you are comfortable with the basics, knowing some "advanced moves" that shine on complex tasks gives you an edge. Just grasp the idea — that is enough.
🧠 Chain of thought (CoT)
Prompt it to "reason in order" and show the process before the conclusion. A staple that raises accuracy on math, reasoning, and multi-step judgment.
🗳️ Self-consistency
Have it reason the same question multiple times and pick the answer by majority. Combined with CoT, it adds stability.
🔗 Prompt chaining
Split a big job into several prompts — "research → draft → polish." You can reach a quality a single pass cannot.
🛠️ ReAct (reason + act)
Repeat "reason → use a tool → look at the result → reason next." It is the basis of AI agents.
One important update to add. "Reasoning models" — such as OpenAI's o-series and Claude's extended thinking — are built to perform CoT internally and automatically. So with these models, the need to write "reason step by step" every time has dropped. If anything, it works better to clearly convey "what you want to achieve (the goal)." Techniques are not universal; the best move changes with the model you use — keep that sense, and you will level up.
7. 7 common mistakes
Let us head off the familiar pitfalls that block your progress. If any ring a bell, that is your room to grow.
- Dumping it vaguely: "Make it nice" gives the AI no standard. Be specific about conditions.
- Zero context: Skipping background, goal, and audience. Remember the AI does not know your situation.
- Prohibitions only: Just "don't do Y." Instead, point the way with "do X."
- Cramming too much at once: Five requests in one prompt. Splitting improves both accuracy and fixability.
- No format specified: Leaving the output shape to the AI. Decide table, length, and tone first.
- No examples: A "pattern" words cannot fully capture lands instantly if you show one model.
- Giving up after one shot: Judging on the first answer. If you assume you will add and fix, you can push it further.
Flip these around, and you improve fast. "Vague → specific," "omitted → context," "dumping → splitting," "one shot → iterate." Those four arrows are all you need to keep in mind.
8. Model-specific tips and safety
Finally, two things that often trip people up in practice — the differences between models, and safety when you input.
Model tendencies: ChatGPT, Claude, and Gemini each have slightly different strengths and quirks. People say Claude is good at organizing long text and polished writing, Gemini at fresh information and search integration, and ChatGPT at all-round balance (using each by task is wise). For which to pick, see ChatGPT vs Claude vs Gemini comparison. But across all of them, the 6 parts in this article work.
Safety: As important as getting better at prompts is "what you are allowed to input." Carelessly pasting confidential information, personal data, or internal materials risks data leakage and policy violations. If you use AI at work, be sure to read precautions for the prompts and information you give AI. Good prompting and safe input are two wheels of the same cart.
Summary
Here are the practical points of prompt engineering, condensed.
- The essence: The skill of designing and improving your instruction to AI. Not code but "the craft of how you say things" — anyone can improve starting today.
- Three principles: ① be specific ② give context ③ specify the output. That is the whole foundation.
- The 6 parts: Role, context, instruction, examples, format, constraints. Not all every time — fill in what is missing.
- 7 techniques: Role / model / step-by-step / fixed format / structure / split / iterate. The strongest is "iterate."
- Advanced: CoT, self-consistency, chaining, ReAct. With reasoning models, stating the goal works well.
- Two wheels: Good prompting + safe input. Beware of pasting confidential data.
In the end, prompt engineering is not "a special person's skill." With just the attitude of "turn vague into specific, turn dumping into dialogue," your AI will look transformed from today. Start by adding one "role" and one "output format" to your usual instruction in the ChatGPT in front of you. For concrete request examples, prompt tips for asking AI to build an app is also practical.
FAQ
Q. What is prompt engineering? Please explain simply.
A. It is the skill of designing your instruction (the prompt), then testing and improving it, so an AI like ChatGPT or Claude returns the answer you want. It is not difficult programming but closer to "the craft of how you say things," and you can practice today without specialist knowledge. The basics are to assemble your instruction by choosing what you need from six parts: role, context, instruction, examples, format, and constraints.
Q. What should a beginner learn first?
A. Start with three things: ① be specific (not "make it nice" but spell out for whom, what, and how much), ② give context (share background, goal, and audience), and ③ specify the output format (table, bullets, length, and so on). Also, "do X" is more stable than "don't do Y," because it points to the direction you want. Do not aim for perfect from the start; the fastest route is to add and fix as you go.
Q. Why does "giving a role" raise accuracy?
A. Because specifying a stance — "You are an expert in X" — instantly narrows the range of vocabulary, viewpoint, and assumed knowledge the AI uses. Without a role, answers tend to be generic and bland; fix a role, and it answers more readily with that expert's tone and depth. Role is a basic element always listed in major prompt frameworks (COSTAR, RCOF, and others).
Q. What is chain of thought?
A. It is a method of having the AI write out its reasoning process before giving a conclusion, such as "reason step by step." It is known to raise accuracy on math, logic, and multi-step judgment. Meanwhile, recent "reasoning models" — OpenAI's o-series and Claude's extended thinking — perform this chain of thought internally and automatically, so the need to state it explicitly every time has dropped. In that case, it is more effective to clearly convey "what you want to achieve (the goal)."
Q. Is a longer prompt better?
A. No, length itself is not the goal. What matters is whether the necessary parts (role, context, instruction, examples, format, constraints) are present without excess or shortage. Add what is missing; cut what is redundant. In fact, cramming too many requests into one prompt lowers accuracy, so splitting a big job into several prompts gives more stable results.
Q. Is there information I should not input into AI?
A. Yes. Carelessly inputting confidential information, personal data, customer data, or internal materials risks data leakage and violations of terms or laws. On free plans in particular, your input may be used for training, so checking settings and policy is essential for work use. For details, see the article on precautions for the prompts and information you give AI. Good prompting and safe input are two wheels of the same cart.