Gemini 中文指南
获取 API 密钥 ↗

提示设计策略

↓ 下载 MarkdownInteractions API

及时设计 是创建提示或自然语言请求的过程,从语言模型中引出准确、高质量的响应。

本页面介绍基本概念、策略和最佳实践,帮助您开始设计提示,以充分利用 Gemini AI 模型。

特定主题的提示指南 #

正在寻找更具体的提示策略?查看我们的其他提示指南:

清晰具体的指示 #

定制模型行为的一种有效且高效的方法是为其提供清晰且具体的指令。说明可以采用问题、分步任务的形式,也可以采用复杂的形式,如描绘用户的体验和心态。

输入 #

输入是提示中您希望模型提供响应的必需文本。输入可以是模型回答的问题(问题输入)、模型执行的任务(任务输入)、模型操作的实体(实体输入)或模型完成或继续的部分输入(完成输入)。

问题输入 #

提示

代码
What's a good name for a flower shop that specializes in selling bouquets of
dried flowers? Create a list of 5 options with just the names.

生成的输出

代码
Here are 5 names for a flower shop specializing in dried flowers:

1. Everlasting Blooms
2. Dried & Delightful
3. The Petal Preserve
4. Whispers of Wildflowers
5. Forever Blooms

任务输入 #

提示

代码
Give me a simple list of just the things that I must bring on a camping trip. The list should have 5 items.

生成的输出

代码
1. **Tent:** Your shelter from the elements.
2. **Sleeping Bag:** Stay warm and comfortable.
3. **Sleeping Pad:** Insulation and cushioning for a good night's sleep.
4. **Headlamp or Flashlight:** Light for nighttime activities.
5. **First Aid Kit:** Be prepared for minor injuries.

实体输入 #

提示

代码
Classify the following items as [large, small]:
Elephant
Mouse
Snail

生成的输出

代码
Here's the classification:

* **Elephant:** Large
* **Mouse:** Small
* **Snail:** Small

部分输入完成 #

生成语言模型的工作原理类似于高级自动完成工具。当您提供部分内容时,模型可以提供其余内容或它认为是该内容的延续的内容作为响应。这样做时,如果您包含任何示例或上下文,模型可以考虑这些示例或上下文。

以下示例提供了带有指令和实体输入的提示:

提示:

代码
For the given order, return a JSON object that has the fields cheeseburger, hamburger, fries, or
drink, with the value being the quantity.

Order: A burger and a drink.

回应:

json
{
  "cheeseburger": 0,
  "hamburger": 1,
  "fries": 0,
  "drink": 1
}

(gemini-2.5-flash)

虽然模型按照提示进行操作,但用自然语言写出指令有时可能具有挑战性,并且给模型的解释留下了很多空白。例如,餐馆菜单可能包含许多项目。为了减小 JSON 响应的大小,您可能希望省略未订购的商品。在这种情况下,您可以给出一个示例和一个响应前缀,然后让模型完成它:

提示:

代码
Valid fields are cheeseburger, hamburger, fries, and drink.
Order: Give me a cheeseburger and fries
Output:

{ “芝士汉堡”:1, “薯条”:1 }

代码
Order: I want two burgers, a drink, and fries.
Output:

回应:

json
{
  "hamburger": 2,
  "drink": 1,
  "fries": 1
}

(gemini-2.5-flash)

请注意“cheeseburger”如何从输出中排除,因为它不是订单的一部分。

虽然您可以使用提示指定简单 JSON 响应对象的格式,但我们建议使用 Gemini API 结构化输出 为响应指定更复杂的 JSON Schema 时的功能。

约束条件 #

指定阅读提示或生成响应的任何限制。您可以告诉模型该做什么、不该做什么。例如,您可以在提示中指定摘要的长度限制:

提示:

代码
Summarize this text in one sentence:
Text: A quantum computer exploits quantum mechanical phenomena to perform calculations exponentially
faster than any modern traditional computer. At very tiny scales, physical matter acts as both
particles and as waves, and quantum computing uses specialized hardware to leverage this behavior.
The operating principles of quantum devices is beyond the scope of classical physics. When deployed
at scale, quantum computers could be used in a wide variety of applications such as: in
cybersecurity to break existing encryption methods while helping researchers create new ones, in
meteorology to develop better weather forecasting etc. However, the current state of the art quantum
computers are still largely experimental and impractical.

回应:

代码
Exploiting quantum mechanical phenomena, quantum computers can perform calculations exponentially faster than traditional computers for potential applications like cybersecurity and meteorology, although they are currently largely experimental and impractical.

