Gemini 3.5 Flash · prompting-guide
Google recommends structuring Gemini 3.5 Flash prompts around the goal, context, task boundaries, output format, and grounding tools, then iterating on representative samples.
For {{TASK_GOAL}}, supply {{SOURCE_CONTEXT}}, separate context and task with {{DELIMITER_STYLE}}, require {{OUTPUT_SCHEMA}}, and use {{GROUNDING_TOOL}} to check {{FACT_CHECKS}}. Run {{EVAL_SET}} first and revise on {{FAILURE_SIGNAL}}; the Google guide is a structured starting point, not a business-accuracy guarantee.
Before running, fill every variable and return each value in the acceptance record.Replace before running: {{TASK_GOAL}}, {{SOURCE_CONTEXT}}, {{DELIMITER_STYLE}}, {{OUTPUT_SCHEMA}}, {{GROUNDING_TOOL}}, {{FACT_CHECKS}}, {{EVAL_SET}}, {{FAILURE_SIGNAL}}
For {{TASK_GOAL}}, supply {{SOURCE_CONTEXT}}, separate context and task with {{DELIMITER_STYLE}}, require {{OUTPUT_SCHEMA}}, and use {{GROUNDING_TOOL}} to check {{FACT_CHECKS}}. Run {{EVAL_SET}} first and revise on {{FAILURE_SIGNAL}}; the Google guide is a structured starting point, not a business-accuracy guarantee.
Gemini 3.5 Flash is better suited to a prompt structure with a clear goal, separated context and task, an explicit output format, and tool grounding; for long contexts, put the source material first and the question last.
Suitable tasks: Document question answering, structured extraction, code/data analysis, agents that require search or code execution, and long-context multimodal tasks.
Unsuitable tasks: Treating “think carefully” as the entire reliability strategy, or asking the model to make up-to-date factual judgments without sources and verification.
Applicable model versions: The Gemini 3 series, with this article focusing on gemini-3.5-flash.
Applicable clients, agents, or APIs: The Gemini API, Google AI Studio, and agents that support system instructions and tool calls.
Recommended reasoning levels and parameters: Pair complex agent tasks with thinking_level=high; use the model's default medium for ordinary tasks; use minimal or low for low-latency or cost-sensitive tasks. Enable Google Search grounding for up-to-date facts, and code execution for arithmetic, counting, or computation.
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>Use <role>, <constraints>, <context>, and <task> to separate system instructions, source material, and the task; put the entire long document in context and the specific question at the end.
Use few-shot examples for structured extraction, keeping the example format consistent; for complex JSON, prefer the API's structured output instead of relying only on natural language.
Enable search grounding for up-to-date facts; enable code execution for calculations, counting, and arithmetic, and retain the sources or calculation results in the output.
For agents, explicitly define the four stages of planning, execution, validation, and output, while also explaining the risk difference between reading and writing, permission boundaries, and when to pause and ask.
Run a fixed set of tasks separately with minimal/medium/high, and record answer accuracy, tool calls, thinking tokens, latency, and cost.
Google's Gemini 3 guide recommends being accurate and direct, using consistent delimiters, placing key instructions at the beginning, and putting long-context source material first and the query last.
The official guide provides strict-grounding, XML, Markdown, and Agent system templates, explicitly requiring the assistant to say when information is unavailable due to insufficient evidence.
Official guidance: use Google Search grounding when up-to-date facts are needed, and use Code Execution for arithmetic, counting, or computation.
The guide explains that minimal/low/medium/high in Gemini 3 Flash apply to different levels of latency, cost, and reasoning depth; medium is the default thinking level for Gemini 3.5 Flash.
This is a general prompt-design guide, not a guarantee of Gemini 3.5 Flash's performance on any particular business dataset.
The strict-grounding template deliberately refuses to use knowledge outside the context; it should not be applied unconditionally to open-domain question answering.
high thinking increases time to the first token and cost; the model may consume more thinking tokens on complex tasks, so this must be measured with real traffic.
“Plan” in the system template does not mean asking for hidden chain-of-thought; request only an auditable plan, evidence, and result.
The official guide summarizes Gemini 3's core prompting principle as “accurate and direct” and recommends using XML or Markdown to separate context, tasks, and constraints. For long-context scenarios, putting the question at the end of the source material is an explicit layout recommendation on the page.
Google AI for Developers · Source date: Not disclosed · Edited: 2026-09-20
Read the original sourceGemini 3.5 Flash
Run this guide in the environment listed above. Downloading does not transfer the template or establish model availability for your account.