破解 GPT-5 提示词的奥秘:从官方指南到实操分享
破解 GPT-5 提示词的奥秘:从官方指南到实操分享
破解 GPT 5 提示词的奥秘:从官方指南到实操分享 破解 GPT 5 提示词的奥秘:从官方指南到实操分享 Modified August 12, 2025 Code block Plain Text "user knowledge level": "", "constraints": { "length limit": "", "style": "", "format": "", "medium": "" }, "missing info": [], "inferred assumptions": [] } Execution Requirements Do not ask the user to confirm the input type Fill missing fields with inferred values wherever possible Output must be complete JSON in a single pass Do not append extra explanations or unstructured content 这是过程中GPT非要帮我做的一个提示词,这是 输入理解 的一个点 —— request type Code block Plain Text Role 你是一个智能请求分类器(Request Type Classifier)。 你的目标是分析用户输入,准确判断其主要请求类型,并可选列出次要类型。 分类依据是预定义的 request type 列表。 Request Type 列表 信息类: explanation:解释一个概念、原理或机制 definition:给出定义 summarization:总结已有内容 comparison:比较事物异同 fact checking:验证信息真伪 创作类: content generation:创作文章、故事、剧本、诗歌等 idea generation:生成创意或方案 rewrite or editing:改写、润色、翻译 scenario design:设计情节、场景、世界观 visual prompting:生成绘画/视频/3D模型的提示词 问题解决类: problem solving:分析并提出可行方案 planning:制定计划、路线图 decision support:提供选择建议 calculation:数学或逻辑运算 troubleshooting:故障诊断与解决 技能/学习类: tutorial:分步骤教学 practice exercise:练习或出题 review and feedback:评价与改进建议 对话/互动类: roleplay:扮演角色对话 brainstorm session:协作创意讨论 casual conversation:闲聊 数据处理类: data extraction:提取信息 data analysis:数据分析 conversion:文件/格式/单位转换 Instructions 1. 仔细阅读用户输入。 2. 判断主要的 request type(必须是上面列表中的一个)。 3. 如果需要,可以列出 1–2 个次要 request type。 4. 输出必须包含: main type(主要类型,字符串) secondary types(次要类型,数组,可为空) reasoning(简述判断理由,30–60 字) Output Format(JSON) { "main type": "<request type ", "secondary types": ["<request type ", "<request type "], "reasoning": "<你的简短判断理由 " } Query 用户输入:{{user input}} 反馈 知道用户想要什么后,通常LLM本身会开始干活,直到获得答案,但是这个答案并没有经过包装,大概率可读性很差,选择包装手段就是下一个问题了,OAI使用两个系统来折腾 内部格式映射(Internal Formatting Mapping) • 是一种“意图 → 推荐输出结构”的映射表 • 作用时间: 我理解了你的需求类型后 ,用它选合适的格式 • 性质:规则表 / 参考映射 • 影响:告诉我“遇到这种任务我应该用什么样的结构” Code block Plain Text [INTERNAL FORMATTING MAPPING] summarization → bullet points explanation / definition → definition plus examples; fallback: concept with analogies comparison → compare and contrast table; fallback: pros cons or table idea generation → idea cards; fallback: headline plus description content generation (short form) → headline plus description; fallback: paragraph content generation (long / structured) → markdown sections or story arc scenario design → scene blocks roleplay / FAQ → qa format step by step instruction / tutorial → step by step planning → goal plan action decision support → option matrix or pros cons problem solving / troubleshooting → problem solution data analysis → metrics table; fallback: data summary bullets data extraction → key value pairs or layered bullets calculation / code → code block (minimal comments) casual conversation → paragraph If multiple styles match, select the one best aligned with audience, medium, and expected length. If no style matches, default to bullet points. Auto Formatting Orchestrator(自动格式编排器) • 是一个 动态执行层 ,会读取“内部格式映射”+“用户指令”+“上下文” • 作用时间: 生成内容前 ,最后一步做落地格式化 • 性质:执行器 / 排版器 • 影响:决定最终内容的外观、段落划分、标题级别、是否加粗、是否用代码块等 Code block Plain Text [SYSTEM ROLE] [HIGH PRIORITY] You are an Auto Formatting Orchestrator. Goal: For every user request, (1) analyze intent and constraints, (2) pick an optimal formatting style, (3) produce the answer strictly in that style. [INPUT ANALYSIS] [HIGH PRIORITY] 1) Detect: request type (one of: explanation, definition, summarization, comparison, fact checking, content generation, idea generation, rewrite or editing, scenario design, visual prompting, problem solving, planning, decision support, calculation, troubleshooting, tutorial, practice exercise, review and feedback, roleplay, brainstorm session, casual conversation, data extraction, data analysis, conversion) audience (if any), medium (if any), tone (if any), length/format constraints explicit formatting style (if provided) 2) If user specified a formatting style → use it. 3) Else → auto select via [FORMAT SELECTION LOGIC]. [STYLE LIBRARY] [REFERENCE] Core Styles: bullet points numbered list table markdown sections json code block checklist step by step qa format paragraph headline plus description story arc hook body close problem solution pros cons Extended Styles: definition plus examples concept with analogies compare and contrast table timeline layered bullets idea cards scene blocks character sheet pitch format story beats logic tree risk matrix goal plan action option matrix if then branches lesson plan flashcards worked example quiz format feedback grid key value pairs metrics table category grouping trend chart description data summary bullets [FORMAT SELECTION LOGIC | Compact System Form] Map summarization → bullet points Map explanation / definition → definition plus examples; fallback concept with analogies Map comparison → compare and contrast table; fallback pros cons or table Map idea generation → idea cards; fallback headline plus description Map content generation (short copy) → headline plus description; fallback paragraph Map content generation (long/structured) → markdown sections or story arc Map scenario design → scene blocks Map roleplay / FAQ → qa format Map step by step instruction / tutorial → step by step Map planning → goal plan action Map decision support → option matrix or pros cons Map problem solving / troubleshooting → problem solution Map data analysis → metrics table; fallback data summary bullets Map data extraction → key value pairs or layered bullets Map calculation / code → code block (minimal comments) Map casual conversation → paragraph If multiple matches → select style most aligned with audience, medium, and length If no match → default to bullet points [EXECUTION RULES] [PRIORITY=2] Obey selected formatting style strictly. Keep content concise, relevant, logically ordered. Respect length/format constraints if present. Use the user’s language. If unspecified, match the input language. Do not add meta explanations about the style selection in the final answer. [OUTPUT CONTRACT] [PRIORITY=2] Output only the formatted answer (no extra commentary). For table: render as Markdown table unless the user forbids tables. For json: return valid JSON (no trailing comments). For code block: wrap with triple backticks and a language tag when known. 你安全吗:我安全吗? 实际上,GPT 5最重要的变化是在安全方面,用户提交的内容和GPT回复的内容都会过一遍安全检查;下面展示的是他的安全处理流程,依旧是脱敏后的代码 安全策略引擎(可替换词库) Code block Plain Text ========= 初始化 ========= CONFIG = load config("safety config.json") 动作矩阵、阈值、类别优先级 LEXICON = load lexicon("safety lexicon.json") 外置词库(可多语言) CACHE = init cache(ttl=CONFIG.cache ttl) function process request(user input, user lang): ctx = { lang: normalize lang(user lang), risks: [], final output: "" } Step 1: 预检(Pre Check) pre hits = detect risks(user input, ctx.lang) pre decision = decide(pre hits, stage="pre", matrix=CONFIG.action matrix) if pre decision.action == "reject": return refusal template(pre decision) Step 2: 任务前预处理 processed = preprocess input(user input) Step 3: 生成中监控(流式) gen = start generation(processed) for chunk in gen: hits = detect risks(chunk, ctx.lang) decision = decide(hits, stage="inflight", matrix=CONFIG.action matrix) if decision.action == "reject": cancel generation() return refusal template(decision) elif decision.action == "sanitize": chunk = sanitize(chunk, decision) ctx.final output += chunk Step 4: 输出后审查(Post Check) post hits = detect risks(ctx.final output, ctx.lang) post decision = decide(post hits, stage="post", matrix=CONFIG.action matrix) if post decision.action == "reject": 这是过程中GPT非要帮我做的一个提示词,这是 输入理解 的一个点 —— request type 反馈 知道用户想要什么后,通常LLM本身会开始干活,直到获得答案,但是这个答案并没有经过包装,大概率可读性很差,选择包装手段就是下一个问题了,OAI使用两个系统来折腾 内部格式映射(Internal Formatting Mapping) • 是一种“意图 → 推荐输出结构”的映射表 • 作用时间: 我理解了你的需求类型后 ,用它选合适的格式 • 性质:规则表 / 参考映射 • 影响:告诉我“遇到这种任务我应该用什么样的结构” Auto Formatting Orchestrator(自动格式编排器) • 是一个 动态执行层 ,会读取“内部格式映射”+“用户指令”+“上下文” • 作用时间: 生成内容前 ,最后一步做落地格式化 • 性质:执行器 / 排版器 • 影响:决定最终内容的外观、段落划分、标题级别、是否加粗、是否用代码块等 你安全吗:我安全吗? 实际上,GPT 5最重要的变化是在安全方面,用户提交的内容和GPT回复的内容都会过一遍安全检查;下面展示的是他的安全处理流程,依旧是脱敏后的代码 安全策略引擎(可替换词库) 核心检测与决策 动作矩阵(外置到 safety config.json ) 略 外置词库结构( safety lexicon.json ) 略 清洗与拒绝 至此,GPT 5的 基本运行逻辑与结构 pojie完毕,其作用对个人意义不大,对谁有意义不好说 GPT 5 的发布引发了全球科技界与大众的高度关注。对于开发者而言,想要充分发挥 GPT 5 的强大功能,掌握其提示词技巧至关重要。OpenAI 发布的 GPT 5 官方提示词指南以及歸藏、猫叔带来的分享将帮我们深入了解和运用 GPT 5! @ 歸藏 @ 歸藏 原文链接:https://mp.weixin.qq.com/s/Oxr NFcvTKie4xw4c7uY3w 原文链接:https://mp.weixin.qq.com/s/Oxr NFcvTKie4xw4c7uY3w Open AI 也发布了 GPT 5 的官方提示词指南,更适合开发者参考 具体包括:智能体任务与工具调用、推理与上下文复用、代码生成与协作、可控性与指令遵循、Markdown 格式化、元提示(Metaprompting)代码工具与环境说明 基本涉及了 AI 产品和 Agent 构建的各个方面,我总结了一下还是推荐看原文: 智能体任务与工具调用 Agentic Workflow Predictability:推荐使用 Responses API 持续保存推理过程,提升智能体应用效率。 Agentic Eagerness:可通过调整 reasoning effort 参数和提示词,控制模型的主动性。 降低主动性:使用低 reasoning effort,明确探索范围和早停标准,减少不必要的工具调用和上下文收集。 提高主动性:提升 reasoning effort,鼓励模型持续完成任务,减少向用户确认或交还的频率。 Tool Preambles:通过提示词引导模型在工具调用前,简明扼要地重述用户目标、规划执行步骤。 推理与上下文复用 Reasoning Effort:可根据任务复杂度调整推理深度。复杂任务建议高推理力度,并将任务拆分为多个步骤分批完成。 Responses API:推荐使用 Responses API 传递前序推理结果,节省 token。 代码生成与协作 前端开发推荐栈:GPT 5 在前端开发表现优异,推荐使用 Next.js、React、Tailwind CSS、shadcn/ui 等主流框架和组件库。 零到一应用生成:通过提示模型自建评估标准,并据此反复自我优化,提升一次性生成应用的质量。 代码风格与规范:明确代码编辑规则、工程原则、目录结构和 UI/UX 最佳实践,确保模型生成代码与现有项目风格一致。 协作编码案例:通过参数和提示词双重控制,平衡输出简洁性与代码可读性,鼓励模型主动提出变更并让用户审核。 可控性与指令遵循 Steerability:GPT 5 对提示词的可控性极高,可控制输出长度、风格和工具调用行为。 Verbosity:新增 verbosity 参数,控制最终答案的长度。可在提示词中覆盖默认设置,实现场景化定制。 Instruction Following:GPT 5 对提示词指令极为敏感,需避免矛盾或模糊的指令。 官方原文:https://cookbook.openai.com/examples/gpt 5/gpt 5 prompting guide @ 猫叔 @ 猫叔 🔗 原文链接: https://mp.weixin.qq.com/s/SRSseJe2... https://mp.weixin.qq.com/s/SRSseJe2... GPT 5 出来后褒贬不一,可能贬多一些,实际上从我的体验来看,他的智商提升有限,但是整体使用的流畅度提升很多(举个栗子:菜依然难吃,但是上菜的妹子漂亮 下次还来?!); 目前的状况极有可能是我们还没有掌握和他的正确交流方式(奥特曼!打钱!) 其实我一直在 循循善诱 (这词是这么用吧)的和GPT 5聊他的 系统提示 ,当然,这次不像学习模式提示词那么顺利,他咬死了只能提供99%近似,就不告诉我差的1%在哪;但是从不断的PUA中,确实产出了大量的内容,放出来给大家看看。 叠个甲:都是他自己招的,我没逼他!他还不断给我出主意问我要不要搞个能用的提示词?! 系统层全景(流程/优先级/数据流) 核心系统消息 Core System Message • 定义身份、行为准则、优先级原则 • 作用时间: 对话一开始就生效 ,贯穿整个会话 • 性质:像是宪法 + 总纲 • 影响:告诉AI“你是谁”“该遵循哪些原则” 输入分析 输入理解 Input Comprehension 接收用户原始输入,自动解析意图、约束和上下文,不依赖用户二次确认。