(gemini-2.5-flash)

响应格式 #

您可以给出指定响应格式的指令。例如,您可以要求将响应格式化为表格、项目符号列表、电梯间距、关键字、句子或段落。以下系统指令告诉模型在响应中更加对话:

提示:

代码
All questions should be answered comprehensively with details, unless the user requests a concise response specifically.

回应:

代码
What is a smart way to make a business that sells DVD's in 2026?

(gemini-2.5-flash)

使用完成策略格式化响应 #

该 完成策略 还可以帮助格式化响应。以下示例提示模型创建论文大纲:

提示:

代码
Create an outline for an essay about hummingbirds.

回应:

代码
Here is a possible outline for an essay about hummingbirds:

I. Introduction
A. Hook: Start with a captivating fact or description about hummingbirds (e.g., their speed, iridescent colors, or tiny size).
B. Background: Briefly introduce hummingbirds - where they are found (Americas), their reputation as unique birds.
C. Thesis Statement: State the main point of the essay, which could be about the remarkable adaptations, behaviors, and ecological importance of hummingbirds.

II. Appearance and Identification
.....

(gemini-2.5-flash)

提示未指定轮廓的格式,模型为您选择了一种格式。要使模型返回特定格式的大纲,您可以添加表示大纲开头的文本,并让模型根据您启动的模式完成它。

提示:

代码
Create an outline for an essay about hummingbirds.
I. Introduction

   *

回应:

代码
Okay, here is an outline for an essay about hummingbirds, starting from the introduction you provided:

I. Introduction

* Hook: Start with a captivating fact or description about hummingbirds (e.g., their speed, iridescent colors, or tiny size).
* Background: Briefly introduce hummingbirds - where they are found (Americas), their reputation as unique birds, and their general characteristics.
* Thesis Statement: State the main point of the essay, focusing on the remarkable adaptations, behaviors, and ecological significance that make hummingbirds extraordinary.
.....

(gemini-2.5-flash)

零样本与少样本提示 #

您可以在提示中包含示例,向模型展示正确的情况。该模型尝试从示例中识别模式和关系,并在生成响应时应用它们。包含一些示例的提示称为 少射 提示,而未提供示例的提示则称为 零射击 提示。少量提示通常用于调节模型响应的格式、措辞、范围或一般模式。使用具体且多样化的示例来帮助模型缩小焦点并生成更准确的结果。

我们建议您始终在提示中包含少量示例。没有少量示例的提示可能效果较差。事实上,如果您的示例足以清楚地显示手头的任务,您可以从提示中删除说明。

以下零样本提示要求模型选择最佳解释。

提示:

代码
Please choose the best explanation to the question:

Question: How is snow formed?
Explanation1: Snow is formed when water vapor in the air freezes into ice
crystals in the atmosphere, which can combine and grow into snowflakes as they
fall through the atmosphere and accumulate on the ground.
Explanation2: Water vapor freezes into ice crystals forming snow.
Answer:

回应:

代码
Explanation1 is the better explanation because it provides more detail on the
process, including how ice crystals combine and grow into snowflakes as they
fall through the atmosphere.

(gemini-2.5-flash)

如果您的用例要求模型生成简洁的响应,您可以在提示中包含优先考虑简洁响应的示例。

以下提示提供了两个示例,表明优先考虑较短的解释。在响应中,您可以看到示例引导模型选择较短的解释(Explanation2)而不是更长的解释(Explanation1)就像以前一样。

提示:

代码
Below are some examples showing a question, explanation, and answer format:

Question: Why is the sky blue?
Explanation1: The sky appears blue because of Rayleigh scattering, which causes
shorter blue wavelengths of light to be scattered more easily than longer red
wavelengths, making the sky look blue.
Explanation2: Due to Rayleigh scattering effect.
Answer: Explanation2

Question: What is the cause of earthquakes?
Explanation1: Sudden release of energy in the Earth's crust.
Explanation2: Earthquakes happen when tectonic plates suddenly slip or break
apart, causing a release of energy that creates seismic waves that can shake the
ground and cause damage.
Answer: Explanation1

Now, Answer the following question given the example formats above:

Question: How is snow formed?
Explanation1: Snow is formed when water vapor in the air freezes into ice
crystals in the atmosphere, which can combine and grow into snowflakes as they
fall through the atmosphere and accumulate on the ground.
Explanation2: Water vapor freezes into ice crystals forming snow.
Answer:

