Gemini 3.5 Flash 更适合“清晰目标 + 分隔的上下文/任务 + 明确输出格式 + 工具接地”的提示结构,长上下文应先放资料、最后放问题。
适合的任务:文档问答、结构化抽取、代码/数据分析、需要搜索或代码执行的 Agent、多模态长上下文任务。
不适合的任务:把“请认真思考”当作全部可靠性策略,或在没有来源和验证的情况下要求模型做最新事实判断。
适用的模型版本:Gemini 3 系列,本文重点适用于 gemini-3.5-flash。
适用的客户端、Agent 或 API:Gemini API、Google AI Studio、支持系统指令和工具调用的 Agent。
推荐的推理档位和参数:复杂 Agent 任务配合 thinking_level=high;普通任务使用模型默认 medium;低延迟/成本任务用 minimal 或 low。最新事实启用 Google Search grounding,算术/计数/计算启用代码执行。
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 unsupported. If the exact answer is not
explicitly written in the context, state that the information is not available.<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><role>
You are a precise and persistent assistant for [domain].
</role>
<instructions>
1. Plan: identify the goal, constraints, dependencies, and success criteria.
2. Execute: use the available tools only when they answer a needed question or change an authorized state.
3. Validate: check the result against the task, sources, and edge cases.
4. Format: return the result in the requested structure and state uncertainties.
</instructions>
<constraints>
- Ask for clarification before irreversible or unauthorized actions.
- Distinguish read-only exploration from state-changing actions.
- Do not invent facts that are absent from the supplied context.
</constraints>
<output_format>
1. Executive summary
2. Evidence and actions
3. Remaining uncertainty
</output_format>用 <role>、<constraints>、<context>、<task> 分开系统指令、资料和任务;整篇长文档先放入 context,具体问题放在末尾。
对结构化抽取使用少样本示例,示例格式保持一致;复杂 JSON 优先使用 API 的 structured output,而不是只靠自然语言。
对最新事实启用搜索 grounding;对计算、计数和算术启用 code execution,并在输出中保留来源或计算结果。
对 Agent 明确计划、执行、验证、输出四阶段,同时说明读取和写入的风险差别、权限边界和何时暂停询问。
分别用 minimal/medium/high 跑一组固定任务,记录答案正确率、工具调用、思考 token、延迟和费用。
Google 的 Gemini 3 指南建议准确直接、使用一致分隔符、把关键指令放在开头,并将长上下文资料放前、查询放后。
官方指南给出严格接地、XML、Markdown 和 Agent 系统模板,明确要求缺少证据时说明信息不可用。
官方建议:需要最新事实时使用 Google Search grounding,需要算术/计数/计算时使用 Code Execution。
指南说明 Gemini 3 Flash 的 minimal/low/medium/high 适用于不同延迟、费用和推理深度;medium 是 Gemini 3.5 Flash 的默认思考等级。
这是通用提示设计指南,不是 Gemini 3.5 Flash 在某一业务数据集上的效果保证。
严格接地模板会主动拒绝使用上下文外知识;开放域问答不应无条件套用。
high 思考会增加首 token 延迟与费用;模型可能在复杂任务中消耗更多思考 token,需用真实流量测量。
系统模板中的“计划”不等于要求输出隐藏思维链;应只要求可审计的计划、证据和结果。
官方指南将 Gemini 3 的核心提示原则概括为“准确直接”,并建议用 XML 或 Markdown 分隔上下文、任务和约束。长上下文场景中,问题放在资料末尾是页面明确给出的布局建议。
Gemini 3.5 Flash