常用提示词(Prompt)框架手册
一份可以随时翻查的提示词框架速查手册。覆盖 13 个主流框架 + 4 类推理技术 + 5 类内容构建技巧,每个框架都给出含义表 → 模板 → 实例 → 适用场景。
适用模型:GPT-4/5、Claude、Gemini、Qwen、DeepSeek、GLM 等主流大模型。
所有模板统一采用 # Role: 结构化标题写法(见前置:写法约定)。
30 秒速览(赶时间只看这里)
如果不想读完整篇,记住这"四板斧"就能覆盖绝大多数场景:
再加一条保命字段:
# Output Rules:
1. 信息不足时先向我提问,不要猜测。
2. 使用简体中文回答。
前置:写法约定
本手册所有模板都用 # Role: 这种结构化标题,而不是"你是[角色]。请帮我[任务]。"这种自然语言行文。原因如下。
两种写法对比
❌ 自然语言行文
你是资深新媒体编辑。请帮我一篇关于早睡早起的健康科普文章写 5 个
吸引人的标题,以编号列表输出,每个不超过 20 字。
✅ 结构化标题
# Role: 资深新媒体编辑
# Task: 为一篇关于「早睡早起」的健康科普文章写 5 个吸引人的标题
# Format: 编号列表;每个标题不超过 20 字;不要用震惊体
为什么结构化标题更靠谱
三条使用规范
① 标签用英文,内容用中文(英文标签的模式在训练数据里密度最高)
✅ # Role: 资深文案编辑
② 结构位一律半角冒号、半角括号
✅ # Role: 资深文案编辑
❌ # 角色:资深文案编辑 (全角冒号,模板引擎常出错)
③ 层级统一,不要在同一层混用中英
✅ # Role: / # Task: / # Format:
❌ # Role: / # 任务: / # 输出格式:
💡 一句话:# Role: 相当于给提示词加了"字段名"。字段名越清晰,AI 填错格子的概率越低。
目录
一、框架的本质:四个必答问题
提示词框架是把一句话需求拆成若干固定"槽位"的结构化模板。看似五花八门,本质上都在回答四个问题:
┌──────────────────────────────────────────────┐
│ ① 谁在说? → # Role 角色 / 专业视角 │
│ ② 说什么? → # Task 任务 / 目标 / 材料 │
│ ③ 有什么限制? → # Constraints 受众/禁忌/边界 │
│ ④ 怎么交付? → # Format 格式/字数/结构/示例│
└──────────────────────────────────────────────┘
框架之间的差别,只是从这四层里挑几层、按什么顺序排。理解这一点,你就不用背框架了——忘了名字也能自己拼一个。
为什么值得用框架?
💡 一句话理解:框架 = 提示词的"格式合同",明确要什么、怎么给、不要什么。
二、入门级框架(3 要素)
三要素框架的共同特点:30 秒能写完,覆盖 80% 日常需求。
1. RTF 框架 · 最简可用
Role – Task – Format | 来源:社区通用,OpenAI 课程推广
模板
# Role: [AI 的身份,越具体越好]
# Task: [要完成的具体任务]
# Format: [输出形式 + 硬性限制]
实例
# Role: 资深新媒体编辑,擅长写健康科普类标题,反感标题党
# Task: 为一篇关于「早睡早起」的健康科普文章写 5 个标题
# Format:
- 编号列表,一行一个
- 每个标题不超过 20 字
- 不用"震惊""必看""医生都惊了"这类词
适用:日常问答、写文案、写邮件、翻译润色。不适:需要精细风格控制的正式内容。
2. TAG 框架 · 执行导向
Task – Action – Goal | 来源:任务管理视角
模板
# Task: [要做什么]
# Action: [分几步做,每步做什么]
# Goal: [验收标准,越可量化越好]
实例
# Task: 分析这份季度销售数据
# Action:
1. 先看整体趋势(同比、环比)
2. 再按产品线拆解,找出增长和下滑的具体贡献项
3. 最后归因:是价格、渠道还是产品本身的问题
# Goal: 一页报告,明确指出下季度应该重点投入的 2 个方向
适用:数据分析、项目规划、给 AI 布置多步骤工作。特点:天然带"验收标准",适合交给别人复用。
3. APE 框架 · 目的驱动
Action – Purpose – Expectation | 来源:社区通用
模板
# Action: [做什么]
# Purpose: [为什么做、用在哪、给谁用]
# Expectation: [输出样式、长度、质量要求]
实例
# Action: 把这段产品介绍翻译成英文
# Purpose: 投放到海外社交媒体,面向 18-28 岁年轻用户
# Expectation:
- 口语化、有感染力
- 不超过 100 词
- 可直接发布,不需要我二次润色
适用:翻译、改写、摘要——只要 AI 知道"拿去干什么",它就能自动匹配语气和用词。
4. PAR 框架 · 叙事结构
Problem – Action – Result | 来源:咨询行业通用叙事结构
模板
# Problem: [现状与痛点]
# Action: [我做/要做什么]
# Result: [希望呈现成什么样]
实例
# Problem: 我的简历项目描述太流水账,投了 30 份没有面试机会
# Action: 用"动词开头 + 量化结果"的原则重写下面 3 条经历
# Result:
- 每条不超过 2 行
- 突出业务影响(省了多少成本 / 提了多少效率),不写日常职责
- 保留原有事实,不要编造数据
# Input:
"""
(粘贴简历项目部分)
"""
适用:简历润色、案例包装、项目复盘、述职汇报。
三、进阶级框架(4-6 要素)
要素越多,控制力越强,但写起来越累。按需取用,不要为了完整而完整。
1. ICIO 框架 · 材料处理
Instruction – Context – Input – Output
模板
# Instruction: [要 AI 做什么]
# Context: [材料来源、用途]
# Input:
"""
[原始材料]
"""
# Output: [输出结构]
实例
# Instruction: 提取以下会议记录中的待办事项
# Context: 这是一次产品周会记录,参会者有开发、设计、运营三方
# Input:
"""
(粘贴会议记录全文)
"""
# Output: Markdown 表格,列名为「事项 / 负责人 / 截止时间 / 优先级」
# Output Rules: 找不到负责人的事项标"待认领",不要自行补全
适用:信息提取、内容整理、翻译、任何"有原始材料要处理"的任务。
⚠️ 关键:# Input: 下的材料必须用分隔符(""" 或 XML 标签)包起来,否则 AI 可能把材料里的句子当成指令执行。
2. RACE 框架 · 快速结构化
Role – Action – Context – Expectation
模板
# Role: [身份]
# Action: [任务]
# Context: [背景]
# Expectation: [输出要求]
实例
# Role: 半导体行业分析师
# Action: 对比中芯国际与台积电在先进制程上的差距
# Context: 写给公司内部技术战略会参考,读者有基本行业认知
# Expectation:
- 不超过 800 字
- 结论先行,先给判断再给依据
- 附 3 条关键数据的来源方向(我要自己核一遍)
适用:行业分析、专业问答——比 RTF 多一层背景,比 CO-STAR 少一层啰嗦,是专业问答的性价比之选。
3. CARE 框架 · 示例驱动
Context – Action – Result – Example
模板
# Context: [背景]
# Action: [任务]
# Result: [期望产出]
# Example: [一段样例文本]
实例
# Context: 我在准备硕士复试的英文自我介绍,目标是计算机方向
# Action: 帮我写一份自我介绍初稿
# Result:
- 口语化,不要书面语
- 1 分钟左右(约 150 词)
- 突出项目经历,弱化课程成绩
# Example:
"""
Good morning, professors. My name is ___, and my passion for
machine learning began when I first built a recommendation
system for my dorm's book-sharing shelf...
"""
适用:写初稿、模仿文风。# Example: 是它全部价值所在——给样例永远比给形容词有效。
4. CO-STAR 框架 ⭐ 结构最完整
Context – Objective – Style – Tone – Audience – Response 来源:新加坡 GovTech 的 Sheila Teo,2023 年 GPT-4 提示工程大赛冠军方案
模板
# Context:
[背景信息、使用场景、相关材料]
# Objective:
[要完成的具体任务]
# Style:
[模仿什么写作风格、句式特征]
# Tone:
[什么情感态度]
# Audience:
[给谁看、对方水平、在意的点]
# Response:
[输出形式与硬性限制]
实例
# Context:
我是一家 SaaS 公司的产品经理,公司刚上线一款面向中小企业的项目
管理工具。现在需要给「已注册但未付费」的试用用户发一封转化邮件。
# Objective:
写一封转化邮件,突出"比竞品便宜 30% 且上手更快"的卖点,
引导用户完成首次付费。
# Style:
参考 Mailchimp 营销邮件:短句为主、有数据支撑、结尾有明确行动号召。
# Tone:
专业但友好,不要过度推销的油腻感。
# Audience:
中小企业主,30-45 岁,不懂技术,关心成本和效率,时间宝贵,
对"限时优惠"已有免疫力。
# Response:
- 邮件正文不超过 200 字
- 给出 2 个备选主题行
- 结尾用加粗标注行动按钮文案
为什么它最强:# Style: 和 # Audience: 是大多数框架缺失的两层,而它们恰恰决定了输出的"味道"。同样一段产品介绍,写给 CTO 和写给宝妈,是两个完全不同的文本。
适用:营销文案、商务邮件、正式报告、任何面向特定人群的内容创作。
5. CRISPE 框架 · 多方案实验
Capacity – Insight – Statement – Personality – Experiment
模板
# Capacity: [专家身份]
# Insight: [我掌握的关键事实与判断]
# Statement: [具体任务]
# Personality: [风格态度]
# Experiment: [给几个方案、怎么评估]
实例
# Capacity: 有 10 年经验的用户体验研究员
# Insight: 我们 App 的 30 日留存只有 8%,但次日留存有 45%,
说明用户不是不留存,而是中期流失,问题在 7-30 天的体验断档
# Statement: 分析可能导致 7-30 天流失的 5 个原因
# Personality: 犀利直接,不要客套铺垫,先给最可能的原因
# Experiment: 每个原因配 1 个低成本验证方案(一周内可跑完),
标注验证成本和预期信号,方便我挑 2 个先做
适用:专业咨询、深度诊断、需要"多方案对比"的决策任务。
# Experiment: 是这个框架的灵魂——它逼 AI 从"给一个答案"变成"给一组选项"。
6. RISEN 框架 · 边界明确
Role – Instruction – Steps – End Goal – Narrowing
模板
# Role: [身份]
# Instruction: [任务]
# Steps: [①②③ 分步]
# End Goal: [交付标准]
# Narrowing: [预算/时间/禁忌/上限,逐条列]
实例
# Role: 旅行规划师
# Instruction: 为我规划一次 5 天的成都之旅
# Steps:
1. 先确定每日主题区域(避免来回跑)
2. 再安排上午 / 下午 / 晚上各一项活动
3. 最后给每段行程的交通方式和耗时
# End Goal: 拿到的计划可以直接照着执行,不需要我再查攻略
# Narrowing:
- 总预算 3000 元以内(不含往返大交通)
- 不去需要排队 30 分钟以上的网红店
- 每天步行不超过 15000 步
- 第三天下午必须留空休息
适用:行程规划、项目计划、学习计划——任何"有边界条件"的方案类任务。
⚠️ # Narrowing: 写得越具体,方案越可用。"不要太贵"是废话,"人均 200 以内"才是约束。
7. BROKE 框架 · 迭代演进
Background – Role – Objectives – Key Results – Evolve 来源:借鉴 OKR 目标管理思想的社区框架
模板
# Background: [背景与现状]
# Role: [身份]
# Objectives: [目标]
# Key Results:
- [可量化要求 1]
- [可量化要求 2]
# Evolve: [后续怎么改]
实例
# Background: 要给公司新人写一份入职培训手册,目前只有零散的飞书文档
# Role: 擅长知识管理的企业培训专家
# Objectives: 产出一份结构清晰的入职手册大纲
# Key Results:
- 分 5 章,覆盖制度、工具、流程、文化、常见问题
- 每章列出 3-5 个小节标题 + 一句话说明
- 第 1 章必须在 20 分钟内能读完
# Evolve: 我会逐章给反馈,你只重写我指出的那一章,其余章节保持不变,
不要整篇重排
适用:长文档撰写、系列内容、需要多轮打磨的项目。
# Evolve: 是它区别于其他框架的地方——提前约定好"怎么改",避免每轮都推翻重来。
8. CLEAR 框架 · 含反思机制
Concise – Logical – Emotional – Actionable – Reflective
模板
# Concise: [一句话说清任务]
# Logical: [按什么顺序讲]
# Emotional: [语气与情感分寸]
# Actionable: [要什么可直接执行的东西]
# Reflective: [让 AI 说明它为什么这么做]
实例
# Concise: 帮我把这个产品方案讲给不懂技术的高管听
# Logical: 先说业务价值 → 再说实现方式 → 最后说风险与应对
# Emotional: 语气自信但不浮夸,避免行话,不要用"赋能""闭环"
# Actionable: 给出一个 3 分钟的口头汇报提纲,每点一句话
# Reflective: 提纲后用 3 句话说明你为什么这样安排叙事顺序
适用:向上汇报、跨部门沟通、想让 AI"交作业顺便交思路"的场合。
# Reflective: 让你看见 AI 的思考过程,是排查"为什么它写得不对"的最佳工具。
9. CREATE 框架 · 含排除项
Clarity – Relevant info – End state – Ask – Type – Exclusions
模板
# Clarity: [任务是什么]
# Relevant Info: [卖点/事实/参数]
# End State: [成功后是什么样子]
# Ask: [要几份、要什么]
# Type: [体裁与形式]
# Exclusions: [禁止出现的内容]
实例
# Clarity: 为一款儿童护眼台灯写小红书种草文案
# Relevant Info:
- 卖点:无频闪、自动调光、国 AA 级照度
- 价格:299 元
- 目标人群:3-8 岁孩子的家长
# End State: 文案发出去后,评论区会有家长追问"链接在哪"
# Ask: 写 1 篇正文 + 5 个话题标签
# Type: 小红书笔记体,带 emoji,段落短小,每段 1-2 句
# Exclusions:
- 不使用"最好""第一""国家级"等绝对化用语
- 不贬低竞品,不提具体品牌名
- 不承诺任何治疗效果或视力改善
适用:社交媒体内容、有合规或品牌禁忌的文案。
# Exclusions: 是它最大的价值——"不要写什么"往往比"要写什么"更能纠正 AI 的惯性输出(尤其是广告法禁用词、品牌负面清单)。
四、推理增强技术
这类不是"填空模板",而是改变 AI 思考路径的技术,可与任何框架叠加。
1. Chain of Thought(CoT,思维链)⭐ 最重要的推理技术
原理:要求 AI 把中间推理步骤写出来,而不是直接跳到结论。中间步骤会成为后续生成的"上下文锚点",大幅降低算错、跳步、张冠李戴的概率。
写法一:一句话触发(最省事)
# Output Rules: 请一步一步思考,先列推理步骤,最后单独给出结论。
写法二:写进字段(推荐,和框架合体)
# Role: 财务分析师
# Task: 判断这个项目 3 年内能否回本
# Input:
"""
初始投入 1200 万;预计年营收 400 万,年运营成本 180 万;
第 2 年起营收年增 15%,成本年增 8%。
"""
# Steps:
1. 逐年算出净利润
2. 逐年累计现金流,找出转正年份
3. 检查是否在第 3 年内转正
# Output Rules: 每一步都写清计算过程,不要跳步;结论放在最后
写法三:Few-shot CoT(效果最好)
# Examples:
Q: 小明有 3 个苹果,买了 5 个,吃掉 2 个,还剩几个?
A: 先算总数 3+5=8,再减去吃掉的 2,8-2=6。答案:6。
# Task:
Q: (新问题)
# Output Rules: 按上例的推理格式作答
适用:数学计算、逻辑推理、多步分析、涉及多条件的决策。 不适用:简单事实问答(会让回答变啰嗦,且对事实性没有增益)。
2. Tree of Thoughts(ToT,思维树)
原理:不只走一条推理链,而是先分叉出多条路径,逐条评估,再择优深入。适合没有唯一标准答案的开放难题。
# Role: 零售业战略顾问
# Task: 提升这家线下书店的营收
# Steps:
1. 先提出 3 个完全不同方向的策略(三条思维分支)
2. 为每个策略评估:投入成本、见效速度、失败风险、与我现有资源的匹配度
3. 选出综合最优的 1 个,展开成可执行方案
# Output Rules: 明确说明为什么淘汰另外两个
3. ReAct(Reason + Act,推理与行动结合)
原理:思考 → 行动(检索/调用工具)→ 观察结果 → 再思考 的循环。这是 AI Agent 的底层工作模式,日常对话中体现为:让 AI 先声明计划,再执行,遇到信息缺口时主动反馈而不是硬编。
# Task: 调研三款投影仪哪款最适合卧室使用
# Steps:
1. 先列出需要比较的维度
2. 逐项分析
3. 如果某项信息不足,明确告诉我缺什么,不要猜测
4. 最后给出带理由的推荐结论
# Output Rules: 每一轮信息补充后,重新给出结论而不是从头再来
4. Self-Consistency(自洽性)
原理:让 AI 对同一问题从多个独立角度各解一次,若结论一致则可信度高;若不一致,说明该问题本身有争议或条件不足。
# Task: 评估这个创业想法是否值得执行
# Steps:
1. 从财务可行性角度独立分析
2. 从市场空间角度独立分析
3. 从我个人能力匹配度角度独立分析
# Output Rules:
- 三个角度分开分析,不要互相参考、不要提前下结论
- 最后汇总:如果三个结论互相矛盾,明确指出矛盾点,并说明我需要补什么信息才能判断
适用:重大决策、高风险判断。成本是 3 倍 token,只用在真正重要的问题上。
五、内容构建技术
1. Few-shot(少样本示例)⭐ 最有效的单点提效手段
原理:给 2-3 个"输入 → 输出"样例,让 AI 通过模式匹配来模仿。研究表明,几个高质量样例的效果通常胜过上千字的形容词描述。
# Task: 为下列产品写一句话广告语
# Examples:
- 输入:保温杯 → 输出:把清晨的热度,留到黄昏。
- 输入:台灯 → 输出:亮一盏灯,暖一屋人。
- 输入:雨伞 → 输出:天要下雨,我有准备。
# Input: 加湿器
# Output:
三条铁律
- 样例质量 > 样例数量(3 个精品 > 10 个平庸)
- 格式必须统一(标点、长度、结构一致)
- AI 会复制样例里的毛病——别用带瑕疵的样例凑数
2. 角色扮演(Persona)
原理:指定身份能激活模型在对应领域的知识分布和表达习惯。
❌ # Role: 宇宙最强营销专家
✅ # Role: 快消行业 12 年品牌总监
# Style: 用一句话讲清卖点;少形容词、多具体场景;反感空洞口号
要点:角色的价值不在"头衔"而在**"经验 + 专长 + 表达习惯"**这三项。头衔是身份,后两项才是行为约束。
3. 约束锚定(Constraints)
原理:正面要求(要什么)+ 负面约束(不要什么)分两个字段写,比混在一段里有效得多。
# Requirements:
- 面向零基础读者
- 全文不超过 500 字
- 多用生活化比喻
# Prohibitions:
- 不使用专业术语(必须用时用括号解释)
- 不以"众所周知""随着时代发展"开头
- 感叹号不超过 3 个
4. 分隔符(Delimiters)
原理:把"指令"和"材料"物理隔开,防止 AI 把材料内容误当指令(提示注入的主要防御手段,也是长文档处理稳定性的关键)。
方式一:三重引号
# Input:
"""
(粘贴长文本)
"""
# Task: 总结上述材料的三个核心观点
方式二:XML 标签(Claude 官方推荐,标签用英文)
<material>……</material>
<instruction>……</instruction>
方式三:Markdown 标题
# Background:
# Task:
# Input:
要点:材料越长,越需要分隔符。这是最容易被忽视、但对稳定性提升最明显的技巧。
5. 输出格式化(Output Formatting)
原理:不仅描述格式,还给出骨架让 AI 填充,并禁止额外输出。
# Task: 判断下面这条用户评论的情感倾向并提取关键词
# Input:
"""
充电很快,但是外壳用两周就掉漆了,客服态度还行。
"""
# Output Format: 严格按以下 JSON 输出,不要输出 JSON 以外的任何内容
{
"sentiment": "正面/负面/中性",
"keywords": ["关键词1", "关键词2"],
"summary": "一句话总结,不超过 30 字"
}
六、框架与技术的组合用法
框架负责"信息结构",技术负责"思考方式"和"表达风格"——两者是乘法关系:
基础框架 + 推理技术 + 内容技术 = 生产级提示词
例 1:CO-STAR + CoT + Few-shot
→ 写一份有说服力的商业方案(要受众分析,也要严密论证,还要固定文风)
例 2:ICIO + 分隔符 + Output Format
→ 从长材料里提取结构化信息并生成执行计划
例 3:CRISPE + ToT + Self-Consistency
→ 重大决策的多方案评估(要选项、要多路径、还要交叉验证)
例 4:RTF + CoT
→ 一道数学题的解答(最轻量的组合)
一个可以直接追加到任何提示词末尾的字段:
# Output Rules:
1. 若信息不足,先向我提问,不要猜测。
2. 复杂问题先分步推理,再给结论。
3. 结论先行,其后给理由。
4. 使用简体中文回答。
七、全部框架对比表
字段复用对照(看懂这一张,框架就不用背了):
结论:框架名字不同,字段高度重合。真正决定质量的只有四个:受众、约束、示例、输出格式。
八、选型决策树
你的任务是什么类型?
│
├─ 简单问答 / 小文案 / 写邮件
│ └→ RTF(# Role / # Task / # Format,30 秒写完)
│
├─ 有原始材料要处理(提取 / 总结 / 翻译 / 改写)
│ └→ ICIO + 分隔符(# Input: """...""")
│
├─ 内容创作(文案 / 邮件 / 报告 / 方案)
│ ├─ 面向特定人群 → CO-STAR
│ ├─ 有禁忌或合规要求 → CREATE
│ ├─ 需要多个方案挑 → CRISPE
│ └─ 要模仿某种文风 → CARE 或 + Few-shot
│
├─ 方案规划(旅行 / 项目 / 学习计划)
│ └→ RISEN(# Narrowing: 写具体)
│
├─ 长文档 / 系列内容 / 要反复打磨
│ └→ BROKE(# Evolve: 约定怎么改)
│
├─ 深度推理(数学 / 逻辑 / 复杂决策)
│ └→ 任意框架 + CoT(+ ToT 分叉)
│
├─ 重大决策,不能出错
│ └→ CRISPE + ToT + Self-Consistency
│
└─ 向上汇报 / 需要 AI 解释思路
└→ CLEAR
三条实用判断:
- 任务越"贵",框架越完整。发条朋友圈用 RTF,发给客户的方案用 CO-STAR。
- 不确定就用 RTF + CoT。这个组合能兜住 90% 的情况。
- 框架救不了信息缺失。如果连"给谁看"都说不清,再完整的框架也白搭。
九、语言与格式规范
这一节回答高频疑问:标题到底该写 # Role 还是 # 角色?冒号该用全角还是半角?
结论:英文标签 + 中文内容,是主流且稳妥的做法
但这不是硬性要求,影响远小于"写得清不清楚"。以下是权衡依据。
用英文标签的理由
用中文标签的理由
场景选择表
三个比"语言选择"更实际的技术细节
✅ # Role: 资深文案编辑 ← 半角冒号,规范
❌ # 角色:资深文案编辑 ← 全角冒号,部分解析器/模板引擎会出错
✅ # Role: 资深文案编辑 ← 中英混排很常见,没问题
✅ # 角色: 资深文案编辑 ← 也完全可以
❌ 两种在同一份提示词里混用 ← 最不可取,破坏结构模式
✅ # Role: / # Task: / # Format: ← 全英文,层级一致
❌ # Role: / # 任务: / # 输出格式: ← 同层混用两种语言,最差
关于标点
- 结构性标点用半角::、,、"、()。全角符号(:,""())在代码、JSON、模板变量中容易引发解析错误。
- 正文内容用中文标点:这是阅读体验问题,与机器解析无关。
- Code block 里永远用半角:示例 JSON、变量名、命令必须是 ASCII。
一条铁律
一致性 > 语言选择。 同一份提示词的标题层级要么全英文,要么全中文,混用会打断模型识别到的结构模式。标题用哪种语言,影响通常远小于"受众写没写清、约束量没量化"。
十、通用写作原则
无论用什么框架,以下原则比框架本身更重要:
- 具体胜过抽象
❌ # Style: 写得专业一点 → ✅ # Style: 咨询报告笔调,结论先行,每段不超过 3 行
- 量化一切可量化的
❌ # Format: 简短一些 → ✅ # Format: 不超过 200 字 / 5 条以内 / 3 句话
- 永远写清受众 "给完全不懂技术的人看"和"给 CTO 看"是两个宇宙。
- 示例是终极武器 一份你满意的样稿,胜过所有形容词。
- 说明动机,AI 会自己补全细节 知道"为什么做",它就能推断"应该怎么做"。
- 允许 AI 提问 加一句"信息不足请先问我",能显著减少编造。
- 迭代而非重来 效果不对时,指出"哪个字段不对 + 期望什么",比推翻重写效率高得多。
- 负面清单同样重要
# Prohibitions: 往往比 # Requirements: 更能纠正 AI 的惯性。
- 指令放前面,材料放后面
长材料场景下,先给任务和格式要求,再贴 # Input:。模型对首尾内容更敏感。
- 删掉装饰性文字 "请""麻烦""非常感谢"对效果影响
本文由 AI图鉴自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Common prompt (Prompt) framework manual
A prompt framework quick check manual that can be searched at any time. Covers 13 mainstream frameworks + 4 type reasoning techniques + 5 type content construction techniques, each of which gives a meaning table template → example → applicable scene.
Applying models: GPT-4/5, Claude, Gemini, Qwen, DeepSeek, GLM, etc.
All templates are uniform #Role: structured heading (see prefix: agreed).
30 seconds.
If you don't want to read the whole story, remember that the four axes cover most of the scenes:
Plus a lifeguard field:
# Output Rules:
1. Ask me first if there is a lack of information.
2. Answer in English.
Prefix: Written by Agreement
All the templates in this manual are used #Role: This structured title, not "You are the character." Please help me with this natural language. The reasons are as follows.
Two ways to compare
Natural language formulation
You're a senior new media editor. Please write me a general health article about getting up early.
attractive title, output by numbered list, not exceeding 20 words each.
• Structured title
#Role: Senior new media editor
# Task: Write five attractive titles for a health general article on "Sleep and Rise"
#Format: Numbered list; each title does not exceed 20 words; do not use shock Body
Why does the structured title work better?
Three norms for use
1 Label in English, Chinese (highest density in training data in English label mode)
#Role: Senior Literature Editor
2 Structure bits shall be semi-angled, half-angled
#Role: Senior Literature Editor
# Role: Senior Text Editor
3 Level unity, do not mix Chinese and English on the same level
✅ # Role: / # Task: / # Format:
#Role: / # Task: / # Output format:
One sentence: #Role: The equivalent of adding "field" to prompt. The clearer the name field, the lower the chance that AI will fill the wrong grid.
Contents
I. The essence of the framework: four mandatory questions
The prompt framework is a structured template for breaking a sentence requirement into a number of fixed "trains". Seems to be a lot of things.
┌──────────────────────────────────────────────┐
♪ Role Role / Professional Perspective ♪
# Task Task / Target / Materials
What's the limit?
4 How to deliver? #Format format/ word/ structure/example
└──────────────────────────────────────────────┘
The difference between the frames is just a few layers from these four floors and in what order. To understand that, you don't have to back frame -- forget your name and spell one.
Why is it worth the frame?
One sentence understands: Framework = "format contract" of prompt, specifying what to want, how to give, what not.
II. Introductory framework (3 elements)
Common features of the three-factor framework: 30 seconds to complete, covering 80% of daily needs.
1. RTF framework. Most readily available
Role – Task – Format | Source: Community General, Open AI course promotion
Templates
# Rolle: [AI Identity, as specific as possible]
# Task: [Specific tasks to be accomplished]
# Format: [output form + hard limit]
Examples
# Rolle: Senior new media editor, good at writing generic health titles, anti-headings
# Task: Write five titles for a health general article on "Sleep and Rise"
# Format:
- Numbering list, one in one row.
- No more than 20 words per title
- Don't "shock" or "doctor" or something.
Application: day-to-day questions and answers, writing, mailing, translation. Inappropriate: Need for fine style control of formal content.
2. TAG framework — implementation orientation
Task – Action – Goal| Source: Job Management Perspective
Templates
Task:
Action:
Goal:
Examples
# Task: Analyse the quarterly sales data
# Action:
1. Overall trends (per cent, ring)
2. Dismantling along product lines to identify specific contributions to growth and decline
3. Final attribution: price, channel or product itself
# Goal: One page of the report clearly identifies two directions that should focus on next quarter
Application: Data analysis, project planning, multi-step placement of AI. Feature: Natural belt "acceptance criteria", suitable for reuse.
APE framework — purpose driven
Action –Purpose – Exportation Source: Community Common
Templates
Action:
# Purpose: [Why, where, for whom]
# Exportation: [output style, length, quality requirements]
Examples
# Action: translate this product into English
# Purpose: Putting in social media overseas for young users aged 18-28
# Expectation:
- Oral, contagious.
- Not more than 100 words.
- But straight to publish. I don't have to do it again.
Application: translate, rewrite, summary -- as long as AI knows what to do with it, it automatically matches tone and word.
4. PAR framework — narrative structure
Problem – Action – Research Source: General narrative structure for the consulting industry
Templates
Problem:
Action:
# Result: #
Examples
# Problem: My resume project description was too good for 30 interviews
# Action: Rewrite the following three experiences with the principle of verb beginning + quantization results
# Result:
- No more than two rows each.
- Highlight business impact (how much cost is saved / how much efficiency is raised) and do not write routine duties
- Retain the facts and don't make up the data.
# Input:
"""
(Apostille project component)
"""
Application: résumé colour, case packaging, refilling of projects, debriefing.
III. THE INTEGRATION FRAMEWORK (4-6 Elements)
The more the elements, the more the control, the more the writing gets. Access on demand, not for completeness.
1. ICIO framework. Material processing
Instruction – Context – Input – Output
Templates
Instruation:
#Context: [material source, use]
# Input:
"""
[Original]
"""
# Output: [output structure]
Examples
# Instruation: extract from the following minutes of the meeting pending Item
# Context: It's a product week record.
# Input:
"""
(adhesion of full meeting records)
"""
# Output: Markdown form listed as "Issues / Responsible / Deadline / Priority"
# Output Rules: Unable to find the responsible item mark "to be claimed" and do not complete it yourself
Application: Information extraction, content collation, translation, any "original material to process".
⚠️ Key: #Input: The material below must be wrapped in separator (""or XML label), otherwise AI may use the sentence in the material as a command.
2. RACE Framework • Rapid structured
Role – Action – Context – Expectation
Templates
# Rolle: [identity]
Action:
Context: [background]
# Exportation: [output request]
Examples
#Role: Semiconductor industry analysis Division
# Action: Compare the gap between central core international and the advanced process
#Context: Write to the intra-corporate technology strategy for basic industry awareness
# Expectation:
- Not more than 800 words.
- The conclusions first, then the judgment.
- Source direction of 3 key data attached.
Application: Industry analysis, professional questions and answers - one more layer of background than RTF, one layer less than CO-STAR, is the choice of value for money for professional questions and answers.
CARE Framework — Example Drive
Context – Action – Result – Example
Templates
Context: [background]
Action:
# Result: [Expected output]
#Example: [a sample text]
Examples
# Context: I'm preparing an English introduction to the Master's re-test.
# Action: Write me a first draft of my introduction
# Result:
- Oral, no writing.
- About 1 minute (about 150 words)
- Highlighting project experiences and weakening course achievements
# Example:
"""
Good morning, professors. My name is ___, and my passion for
machine learning began when I first built a recommendation
system for my dorm's book-sharing shelf...
"""
Application: preparation of first drafts, imitation of style. Example: It's all worth it -- giving examples is always more effective than giving adjectives.
4. CO-STAR framework ⭐ most complete structure
Source: Sheila Teo, GovTech, Singapore, 2023 GPT-4.
Templates
# Context:
[Background information, use of scenes, related materials]
# Objective:
[Specific tasks to be accomplished]
# Style:
[Imitation of writing styles, phrases]
# Tone:
[What emotional attitude]
# Audience:
[To whom, each other level, mindful]
# Response:
[Exit form and hard limit]
Examples
# Context:
I'm the product manager of a SaaS company.
Management tools. There is now a need to send a conversion e-mail to the "registered but not paid" pilot users.
# Objective:
Write a conversion e-mail highlighting the "lower 30% and faster" selling point,
Guide users to complete their first paid.
# Style:
See Mailchimp Marketing Mail: short sentences are dominant, supported by data, and clear calls for action at the end.
# Tone:
Professional but friendly, not overmarketed oily.
# Audience:
Small and medium-sized enterprise owners, 30-45 years of age, do not understand technology, care about costs and efficiency, and time is valuable,
We've got immunity for limited-time.
# Response:
- The body of the mail does not exceed 200 words.
- Give 2 alternative themes Okay.
- The text with the rough label action button at the end.
Why it's the strongest: #Style: and #Audience: It's the two layers of most frames that are missing, and they're exactly what they say. The same product introduction, written to CTO and to Mom, is two completely different texts.
Application: marketing papers, business mail, official reports, any content creation for specific groups.
CRISPE Framework — Multi-programmatic Experiment
Capacity – Insight – Statement – Personality – Experiment
Templates
# Capacity: [expertship]
Insight:
# Statement: [Specific mission]
# Personality:
# Evaluation: [several options, how to assess]
Examples
# Capacity: User experience researchers with 10 years of experience
# Insight: Our App's 30-day retention is only 8%, but the next-day retention is 45%.
It means that users are not left behind, but are lost in the medium term.
# Statement: Analyse 5 causes that could cause 7-30 days of loss
# Personality: Directly, not a mat, for the most likely reason
#Experation: Each cause is accompanied by a low-cost certification program (run within a week), which is the only way to get rid of it.
Mark the cost and the expected signal, so I can pick two first.
Application: Professional advice, in-depth diagnosis, decision-making tasks requiring "multi-programme comparison".
It's the soul of this framework -- it forces AI from "Give an answer" to "Give a set of options."
6. RISEN Framework. Boundary clarity
Role – Instruction – Steps – End Goal – Narrowing
Templates
# Rolle: [identity]
Organisation
# Steps: [123 Step]
# End Goal: [Delivery criteria]
# Narrowing: [budget/time/hidden/ceiling, by article]
Examples
# Rowe: Travel planning Division
Instruation: Planning a five-day trip to Chengdu for me
# Steps:
1. Identification of daily thematic areas (avoiding running back and forth)
2. Arrange for another event in the morning/afternoon/night
3. Mode of transport and time-consuming final per leg
# End Goal: The plan can be followed directly, and I don't have to look into it
# Narrowing:
- Within a total budget of US$ 3000 (excluding heavy transport)
- We don't have to line up.
- Not more than 15,000 steps a day.
- The third afternoon must be free.
Application: itinerary planning, project planning, learning plan - any programme type tasks "with border conditions".
# Narrowing: The more specific it is written, the more practical it is. "Don't be too expensive" is bullshit, and "within 200 per capita" is binding.
7. BROKE Framework. Ideas In.
Background – Role – Subjectives – Key Resources – Evolve Source: Community framework based on OKR goal management thinking
Templates
Background:
# Rolle: [identity]
#Objectives: [Target]
# Key Results:
- [Can request quantization 1]
- [Can request quantization]
# Evolve:
Examples
# Background: To write a training manual for company recruits, there are currently only scattered flybook files
#Role: Business training specialists in knowledge management
#Objectives: Output a structured entry manual outline
# Key Results:
- Chapter 5 covering systems, tools, processes, culture, common problems
- Each chapter lists 3-5 sub-headings + a statement
- Chapter 1 must be read in 20 minutes.
# Evolve: I'll give you a chapter-by-chapter feedback, you'll only rephrase the chapter I pointed out, the rest of the chapter will remain unchanged,
Do Not Reorder the Whole
Application: Long document writing, series content, items that require multiple grinding.
# Evolve: It's where it's different from the other frame -- it's agreed in advance "how to change" so that every round doesn't come back.
8. CLEAR Framework — including mechanisms for reflection
Concise – Logical – Emotional – Actionable – Reflective
Templates
Concise:
# Logical:
# Emotional: [Speaks and Emotions]
Actionable:
# Reflective: [ Jean AI #]
Examples
# Concise: Tell me about this product program to the executives who don't know the technology Listen.
# Logical: First of all, business value, then how it's done, and finally, risk and response
# Emotional: Talk self-confidence but not exaggerating, avoid words, don't use "enabling"
# Actionable: Give a three-minute outline of the oral report, every word
# Reflective: After the outline, use three words to explain why you set the narrative order
Application: reporting upwards, cross-sectoral communication, an occasion for AI to "get to work."
# Reflective: The best way to get you to see AI's thinking is to check out why it's not right.
The CREATE framework includes exclusions
Clarity – Relevant info – End state – Ask – Type – Exclusions
Templates
Clarity:
#Relevant Info: [Salepoint/fact/parameters]
End State:
Ask:
# Type: [Advisory and Formatting]
# Exclusions: [Prohibited content]
Examples
# Clarity: Write a REDnote draft for a children's stand lamp Case
# Relevant Info:
- Sell point: non-frequency flash, automatic light, country AA level
- Price: 299 yuan
- Target population: parents of children aged 3-8
# End State: When the case is sent out, parents in the comment area will ask "Where's the link?"
# Ask: Write 1 body + 5 topic labels
# Type: REDnote notes with emoji, short paragraphs, 1-2 sentences per paragraph
# Exclusions:
- Don't use "best" "first" and "national" and so on. Languages
- No demeaning the competition, no specific brand. First Name
- No commitment to any therapeutic effects or improvements in vision
Application: Social media content, compliance or brand taboos.
#Exclusions: It's its greatest value - "Don't write anything" tends to correct AI's inertial output better than "Do what to write" (especially advertising bans, negative brand lists).
IV. ELECTRONIC ADVANCED TECHNOLOGY
These are not "filling templates", but technologies that change the AI thought path, which can be added to any frame.
1. Chain of Thought (Cot, thought chain) The most important reasoning technique
Rationale: AI is required to write the steps of the middle reasoning, not just jump to conclusion. The intermediate step would become the subsequent "context anchor" and significantly lower the probability of miscalculation, leaping and crowning.
Writing I: One sentence triggers (most economical)
# Output Rules: One step at a time, one step at a time, one at a time, and one at a time, one at a time.
Writing II: Write in field (Recommended, and frame combination)
# Rolle: Financial analysis Division
# Task: Judge whether this project will return within 3 years Ben.
# Input:
"""
Initial input of 12 million; projected annual collection of 4 million and annual operating cost of 1.8 million;
Since the beginning of the 2nd year, the income of the battalion increases by 15% annually and the cost increases by 8% annually.
"""
# Steps:
1. Calculation of net profits by year
2. Cumulative annual cash flows, identifying positive years
3. Check for change within 3 years
# Output Rules: Write the calculation at every step and do not jump; conclusions at the end
Writing III: Few-shot COT
# Examples:
Ming has three apples, bought five, ate two, left?
A: First total 3+5 = 8, minus 2,8-2 = 6. Answer: 6.
# Task:
Q: (New issues)
# Output Rules: in the previous reasoning format Answer
Application: Mathematical calculations, logical reasoning, multi-step analysis, multi-conditional decision-making. Not applicable: Questions and answers on simple facts (which make the answer squeaky and do not add to factuality).
2. Tree of Thoughts
Rationale: Not just one chain of reasoning, but multiple paths, one by one, before taking advantage. It suits the open question of not having a single standard answer.
#Role: Strategic Adviser in retail trade
Task: Raise the price of this underline bookshop
# Steps:
1. 3 strategies in completely different directions (three branches of thinking)
2. Assessment for each strategy: cost of inputs, speed of impact, risk of failure, matching my available resources degrees
3. Selection of one of the best integrated programmes
# Output Rules: Make clear why the other two were eliminated
3. React (Reason + Act, combination of reasoning and action)
Principle: Thinking about action (retrieving/calling tools) about observation, thinking about the cycle. This is the bottom working model of AI Agent, which is reflected in the daily conversation by allowing AI to announce the plan, then implement it, and to provide proactive feedback when information gaps are encountered, rather than hard copy.
# Task: Find out which three projectors are the most suitable for bedroom use
# Steps:
1. List the dimensions that need to be compared first
2. Individual analysis
3. Tell me exactly what's missing if there's not enough information.
4. Final and reasoned recommendations
# Output Rules: After each round of information supplements, come back to conclusions instead of starting over
4. Self-Consistency
Rationale: to allow AI to decipher the same issue from multiple independent perspectives, and to be credible if the conclusions are unanimous; if not, to suggest that the issue itself is controversial or inadequate.
Task: Assess whether this idea of entrepreneurship is worth implementing
# Steps:
Independent analysis from the perspective of financial viability
2. Independent analysis from a market space perspective
3. Independent analysis from the perspective of my personal competencies
# Output Rules:
- Three angles, no cross-references, no early conclusions.
- Final summary: if the three conclusions contradict each other, clearly identify the contradictions and indicate what information I need to add to my judgement
Application: Significant decision-making, high-risk judgement. It's three times the cost token, only on really important issues.
Content construction techniques
1. Few-shot (lower example of sample) ⭐ is the most effective single point method of delivery
Principle: give 2-3 input output samples to allow AI to mimic through mode matching. Studies have shown that several high-quality examples are usually more effective than thousands of adjectives.
# Task: Write an ad for the following products Languages
# Examples:
- Enter: Temperature Cup → Output: Save the morning heat until dusk.
- Enter: a lamp, output: a light, warm a house.
- Enter: umbrellas output: the sky is going to rain, I'm ready.
#Input: wetner
# Output:
Three rules.
- Sample quality > sample number (3 fine > 10 mediocre)
- Format must be uniform (points, length, structure consistent)
- AI will replicate the problem in the sample -- don't count with a flawed sample.
2. Role playing (Persona)
Rationale: Identification activates the model ' s knowledge distribution and expression habits in its counterpart areas.
#Role: Best marketing expert in the universe
♪ Role: The closing industry 12 years ago
# Steele: Sold in one sentence; less adjectives, more specific scenes; anti-fault slogans
Points: The value of the role is not in the title but in the ** experience + expertise + expression habits.** The title is identity, and the latter two are binding.
Constraints
Rationale: Positive requirements (what) + negative constraints (what not) are written in two fields, which is much more effective than mixing in one paragraph.
# Requirements:
- Zero basic readers.
- The full text does not exceed 500 words
- Use living metaphors.
# Prohibitions:
- Not using professional terms (must be interpreted in brackets)
- Don't start with the "well known" word.
- No more than three.
4. Delimites
Principle: Physically separate "directive" and "material" to prevent AI from misdirecting material content (the main defensive means of prompting injection is also key to the stability of long document processing).
Mode I: Triple citation
# Input:
"""
(paint long text)
"""
# Task: Summarizing the three core points of the above-mentioned material
Mode II: XML label (Claude official recommendation, label in English)
<material>……</material>
<instruction>……</instruction>
Mode 3: Markdown Title
# Background:
# Task:
# Input:
Points: The longer the material, the more the separator is needed. This is the skills that are the easiest to ignore, but the most visible for stability.
5. Output formatting
Principle: Not only describe the format, but also give the skeleton to allow AI to fill and ban extra output.
# Task: judge the emotional tendencies of this user comment below and extract the key Word
# Input:
"""
The charge was quick, but the shell fell out of paint in two weeks and the attitude of the client was good.
"""
# Output Format: Press strictly the following JSON output and do not output anything other than JSON
{
"sention": "positive/negative/neutral,"
"keywords":
"Summary": "One sentence summation, not more than 30 words."
}
VI. Combined use of frameworks and technologies
The framework is for the "information structure" and the technology for the "thinking" and "expression style"-- - The two are multiplication:
Base frame + reasoning technology + content technology = production level prompt
Example 1: CO-STAR + COT + Few-shot
• Write a compelling business plan (to analyse the audience, to justify it, and to maintain a culture)
Example 2: ICIO + Separator + Outlook Format
• Extract structured information from long materials and generate implementation plans
Example 3: CRISPE + TOT + Self-Consistency
• Multi-programmatic assessment of major decision-making (options, multiple paths, cross-validation)
Example 4: RTF+COT
~ A mathematical answer (most light combination)
One that can be added directly to the end of any prompt:
# Output Rules:
1. If the information is insufficient, ask me first and do not speculate.
2. Complex issues are delineated and concluded.
3. The conclusions followed by justification.
4. Answer in English.
VII. COMPARATION OF ALL FRAMEWORKS
field re-reference (understand this, the frame is not back):
Conclusion: Framework names differ and field overlaps highly. Only four really determine quality: audience, constraints, examples, output formats.
Selective decision tree
What's your type of mission?
│
Ideas - Simple Questions / Small Text / Email
│RTF (#Role / #Task / #Format, 30 seconds completed)
│
Idea - Raw material to process (extract / summation / translation / redraft)
#Input: "...""
│
Ideas - content creation (text / mail / report / scheme)
│ For specific groups of people
Ideas - taboos or compliance requirements
♪ I think it takes a lot of options ♪
│ └ - To mimic some kind of 风 CARE or + Few-shot
│
i - Programme planning (travel/project/learning plan)
│RISEN
│
Ideas - Long Document / Series Contents / To Write
│ BROKE
│
Idea - In-depth reasoning (mathematics/ logic/ complex decision-making)
│ Any frame + COT (+ TOT fork)
│
I miss-- big decisions, no mistakes.
│ └→ CRISPE + ToT + Self-Consistency
│
└ Reporting upward / Need AI to explain the thinking
└→ CLEAR
Three practical judgments:
- The more expensive the mission, the more complete the frame. Sending a circle of friends with RTF and a programme for clients with CO-STAR.
- Use RTF+COT if not sure. This combination can withstand 90% of the situation.
- The frame won't save the missing information. If you don't know who you're looking at, the whole frame is in vain.
IX. Language and format norms
This section answers the high frequency question: "Role or "Role?" Should we use full or half an angle?
Conclusion: English label + Chinese content is the dominant and conservative approach
But it's not mandatory, it's much less than "clearly written." Here is the basis for the trade-off.
Reasons for using English labels
Reasons for using the Chinese label
scene selection table
Three more practical technical details than Language Choice.
#Role: Senior Literature Editor # # Semi-angled, norm
# Role: Senior Text Editor, full-angled, partial solver/team engine error
#Role: Senior editorial editor #
# Roles: Senior author, editor, and complete
The two are mixed in the same prompt.
#Role: / #Task: / #Format: ← All English, level consistent
#Role: / # Task: / # Output format: # Combining two languages with the worst
About Points
- Structural markers with a half angle:,,,,, (). A full-angle symbol (: ")" () is prone to error resolution in code, JSON, template variables.
- The text is marked in Chinese: this is a question of reading experience and has nothing to do with machine analysis.
- Half-angle always in Code block: Example JSON, variable name, command must be ASCII.
An iron.
Consistent > Language Selection. The title level of the same prompt is either in English or in Chinese, and mixing will interrupt the structural pattern identified by the model. In which language the title is written, the impact is usually much smaller than "unwritten audience, unbounded quantization".
X. Principle of Universal Writing
Whatever framework is used, the following principles are more important than the framework itself:
- More specific than abstract.
# Style: Write a little more professionally # Syle: Advisory report tone, conclusions first, not more than 3 rows each
- quantization. Everything. quantization.
#Format: Shorter # Format: not more than 200 words / 5 / 3 words
- Always write the audience "to those who don't know the technology" and "to the CTO" are two universes.
- The example is the ultimate weapon, a copy of which you're satisfied, more than any adjective.
- Explain the motive, AI will fill in the details and know why, and it can infer what to do.
- Allow AI to ask questions and add "I don't have enough information to ask first" to significantly reduce fabrication.
- It's more efficient than overturning rewrite.
- Negative lists are equally important.
#Prohibits: Often better to correct AI inertia than #Requirements:
- Orders in front, materials in the back.
Under the long material scene, the task and format requirements will be followed by a post #Input: The model is more sensitive to the end of the line.
- Delete the decorative text. "Please, please, "Thank you very much for the effect."
Auto-fetched and translated by AI Atlas. All rights belong to the original author.