Gemini 3 Core Prompt Template
Key Capabilities
- XML-Based Context Isolation: Utilizes XML tags (like
<role>,<context>,<task>) to definitively separate background data from execution instructions, preventing prompt injection or model confusion. - Step-by-Step Reasoning Enforcement: Embedded
<instructions>force the model to plan, execute, and validate before producing final output, increasing accuracy on complex analytical tasks. - Format & Verbosity Control: Explicit
<constraints>block allows precise control over the tone, length, and structural output of the response.
Underlying Mechanism
This template is built on the "Core prompting principles" for Gemini 3 models, which are natively optimized to parse and respect XML delimiters. By structuring the prompt into discrete blocks and placing the user's specific <task> and final instructions at the very end (after large context blocks), it maximizes the model's attention mechanism on the actionable command rather than getting lost in the data payload.
Ideal Use Cases
- Zero-shot and few-shot analytical workflows requiring high precision.
- Document summarization or data extraction where large context blocks precede the question.
- Generating structured outputs (like JSON or predefined Markdown schemas) reliably.
When NOT to Use (Anti-Patterns)
- Simple, conversational queries where the XML scaffolding adds unnecessary token overhead.
- When building deep autonomous agents (use the Agentic Workflow System Prompt instead).
Pro Tip
For extremely long <context> payloads, anchor the model's attention right after the context block with a transition phrase inside the <task> tag, such as "Based on the information above, please..."
Source Reference: Prompt design strategies | Gemini API
Real Output Example
Generated using this exact prompt structure with the default variable values.
Prompt Variables & Input Reference
| Variable Tag | What to Enter | Default Example Value |
|---|---|---|
{{domain}} | The specific field or domain the assistant should specialize in. | Data Science |
{{verbosity}} | Desired length of the response. | Medium |
{{tone}} | Desired tone of the response. | Technical and Formal |
{{context_data}} | Any background information, documents, or data the model needs to reference. | Attached CSV data showing monthly active users. |
{{user_request}} | The actual question or instruction for the model to execute. | Based on the information above, summarize the key growth trends. |
How to Use This Prompt
Customize on Prompt Canvas
Click any {{variable}} directly on the canvas to choose a ⚡ Quick Preset or type your own value in the popover editor.
Copy Compiled Prompt
Click Copy Prompt to grab the ready-to-run prompt with your custom inputs already injected—or save it to your ⭐ Prompt Vault.
1-Click Launch in AI
Hit the ChatGPT, Claude, DeepSeek, or Gemini launch buttons to copy and open your preferred model in one click.