样是用 ChatGPT、Claude,为什么有人让 AI 写出来的东西能直接拿去用,有人改了半天还不如自己动手写?差距几乎全在**提示词(Prompt Engineering)**上。
模型本身没有变强或变弱,变的是你给它的指令质量。这一篇我把自己常用的 7 个原则整理出来,每个原则都配一个「反面例子」和「正面例子」,最后附 20 个可以直接复制改用的模板。看完这一篇,你的 AI 输出质量能上一个台阶。
为什么要学 Prompt Engineering?

原则 1:给 AI 一个明确的角色
AI 喜欢「人设」。你让它扮演一个具体的专家,它调用的知识库和语气都会更对路。
- ❌ 差:「帮我写一篇关于时间管理的文章」
- ✅ 好:「你是一位有 10 年经验的效率教练,正在给上班族写一篇 800 字的时间管理指南,语气务实、少用鸡汤」
一句话的角色设定,能让输出从「泛泛而谈」变成「有针对性」。

原则 2:把要求说具体,别让它猜
模糊的指令 = 模糊的结果。能给出的信息尽量给全:受众、长度、语气、用途、风格。
- ❌ 差:「写个产品介绍」
- ✅ 好:「写一段 100 字的产品介绍,目标用户是独立开发者,语气专业但亲切,突出”省时间”这个卖点,避免用”颠覆””赋能”这类空话」
原则 3:给它一个例子(few-shot)
与其解释半天,不如直接给个样例,AI 的模仿能力远强于理解抽象规则的能力。
- ❌ 差:「把这些句子改得更有感染力」
- ✅ 好:「把这些句子改得更有感染力。参考这个改写:原文”这个工具好用”→ 改为”这个工具省了我每天至少 1 小时”。请按同样的方式改写下面 5 句:……」
原则 4:让它一步步思考(拆步骤)
复杂任务别让 AI 一步到位,让它先规划再执行,准确率会明显提升。
- ❌ 差:「帮我分析这份财报,给出投资建议」
- ✅ 好:「请分三步完成:第一步,列出这份财报的核心数据;第二步,指出三个值得关注的异常点;第三步,基于前两步给出保守的建议。每步单独输出。」
原则 5:限定输出格式
告诉 AI 你要什么格式——表格、列表、JSON、还是分段的文字,它就会照着来。
- ❌ 差:「对比一下 iPhone 和安卓手机」
- ✅ 好:「用 Markdown 表格对比,列:维度 / iPhone / 安卓 / 谁更适合。维度至少包含:系统流畅度、应用生态、自由度、价格。」
原则 6:用反例纠错(告诉它「别做什么」)
除了说要什么,也告诉它不要什么,能有效规避 AI 的老毛病(套话、空话、编造)。
- ❌ 差:「写一份周报」
- ✅ 好:「写一份周报,直接列结果和风险,不要写”在领导的正确指导下”这类套话,不要编造没发生的数据。」
原则 7:一次写不好就继续改(迭代)
提示词不是一次写对的,是「聊」出来的。第一版不满意,就接着追问:换种语气、再具体一点、换个角度。
- 第一版:「写个开头」→ 不满意
- 追问:「太正式了,改成朋友聊天那种语气,短句多一点」
Prompt Engineering 20 个可直接复制的模板
写作类
- 写标题:「你是资深自媒体编辑,为下面这篇关于 [主题] 的文章写 5 个标题,要求:长度 20 字以内、有数字或反差、不标题党。」
- 改语气:「把下面这段话改得更口语化,像朋友聊天,少用长句和书面词。」
- 扩写:「围绕 [观点] 扩写成 300 字,补充一个具体例子和一组数据。」
翻译类 4. 「把下面内容翻译成英文,保持原文语气,专业术语用行业通用译法,不确定的词用括号标注原文。」
总结类 5. 「把下面这篇 2000 字的文章浓缩成 3 个要点,每个要点不超过 30 字。」 6. 「用”谁、做了什么、结果如何”三句话总结这段内容。」
编程类 7. 「用 Python 写一个函数实现 [功能],加注释,并说明时间复杂度和边界情况。」 8. 「这段代码报错 [错误信息],帮我分析可能的原因,并给出修复方案,先解释再给代码。」
办公类 9. 「把下面的会议记录整理成:结论、待办(带负责人和截止时间)、风险三项。」 10. 「写一封邮件,主题是 [主题],收件人是客户,语气礼貌但直接,结尾附下一步行动。」
分析类 11. 「分析 [数据/现象],从三个不同角度各给一个观点,并说明依据。」 12. 「这个方案有什么漏洞?列出 3 个潜在风险,按严重程度排序。」
创意类 13. 「给我 10 个关于 [主题] 的选题,要求角度新颖、有搜索量、避开老生常谈。」 14. 「用 3 种不同风格(幽默 / 严肃 / 煽情)各写一段 50 字的 [场景] 文案。」
学习类 15. 「用费曼学习法,把 [概念] 讲给一个完全不懂的人听,200 字以内,举一个生活化的例子。」 16. 「我最近在学 [领域],给我一个 4 周的学习计划,每周聚焦一个主题,附练习。」
决策类 17. 「我在纠结 [选项A] 和 [选项B],帮我列一个决策表:维度 / A / B / 结论,至少 5 个维度。」 18. 「站在 [身份] 的角度,这个决定有什么风险?如果我预算只有 [X],你会怎么选?」
自我修正类 19. 「检查下面这段话有没有逻辑问题、事实错误和废话,逐条指出并给出修改建议。」 20. 「我写的这个 [内容] 太啰嗦了,帮我把字数砍到一半,保留核心信息。」
写在最后:Prompt Engineering 总结
提示词工程没有玄学,本质就是:把话说清楚、给足上下文、用例子示范、再反复迭代。你不必背任何”万能公式”,记住这 7 个原则,每次写提示词前扫一眼,输出质量就会稳定提升。
想进一步了解具体模型怎么选,可以看我这篇 ChatGPT 实测、Claude 实测 和 DeepSeek 实测,三家的提示词响应习惯略有不同。也可以直接用本站的 AI 工具对比器 帮你挑工具。
为了更好的了解Prompt Engineering,同样的这里也把上面的官方网站放在这里:
Prompt Engineering Guide: 7 Principles to Write Better Prompts (+20 Templates)
发布说明:英文版正文,约 1500 词。发布时标题用上面这一行。内链用相对路径(如
[my ChatGPT review](/ai-tools/chatgpt/)),在 WordPress 编辑器里手动加超链接即可。
Why is it that some people get usable output from ChatGPT and Claude on the first try, while others end up editing more than they would have spent writing it themselves? The difference almost always comes down to the prompt.
The model hasn’t gotten better or worse — what changed is the quality of the instructions you give it. In this guide I’ve pulled together the 7 principles I rely on most, each paired with a bad example and a good example, plus 20 templates you can copy and adapt right away. Read through once and your AI output will jump a level.
Why Learn Prompt Engineering?
Prompt engineering is the single highest-leverage skill you can learn right now. The same model, asked well, produces work you can ship; asked badly, it produces generic filler you’ll delete. The 7 principles below are the whole game.
Principle 1: Give the AI a Clear Role
AI models respond well to a persona. Ask it to play a specific expert, and both the knowledge it draws on and its tone will land better.
- ❌ Bad: “Write an article about time management.”
- ✅ Good: “You are an efficiency coach with 10 years of experience. Write an 800-word time-management guide for office workers. Keep the tone practical, not motivational-poster.”
One sentence of role-setting turns output from generic into targeted.
Principle 2: Be Specific — Don’t Make It Guess
A vague instruction produces a vague result. Give it everything you can: audience, length, tone, purpose, style.
- ❌ Bad: “Write a product description.”
- ✅ Good: “Write a 100-word product description targeting independent developers. Tone: professional but warm. Highlight the time-saving benefit. Avoid empty words like ‘revolutionary’ or ’empowering.'”
Principle 3: Show It an Example (Few-Shot)
Explaining abstract rules is slow. Giving one concrete example is fast — models imitate far better than they follow instructions.
- ❌ Bad: “Make these sentences more compelling.”
- ✅ Good: “Rewrite these sentences to be more compelling. Here’s the style to follow — before: ‘This tool is useful.’ after: ‘This tool saves me at least an hour every day.’ Now rewrite the following 5 sentences the same way: …”
Principle 4: Ask It to Think Step by Step
For complex tasks, don’t let the AI jump straight to an answer. Ask it to plan first, then execute — accuracy improves noticeably.
- ❌ Bad: “Analyze this financial report and give me investment advice.”
- ✅ Good: “Do this in three steps. Step 1: list the key figures from this report. Step 2: point out three notable anomalies. Step 3: based on the first two, give a conservative recommendation. Output each step separately.”
Principle 5: Specify the Output Format
Tell the AI what format you want — a table, a list, JSON, or plain prose — and it will follow.
- ❌ Bad: “Compare iPhone and Android.”
- ✅ Good: “Compare them in a Markdown table with these columns: Dimension / iPhone / Android / Which is better. Include at least these dimensions: system fluidity, app ecosystem, freedom, and price.”
Principle 6: Tell It What NOT to Do
Alongside what you want, state what you don’t want. This reliably avoids the AI’s worst habits — clichés, filler, and fabrication.
- ❌ Bad: “Write a weekly report.”
- ✅ Good: “Write a weekly report that lists results and risks directly. No phrases like ‘under the correct leadership of…’ and don’t invent data that didn’t happen.”
Principle 7: Iterate — Keep Refining
A prompt is rarely perfect on the first try. It’s a conversation: if the first version isn’t right, keep asking — change the tone, be more specific, try another angle.
- First attempt: “Write an opening.” → Not happy with it.
- Follow-up: “Too formal. Make it sound like a friend chatting, with shorter sentences.”
20 Copy-Paste Templates
Writing
- Titles: “You are a senior editor. Write 5 headlines for an article about [topic]. Requirements: under 20 words, includes a number or contrast, no clickbait.”
- Change tone: “Rewrite the following to sound more conversational, like a friend talking. Use fewer long sentences and fewer formal words.”
- Expand: “Expand on [idea] into 300 words. Add one concrete example and one data point.”
Translation 4. “Translate the following into English. Keep the original tone. Use standard industry terms for jargon, and mark any uncertain word with its original in parentheses.”
Summarizing 5. “Condense this 2000-word article into 3 key points, each under 30 words.” 6. “Summarize this in three sentences using the who/what/result structure.”
Coding 7. “Write a Python function that does [task]. Add comments, and explain its time complexity and edge cases.” 8. “This code throws [error message]. Analyze the likely cause and give a fix. Explain first, then show the code.”
Office work 9. “Organize the following meeting notes into three sections: Conclusions, Action items (with owner and deadline), and Risks.” 10. “Write an email. Subject: [topic]. Recipient: a client. Tone: polite but direct. End with the next step.”
Analysis 11. “Analyze [data/phenomenon] from three different angles, giving one viewpoint and its basis for each.” 12. “What are the flaws in this plan? List 3 potential risks, ordered by severity.”
Creative 13. “Give me 10 topic ideas about [subject]. Requirements: fresh angle, searchable, avoid clichés.” 14. “Write a 50-word piece of copy for [scene] in 3 different styles: humorous, serious, emotional.”
Learning 15. “Using the Feynman technique, explain [concept] to a complete beginner in under 200 words, with one everyday example.” 16. “I’m learning [field]. Give me a 4-week study plan, one theme per week, with practice exercises.”
Decision-making 17. “I’m torn between [option A] and [option B]. Build a decision table with columns: Dimension / A / B / Verdict. At least 5 dimensions.” 18. “From the perspective of [identity], what are the risks of this decision? If my budget is only [X], which would you choose?”
Self-correction 19. “Check the following text for logic errors, factual mistakes, and fluff. Point each one out and give a fix.” 20. “What I wrote is too wordy. Cut it to half the length while keeping the core message.”
Prompt Engineering Summary
There’s no mystery to prompt engineering. It comes down to four things: say it clearly, give enough context, show examples, and iterate. You don’t need to memorize any “magic formula” — just glance at these 7 principles before you write a prompt, and your output quality will improve steadily.
If you want to dig into which model to choose, check out my ChatGPT review, Claude review, and DeepSeek review — each model responds to prompts a little differently. Or use my AI tool comparison tool to pick the right tool for your needs.