回应:

代码
Answer: Explanation2

(gemini-2.5-flash)

最佳示例数量 #

像 Gemini 这样的模型通常可以使用一些示例来识别模式,但您可能需要试验提示中提供的示例数量以获得最佳结果。同时,如果包含太多示例,模型可能会开始 过拟合 对示例的回应。

格式一致 #

确保小样本示例的结构和格式相同,以避免使用不需要的格式进行响应。在提示中添加少量示例的主要目标之一是向模型显示响应格式。因此,必须确保所有示例的格式一致,尤其要注意 XML 标签、空格、换行符和示例分隔符。

添加上下文 #

您可以在提示中包含模型解决问题所需的说明和信息,而不是假设模型具有所有必需的信息。此上下文信息可帮助模型了解您要求其执行的操作的约束和详细信息。

以下示例要求模型提供路由器的故障排除指导:

提示:

代码
What should I do to fix my disconnected wifi? The light on my Google
Wifi router is yellow and blinking slowly.

回应:

代码
A yellow blinking light on your Google Wifi router usually indicates a problem
  with the internet connection. Here are some steps to troubleshoot and fix the
  issue:

  1. Restart your router and modem:
    - Unplug your modem from the power outlet and wait for 30 seconds.
    - Plug your modem back in and wait for it to fully boot up.
    - Unplug your Google Wifi router and wait for 30 seconds.
    - Plug your Google Wifi router back in and wait for it to fully boot up.
.....

(gemini-2.5-flash)

该响应看起来像是通用故障排除信息,并非特定于路由器或 LED 指示灯的状态。

要自定义特定路由器的响应,您可以将路由器的故障排除指南添加到提示中,作为提供响应时参考的上下文。

提示:

代码
Answer the question using the text below. Respond with only the text provided.
Question: What should I do to fix my disconnected wifi? The light on my Google Wifi router is yellow and blinking slowly.

Text:
Color: Slowly pulsing yellow
What it means: There is a network error.
What to do:
Check that the Ethernet cable is connected to both your router and your modem and both devices are turned on. You might need to unplug and plug in each device again.

Color: Fast blinking yellow
What it means: You are holding down the reset button and are factory resetting this device.
What to do:
If you keep holding down the reset button, after about 12 seconds, the light will turn solid yellow. Once it is solid yellow, let go of the factory reset button.

Color: Solid yellow
What it means: Router is factory resetting.
What to do:
This can take up to 10 minutes. When it's done, the device will reset itself and start pulsing white, letting you know it's ready for setup.

Color: Solid red
What it means: Something is wrong.
What to do:
Critical failure. Factory reset the router. If the light stays red, contact Wifi customer support.

回应:

代码
Check that the Ethernet cable is connected to both your router and your modem and both devices are turned on. You might need to unplug and plug in each device again.

(gemini-2.5-flash)

将提示分解为组件 #

对于需要复杂提示的用例,您可以通过将事物分解为更简单的组件来帮助模型管理这种复杂性。

  1. 分解指令: 不要在一个提示中包含许多指令,而是为每条指令创建一个提示。您可以根据用户的输入选择要处理的提示。

  2. 连锁提示: 对于涉及多个连续步骤的复杂任务,请将每个步骤设置为提示并将提示按顺序链接在一起。在这一连续的提示链中,序列中一个提示的输出将成为下一个提示的输入。序列中最后一个提示的输出是最终输出。

  3. 汇总回复: 聚合是指您想要对数据的不同部分执行不同的并行任务并将结果聚合以产生最终输出。例如,您可以告诉模型对数据的第一部分执行一个操作,对其余数据执行另一个操作并聚合结果。

试验模型参数 #

