Phase 1 开放编码 — T1 OpenAI + Google
提取统计
- 文件数:4
- 提取原则数:68
编码表
| 编号 | 原则/洞察 | 来源文件 | 原文摘录 | 初始分类 |
|---|---|---|---|---|
| B001 | 不同模型类型需要不同提示策略:推理模型给高层目标,GPT模型给精确指令 | T1-1-openai-pe-guide | ”A reasoning model is like a senior co-worker. You can give them a goal to achieve and trust them to work out the details. A GPT model is like a junior coworker. They’ll perform best with explicit instructions to create a specific output.” | 通用 |
| B002 | 生产环境应锁定模型快照版本以保证行为一致性 | T1-1-openai-pe-guide | ”Pinning your production applications to specific model snapshots (like gpt-4.1-2025-04-14 for example) to ensure consistent behavior” | 通用 |
| B003 | 构建评估体系来监控提示性能 | T1-1-openai-pe-guide | ”Building evals that measure the behavior of your prompts so you can monitor prompt performance as you iterate, or when you change and upgrade model versions” | 通用 |
| B004 | 使用消息角色层级控制指令优先级:developer > user > assistant | T1-1-openai-pe-guide | ”developer messages are instructions provided by the application developer, prioritized ahead of user messages” | GPT专属 ⚠️ 可能与 Claude 建议不同(Claude 用 system 角色,无 developer/user 优先级区分) |
| B005 | 把 developer 和 user 消息类比为函数定义和参数 | T1-1-openai-pe-guide | ”developer messages provide the system’s rules and business logic, like a function definition. user messages provide inputs and configuration… like arguments to a function.” | GPT专属 |
| B006 | 系统消息推荐四段式结构:Identity → Instructions → Examples → Context | T1-1-openai-pe-guide | ”Identity… Instructions… Examples… Context… This content is usually best positioned near the end of your prompt” | 通用 |
| B007 | 用 Markdown 标题和列表标记提示的不同段落,传达层级关系 | T1-1-openai-pe-guide | ”Markdown headers and lists can be helpful to mark distinct sections of a prompt, and to communicate hierarchy to the model” | 通用 |
| B008 | 用 XML 标签标记内容边界,用 XML 属性添加元数据 | T1-1-openai-pe-guide | ”XML tags can help delineate where one piece of content begins and ends. XML attributes can also be used to define metadata about content in the prompt” | 通用 |
| B009 | 高频复用内容放在提示开头以利用缓存降低成本和延迟 | T1-1-openai-pe-guide | ”keep content that you expect to use over and over in your API requests at the beginning of your prompt… enables you to maximize cost and latency savings from prompt caching” | 通用 |
| B010 | Few-shot 示例应展示多样化的输入范围 | T1-1-openai-pe-guide | ”When providing examples, try to show a diverse range of possible inputs with the desired outputs” | 通用 |
| B011 | Few-shot 示例通常放在 developer message 中 | T1-1-openai-pe-guide | ”Typically, you will provide examples as part of a developer message in your API request” | GPT专属 |
| B012 | 使用 RAG 技术为模型提供私有数据或限定回答范围 | T1-1-openai-pe-guide | ”To give the model access to proprietary data… To constrain the model’s response to a specific set of resources” | 通用 |
| B013 | instructions 参数只作用于当前请求,不会在多轮对话中自动保留 | T1-1-openai-pe-guide | ”the instructions parameter only applies to the current response generation request. If you are managing conversation state with the previous_response_id parameter, the instructions used on previous turns will not be present” | GPT专属 |
| B014 | 用可复用提示模板(含变量占位符)将提示管理与代码解耦 | T1-1-openai-pe-guide | ”Create a reusable prompt in the dashboard with placeholders like {{customer_name}}“ | GPT专属(平台特性) |
| B015 | 提供明确的长度约束:默认3-6句或≤5条要点 | T1-2-gpt52-prompting-guide | ”Default: 3–6 sentences or ≤5 bullets for typical answers” | GPT专属 |
| B016 | 简单是/否问题限制在≤2句 | T1-2-gpt52-prompting-guide | ”For simple yes/no questions: ≤2 sentences” | GPT专属 |
| B017 | 复杂多步任务使用结构化输出:1段概览 + ≤5条标签化要点 | T1-2-gpt52-prompting-guide | ”For complex multi-step tasks: 1 overview paragraph followed by ≤5 tagged bullets (What changed, Where, Risks, Next steps, Open questions)“ | GPT专属 |
| B018 | 不要复述用户请求,除非语义有变化 | T1-2-gpt52-prompting-guide | ”Do not rephrase the user’s request unless it changes semantics” | 通用 |
| B019 | 明确约束范围防止模型扩展超出请求 | T1-2-gpt52-prompting-guide | ”Implement EXACTLY and ONLY what the user requests. No extra features, added components, or UX embellishments” | 通用 |
| B020 | 遇到模糊指令时选择最简单的合理解释 | T1-2-gpt52-prompting-guide | ”When instructions are ambiguous, choose the simplest valid interpretation” | 通用 |
| B021 | 长上下文(>10k tokens)先生成内部大纲再回答 | T1-2-gpt52-prompting-guide | ”First produce a short internal outline of key sections relevant to the user’s request” | GPT专属 |
| B022 | 长上下文中重新声明用户约束条件再回答 | T1-2-gpt52-prompting-guide | ”Re-state the user’s constraints explicitly (jurisdiction, date range, product, team) before answering” | 通用 |
| B023 | 将断言锚定到具体章节而非泛泛而谈 | T1-2-gpt52-prompting-guide | ”Anchor claims to sections rather than speaking generically” | 通用 |
| B024 | 引用或转述关键细节(日期、阈值、条款) | T1-2-gpt52-prompting-guide | ”Quote or paraphrase fine details (dates, thresholds, clauses) when answers depend on them” | 通用 |
| B025 | 模糊问题:明确指出模糊性,问1-3个精确澄清问题或给出2-3种解释 | T1-2-gpt52-prompting-guide | ”Explicitly call this out. Ask up to 1–3 precise clarifying questions, OR Present 2–3 plausible interpretations with clearly labeled assumptions” | 通用 |
| B026 | 不确定时避免编造具体数字、行号或外部引用 | T1-2-gpt52-prompting-guide | ”Never fabricate exact figures, line numbers, or external references when uncertain” | 通用 |
| B027 | 使用”Based on the provided context…”替代绝对断言 | T1-2-gpt52-prompting-guide | ”Use language like ‘Based on the provided context…’ instead of absolute claims” | 通用 |
| B028 | 高风险场景(法律/财务/合规)做自检:重新扫描未声明假设、不实数字、过强措辞 | T1-2-gpt52-prompting-guide | ”Re-scan answers for unstated assumptions. Identify specific numbers or claims not grounded in context. Soften overly strong language (‘always,’ ‘guaranteed,’ etc.)” | 通用 |
| B029 | 长对话使用 compaction 端点压缩上下文 | T1-2-gpt52-prompting-guide | ”GPT-5.2 with Reasoning supports response compaction via the /responses/compact endpoint” | GPT专属(平台特性) |
| B030 | 在主要里程碑后压缩上下文,不是每轮都压缩 | T1-2-gpt52-prompting-guide | ”Compact after major milestones, not every turn” | GPT专属 |
| B031 | 恢复时保持提示功能一致以避免行为漂移 | T1-2-gpt52-prompting-guide | ”Keep prompts functionally identical when resuming to avoid behavior drift” | 通用 |
| B032 | Agent 更新应简短(1-2句),只在新阶段或计划变更时发送 | T1-2-gpt52-prompting-guide | ”Send brief updates (1–2 sentences) only when starting a new major phase or discovering plan-changing information” | 通用 |
| B033 | 避免叙述常规工具调用过程 | T1-2-gpt52-prompting-guide | ”Avoid narrating routine tool calls (‘reading file…’, ‘running tests…’)” | 通用 |
| B034 | 每条更新必须包含至少一个具体结果 | T1-2-gpt52-prompting-guide | ”Each update must include at least one concrete outcome (‘Found X’, ‘Confirmed Y’, ‘Updated Z’)“ | 通用 |
| B035 | 不要扩展任务超出用户请求,将新工作标记为可选 | T1-2-gpt52-prompting-guide | ”Do not expand the task beyond what the user asked; call out new work as optional” | 通用 |
| B036 | 工具描述要简洁:1-2句说明做什么和何时使用 | T1-2-gpt52-prompting-guide | ”Describe tools crisply: 1–2 sentences for what they do and when to use them” | 通用 |
| B037 | 鼓励并行工具调用以降低延迟 | T1-2-gpt52-prompting-guide | ”Encourage parallelism for scanning codebases, vector stores, or multi-entity operations” | 通用 |
| B038 | 高影响操作(订单/计费/基础设施)需要验证步骤 | T1-2-gpt52-prompting-guide | ”Require verification steps for high-impact operations (orders, billing, infra changes)“ | 通用 |
| B039 | 需要新鲜或用户特定数据时优先使用工具而非内部知识 | T1-2-gpt52-prompting-guide | ”Prefer tools over internal knowledge whenever needing fresh or user-specific data” | 通用 |
| B040 | 写操作后简短重述:改了什么、在哪里、做了什么后续验证 | T1-2-gpt52-prompting-guide | ”After any write/update tool call, briefly restate: what changed, where (ID or path), and any follow-up validation performed” | 通用 |
| B041 | 结构化提取必须提供 schema 或 JSON shape | T1-2-gpt52-prompting-guide | ”Always provide a schema or JSON shape for output; use structured outputs for strict schema adherence” | 通用 |
| B042 | 区分必需字段和可选字段 | T1-2-gpt52-prompting-guide | ”Distinguish between required and optional fields” | 通用 |
| B043 | 缺失字段设为 null 而非猜测 | T1-2-gpt52-prompting-guide | ”If a field is not present in the source, set it to null rather than guessing” | 通用 |
| B044 | 返回前重新扫描源数据检查遗漏字段 | T1-2-gpt52-prompting-guide | ”Before returning, quickly re-scan the source for any missed fields and correct omissions” | 通用 |
| B045 | 多文件提取时每个文档单独序列化,附带稳定ID | T1-2-gpt52-prompting-guide | ”Serialize per-document results separately. Include a stable ID (filename, contract title, page range)“ | 场景特定(数据提取) |
| B046 | 模型迁移时先不改提示,只换模型 | T1-2-gpt52-prompting-guide | ”Switch models without changing prompts yet. Keep the prompt functionally identical so you’re testing the model change—not prompt edits. Make one change at a time.” | 通用 |
| B047 | 迁移后显式设置 reasoning_effort 匹配原模型深度 | T1-2-gpt52-prompting-guide | ”Explicitly set GPT-5.2 reasoning_effort to match the prior model’s latency/depth profile” | GPT专属 |
| B048 | 每次小改动后重新跑 eval | T1-2-gpt52-prompting-guide | ”Re-run Evals after each small change. Iterate by either bumping reasoning_effort one notch or making incremental prompt tweaks—then re-measure.” | 通用 |
| B049 | 预先指定研究深度:是否追踪二阶线索、解决矛盾、附带引用 | T1-2-gpt52-prompting-guide | ”Tell the model how to perform search, whether to follow second-order leads, resolve contradictions, and include citations. State explicitly how far to go.” | 通用 |
| B050 | 不确定时覆盖所有可能意图而非问澄清问题 | T1-2-gpt52-prompting-guide | ”Instruct the model to cover all plausible intents comprehensively; don’t ask clarifying questions” | GPT专属 ⚠️ 可能与 Claude 建议不同(Claude 倾向鼓励 ask for clarification) |
| B051 | 预先规定输出结构和语气 | T1-2-gpt52-prompting-guide | ”Set expectations for structure (Markdown, headers, tables), clarity (define acronyms, use concrete examples), and voice (conversational, persona-adaptive)“ | 通用 |
| B052 | 直接开始回答,不要前置寒暄 | T1-2-gpt52-prompting-guide | ”Be direct: Start answering immediately” | 通用 |
| B053 | 做完整性检查:回答每个子部分,包含解释、具体细节和权衡 | T1-2-gpt52-prompting-guide | ”Do a completeness pass: answer every subpart, include explanations and concrete details, include tradeoffs where relevant” | 通用 |
| B054 | 无法完全遵从时先提供能做的,再说明限制 | T1-2-gpt52-prompting-guide | ”Don’t lead with blunt refusal if you can safely provide something helpful. First deliver what you can, then clearly state limitations” | 通用 |
| B055 | Gemini 3 温度必须保持默认 1.0,降低会导致循环或退化 | T1-3a-gemini3-developer-guide | ”For all Gemini 3 models, we strongly recommend keeping the temperature parameter at its default value of 1.0. Changing the temperature (setting it below 1.0) may lead to unexpected behavior, such as looping or degraded performance” | Gemini专属 ⚠️ 可能与 Claude 建议不同(Claude/OpenAI 通常建议低温度获取确定性输出) |
| B056 | Gemini 3 使用动态 thinking level 控制推理深度(minimal/low/medium/high) | T1-3a-gemini3-developer-guide | ”You can use the thinking_level parameter, which controls the maximum depth of the model’s internal reasoning process before it produces a response” | Gemini专属 |
| B057 | 不能同时使用 thinking_level 和旧版 thinking_budget 参数 | T1-3a-gemini3-developer-guide | ”You cannot use both thinking_level and the legacy thinking_budget parameter in the same request. Doing so will return a 400 error.” | Gemini专属 |
| B058 | 根据媒体类型选择合适的分辨率:图片用 high,PDF 用 medium,视频用 low | T1-3a-gemini3-developer-guide | ”Images: media_resolution_high… PDFs: media_resolution_medium… quality typically saturates at medium. Video: media_resolution_low” | Gemini专属 |
| B059 | Thought Signatures 必须在 API 调用间原样传回以保持推理上下文 | T1-3a-gemini3-developer-guide | ”Gemini 3 uses Thought signatures to maintain reasoning context across API calls… you must return these signatures back to the model in your request exactly as they were received” | Gemini专属 |
| B060 | 并行函数调用时只有第一个 functionCall 有签名,必须保持原始顺序 | T1-3a-gemini3-developer-guide | ”Parallel Function Calls: Only the first functionCall part in the list will contain the signature. You must return the parts in the exact order received.” | Gemini专属 |
| B061 | 可结合 Structured Outputs 与内置工具(Google Search、URL Context 等) | T1-3a-gemini3-developer-guide | ”Gemini 3 models allow you to combine Structured Outputs with built-in tools, including Grounding with Google Search, URL Context, Code Execution, and Function Calling” | Gemini专属 |
| B062 | 降低响应延迟:设置 thinking level 为 LOW 并用 system instruction “think silently” | T1-3b-gemini3-prompting-guide-vertex | ”For faster responses, set thinking level to LOW and use system instructions like ‘think silently‘“ | Gemini专属 |
| B063 | 避免过于宽泛的否定约束如”do not infer”,应具体说明允许演绎但禁止外部信息 | T1-3b-gemini3-prompting-guide-vertex | ”warns against overly broad negative constraints like ‘do not infer.’ Instead, explicitly direct the model to use provided context for reasoning while avoiding outside knowledge… ‘You are expected to perform calculations and logical deductions based strictly on the provided text. Do not introduce external information.’” | Gemini专属 |
| B064 | 先验证信息/能力是否存在,再生成答案(Split-Step Verification) | T1-3b-gemini3-prompting-guide-vertex | ”When a model lacks sufficient information or capability, it may generate plausible-sounding but incorrect responses. The solution: verify information or capability exists first, then generate answers.” | 通用 |
| B065 | 核心请求和关键限制放在提示最后,因为模型可能丢失早期出现的否定/格式约束 | T1-3b-gemini3-prompting-guide-vertex | ”Complex requests may cause models to drop negative or formatting constraints appearing early in prompts. Solution: place the core request and critical restrictions as the final instruction line.” | Gemini专属 ⚠️ 可能与 Claude 建议不同(Claude 通常建议重要指令放在开头或用 XML 标签强调) |
| B066 | Persona 会被模型严肃对待,可能优先于其他指令,需仔细审查避免歧义 | T1-3b-gemini3-prompting-guide-vertex | ”Models treat assigned personas seriously and may prioritize persona adherence over other instructions. Review assigned personas carefully to avoid ambiguity.” | Gemini专属 |
| B067 | 处理与现实矛盾的假设场景时,明确声明提供的上下文是唯一事实来源 | T1-3b-gemini3-prompting-guide-vertex | “‘You are a strictly grounded assistant limited to the information provided in the User Context. In your answers, rely only on the facts that are directly mentioned in that context.’” | 通用 |
| B068 | 多源信息综合:将问题放在数据之后,用”Based on the entire document above”锚定推理 | T1-3b-gemini3-prompting-guide-vertex | ”place questions after data context and anchor reasoning with phrases like ‘Based on the entire document above…’ ‘Synthesize all relevant information from the text that pertains to the question’s scenario.’” | Gemini专属 ⚠️ 可能与 Claude 建议不同(Claude 通常建议指令在前、数据在后) |
关键发现备注
OpenAI vs Google 的显著差异
-
温度设置:OpenAI 无特别限制温度;Google Gemini 3 强烈要求保持 1.0,降低温度会导致循环/退化——这是一个重大差异。
-
指令位置:OpenAI 建议 Context 放在提示末尾(Identity → Instructions → Examples → Context 顺序);Google Gemini 建议核心约束和限制放在最后一行(因为早期约束容易被丢失)。两者逻辑一致但侧重不同。
-
澄清问题策略:OpenAI GPT-5.2 明确建议”不要问澄清问题,直接覆盖所有可能意图”;这与 Anthropic Claude 的建议风格有差异(Claude 更倾向在模糊时主动澄清)。
-
推理控制:OpenAI 用
reasoning_effort(none/low/medium/high);Google 用thinking_level(minimal/low/medium/high)+ 动态思考。概念相似但参数和行为不同。 -
Thought Signatures:Gemini 3 独有概念,要求在多轮对话中原样传回加密推理签名,否则会降低推理质量或返回 400 错误。OpenAI 无类似要求。
-
Compaction:OpenAI GPT-5.2 独有的上下文压缩端点,用于超长 agent 对话。Google 无对应功能。
-
消息角色层级:OpenAI 明确区分 developer > user 优先级;Google 使用 system instruction 但无显式优先级层级。