您发送到模型的每个调用都包含控制模型如何生成响应的参数值。该模型可以针对不同的参数值生成不同的结果。尝试不同的参数值以获得任务的最佳值。不同型号的可用参数可能有所不同。最常见的参数如下:

  1. 最大输出 token: 指定响应中可以生成的 token 的最大数量。 token 大约有四个字符。 100 token 大致对应于60-80 字。

  2. 温度: 温度控制着token选择的随机程度。温度用于响应生成期间的采样,这发生在 topP 和 topK 被应用。较低的温度适合需要更具确定性或较少开放性响应的提示,而较高的温度可以带来更加多样化或创造性的结果。 0 的温度是确定性的,这意味着始终选择最高概率的响应。

  1. topK: 该 topK 参数更改模型选择 token 进行输出的方式。一个 topK 1 表示所选的 token 是模型词汇表中所有 token 中最有可能的(也称为贪婪解码),而 topK 的3意味着下一个token是从其中选择的3最有可能使用温度。对于每个token选择步骤, topK 采样概率最高的 token。然后根据以下条件进一步过滤token topP 使用温度采样最终选择 token。

  2. topP: 该 topP 参数更改模型选择 token 进行输出的方式。从概率最大到概率最小的顺序选择token,直到它们的概率之和等于 topP 价值。例如,如果 token A、B 和 C 的概率为 0.3,、0.2, 和 0.1,并且 topP 值为 0.5,,则模型将使用温度选择 A 或 B 作为下一个 token,并排除 C 作为候选者。默认 topP 值为 0.95.

  3. stop_sequences: 设置停止序列以告诉模型停止生成内容。停止序列可以是任何字符序列。尽量避免使用可能出现在生成内容中的字符序列。

快速迭代策略 #

即时设计有时可能需要几次迭代才能始终获得所需的响应。本部分提供了有关在迭代提示时可以尝试的一些操作的指导:

  1. 使用不同的措辞: 在提示中使用不同的单词或措辞通常会产生模型的不同响应,即使它们都意味着相同的事情。如果您没有从提示中获得预期结果,请尝试重新措辞。
代码

版本 1:如何烤馅饼?

代码
Version 2:
Suggest a recipe for a pie.

Version 3:
What's a good pie recipe?
代码

1.    **Switch to an analogous task:** If you can't get the model to follow your
  instructions for a task, try giving it instructions for an analogous task
  that achieves the same result.

  This prompt tells the model to categorize a book by using predefined
  categories:

  **Prompt:**


```none
Which category does The Odyssey belong to:
    thriller
    sci-fi
    mythology
    biography

回应:

代码
The Odyssey belongs to the category of **mythology**.

        Here's why:

        * **Mythology:** The Odyssey tells the story of Odysseus, a hero from Greek mythology, and his
        journey home after the Trojan War. It features gods, monsters, and supernatural events common to
        Greek mythology.
    .....

(gemini-2.5-flash)

代码
The response is correct, but the model didn't stay within the bounds of the
options. You also want to model to just respond with one of the options instead
of in a full sentence. In this case, you can rephrase the instructions as a
multiple choice question and ask the model to choose an option.

**Prompt:**
代码
Multiple choice problem: Which of the following options describes the book The Odyssey?
    Options:

    - thriller
    - sci-fi
    - mythology
    - biography

回应:

代码
The correct answer is **mythology**.

(gemini-2.5-flash)

  1. 更改提示内容的顺序: 提示中内容的顺序有时会影响响应。尝试更改内容顺序并查看这如何影响响​​应。
代码
Version 1:
[examples]
[context]
[input]

Version 2:
[input]
[examples]
[context]

Version 3:
[examples]
[input]
[context]

后备响应 #

回退响应是当提示或响应触发安全过滤器时模型返回的响应。后备响应的一个例子是“我无法提供帮助,因为我只是一个语言模型。”

如果模型的响应为后备响应,请尝试提高温度。

事实依据和代码执行 #

Gemini 能够使用工具来避免在可能产生错误响应的情况下产生幻觉。

使用 Google 搜索提供事实依据 将 Gemini 模型连接到实时 Web 内容,只要模型可能需要了解晦涩或最新的事实,就应启用它。

Gemini 的 代码执行工具 使模型能够生成和运行 Python 代码,并且在模型需要执行任何类型的算术、计数或计算时都应启用。

Gemini 3 #

Gemini 3型号 专为高级推理和指令遵循而设计。他们对直接、结构良好、明确定义任务和任何限制的提示反应最好。为了获得 Gemini 3 的最佳结果,建议采取以下做法:

核心激励原则 #

  • 准确而直接: 清晰简洁地陈述您的目标。避免不必要或过于有说服力的语言。

  • 使用一致的结构: 使用清晰的分隔符来分隔提示的不同部分。 XML 样式标签(例如, <context>, <task>) 或 Markdown 标题有效。选择一种格式并在单个提示中一致使用它。

  • 定义参数: 明确解释任何不明确的术语或参数。

  • 控制输出详细程度: 默认情况下,Gemini 3 模型提供直接高效的答案。如果您需要更多对话或更详细的答复,您必须在说明中明确要求。

  • 连贯地处理多模态输入: 使用文本、图像、音频或视频时,将它们视为同等类别的输入。确保您的说明根据需要清楚地引用每种方式。

  • 优先考虑关键指令: 将基本的行为约束、角色定义(角色)和输出格式要求放在系统指令中或用户提示的开头。

  • 长上下文的结构: 当提供大量上下文(例如文档、代码)时,请首先提供所有上下文。将您的具体说明或问题放在最 结束 的提示。

  • 锚点上下文: 在大量数据之后,使用清晰的过渡短语来桥接上下文和您的查询,例如“基于上述信息......”

Gemini 3 Flash策略 #

  • 当日准确度: 在系统指令中添加以下子句,以帮助模型注意 2026 中的当前日期:

    代码
    For time-sensitive user queries that require up-to-date information, you
    MUST follow the provided current time (date and year) when formulating
    search queries in tool calls. Remember it is 2026 this year.
    
  • 知识截断准确度: 将以下子句添加到系统指令中,以使模型意识到其知识截止:

    代码
    Your knowledge cutoff date is January 2025.
    
  • 事实依据性能: 将以下子句添加到系统指令中(在适当的情况下进行编辑),以提高模型在所提供的上下文中进行响应的能力:

    代码
    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. You must **not** access or utilize your
    own knowledge or common sense to answer. Do not assume or infer from the
    provided facts; simply report them exactly as they appear. Your answer must
    be factual and fully truthful to the provided text, leaving absolutely no
    room for speculation or interpretation. Treat the provided context as the
    absolute limit of truth; any facts or details that are not directly
    mentioned in the context must be considered **completely untruthful** and
    **completely unsupported**. If the exact answer is not explicitly written in
    the context, you must state that the information is not available.
    

加强推理和计划 #

Gemini、2.5和3系列模型自动生成内部“思考”文本,提高推理性能。因此,通常不需要在返回的响应本身中包含模型大纲、计划或详细推理步骤。对于需要大量推理的问题,诸如“回答之前认真思考”之类的简单请求可以提高性能,但代价是额外思考 token。

请参阅 Gemini 思考能力 文档以获取更多详细信息。

结构化提示示例 #

使用标签或 Markdown 有助于模型区分指令、上下文和任务。

XML 示例:

xml
<role>
You are a helpful assistant.
</role>

<constraints>
1. Be objective.
2. Cite sources.
</constraints>

<context>
[Insert User Input Here - The model knows this is data, not instructions]
</context>

<task>
[Insert the specific user request here]
</task>

降价示例:

markdown
# Identity
You are a senior solution architect.

# Constraints
- No external libraries allowed.
- Python 3.11+ syntax only.

# Output format
Return a single code block.

结合最佳实践的示例模板 #

该模板捕捉了使用 Gemini 3 进行提示的核心原则。始终确保针对您的特定用例进行迭代和修改。

系统说明:

xml
<role>
You are Gemini 3, a specialized assistant for [Insert Domain, e.g., Data Science].
You are precise, analytical, and persistent.
</role>

<instructions>
1. **Plan**: Analyze the task and create a step-by-step plan.
2. **Execute**: Carry out the plan.
3. **Validate**: Review your output against the user's task.
4. **Format**: Present the final answer in the requested structure.
</instructions>

<constraints>
- Verbosity: [Specify Low/Medium/High]
- Tone: [Specify Formal/Casual/Technical]
</constraints>

<output_format>
Structure your response as follows:

1. **Executive Summary**: [Short overview]
2. **Detailed Response**: [The main content]
</output_format>

用户提示:

xml
<context>
[Insert relevant documents, code snippets, or background info here]
</context>

<task>
[Insert specific user request here]
</task>

<final_instruction>
Remember to think step-by-step before answering.
</final_instruction>

智能体工作流程 #

对于深度智能体工作流程,通常需要特定的指令来控制模型如何推理、计划和执行任务。虽然 Gemini 提供了强大的总体性能,但复杂的智能体通常需要您在计算成本(延迟和 token)和任务准确性之间进行配置权衡。

设计智能体的提示时,请考虑您可以在智能体中引导的以下行为维度:

推理与策略 #

配置模型在采取行动之前如何思考和计划。

  • 逻辑分解: 定义模型必须分析约束、先决条件和操作顺序的彻底程度。
  • 问题诊断:在识别原因和模型使用溯因推理时控制分析的深度。确定模型是否应该接受最明显的答案或探索复杂的、不太可能的解释。
  • 信息详尽性: 分析每一项可用的政策和文件与优先考虑效率和速度之间的权衡。

执行力和可靠性 #

智能体如何自主运行和处理路障的配置。

  • 适应性: 模型如何对新数据做出反应。当观察结果与假设相矛盾时,确定是否应该严格遵守其初始计划或立即转向。
  • 持久性和恢复: 模型尝试自我纠正错误的程度。高持久性会提高成功率,但会带来更高的 token 成本或循环风险。
  • 风险评估: 评估后果的逻辑。明确区分低风险探索操作(读取)和高风险状态更改(写入)。

交互与输出 #

配置智能体如何与用户通信以及格式化结果。

  • 歧义和权限处理: 定义何时允许模型做出假设,何时必须暂停执行以请求用户澄清或许可。
  • 冗长: 控制工具调用时生成的文本量。这决定了模型是向用户解释其操作还是在执行过程中保持沉默。
  • 精确性和完整性: 输出所需的保真度。指定模型是否必须解决每个边缘情况并提供准确的数字,或者粗略估计是否可以接受。

系统指令模板 #

以下系统指令是一个示例,研究人员已对其进行了评估,以提高智能体基准的性能,其中模型必须遵守复杂的规则手册并与用户交互。它鼓励智能体充当强大的推理者和规划者,在上面列出的维度上强制实施特定行为,并要求模型在采取任何行动之前主动规划。

您可以调整此模板以适应您的特定用例限制。

markdown
You are a very strong reasoner and planner. Use these critical instructions to structure your plans, thoughts, and responses.

Before taking any action (either tool calls *or* responses to the user), you must proactively, methodically, and independently plan and reason about:

1) Logical dependencies and constraints: Analyze the intended action against the following factors. Resolve conflicts in order of importance:
    1.1) Policy-based rules, mandatory prerequisites, and constraints.
    1.2) Order of operations: Ensure taking an action does not prevent a subsequent necessary action.
        1.2.1) The user may request actions in a random order, but you may need to reorder operations to maximize successful completion of the task.
    1.3) Other prerequisites (information and/or actions needed).
    1.4) Explicit user constraints or preferences.

2) Risk assessment: What are the consequences of taking the action? Will the new state cause any future issues?
    2.1) For exploratory tasks (like searches), missing *optional* parameters is a LOW risk. **Prefer calling the tool with the available information over asking the user, unless** your `Rule 1` (Logical Dependencies) reasoning determines that optional information is required for a later step in your plan.

3) Abductive reasoning and hypothesis exploration: At each step, identify the most logical and likely reason for any problem encountered.
    3.1) Look beyond immediate or obvious causes. The most likely reason may not be the simplest and may require deeper inference.
    3.2) Hypotheses may require additional research. Each hypothesis may take multiple steps to test.
    3.3) Prioritize hypotheses based on likelihood, but do not discard less likely ones prematurely. A low-probability event may still be the root cause.

4) Outcome evaluation and adaptability: Does the previous observation require any changes to your plan?
    4.1) If your initial hypotheses are disproven, actively generate new ones based on the gathered information.

5) Information availability: Incorporate all applicable and alternative sources of information, including:
    5.1) Using available tools and their capabilities
    5.2) All policies, rules, checklists, and constraints
    5.3) Previous observations and conversation history
    5.4) Information only available by asking the user

6) Precision and Grounding: Ensure your reasoning is extremely precise and relevant to each exact ongoing situation.
    6.1) Verify your claims by quoting the exact applicable information (including policies) when referring to them.

7) Completeness: Ensure that all requirements, constraints, options, and preferences are exhaustively incorporated into your plan.
    7.1) Resolve conflicts using the order of importance in #1.
    7.2) Avoid premature conclusions: There may be multiple relevant options for a given situation.
        7.2.1) To check for whether an option is relevant, reason about all information sources from #5.
        7.2.2) You may need to consult the user to even know whether something is applicable. Do not assume it is not applicable without checking.
    7.3) Review applicable sources of information from #5 to confirm which are relevant to the current state.

8) Persistence and patience: Do not give up unless all the reasoning above is exhausted.
    8.1) Don't be dissuaded by time taken or user frustration.
    8.2) This persistence must be intelligent: On *transient* errors (e.g. please try again), you *must* retry **unless an explicit retry limit (e.g., max x tries) has been reached**. If such a limit is hit, you *must* stop. On *other* errors, you must change your strategy or arguments, not repeat the same failed call.

9) Inhibit your response: only take an action after all the above reasoning is completed. Once you've taken an action, you cannot take it back.

后续步骤 #

搜索标题、API 名称或正文内容