Prefer straightforward developer instructions with a clear end goal.
Keep prompts simple and direct.
Avoid explicitly requesting chain-of-thought or “think step by step” behavior.
Use delimiters such as markdown headings, XML tags, or section titles when the prompt mixes multiple content blocks.
Try zero-shot first. Add few-shot examples only when the output contract or edge cases need them.
Be explicit about constraints, success criteria, and completion conditions.
Tool schemas are disclosed via the Responses API tools parameter. Keep tool policy (when/why/whether to call) in the prompt; do not restate tool names or argument schemas.
Clear, direct instructions outperform vague prompting.
A lightweight role statement can materially improve consistency.
XML-style tags are especially useful when mixing instructions, context, examples, and variable inputs.
Three to five strong examples are often a good default when examples are needed.
For long context, place long documents before the question and put the actual query near the end.
When grounding in long documents, asking for relevant quotes first can improve downstream analysis.
If tool use or progress-update behavior matters, specify it explicitly rather than assuming the model will infer it.
When you call the Messages API with tools, the API injects the tool definitions into a special system prompt automatically. Keep your user-authored system prompt focused on policy; put tool detail in each tool’s description field rather than re-listing schemas in prose.
Few-shot examples are recommended by default; keep them structurally consistent.
Prefer positive demonstrations over anti-pattern-only demonstrations.
Break complex tasks into smaller components or chained prompts when one large prompt becomes hard to steer.
Use system instructions when the target runtime supports them.
Thinking is dynamic by default on modern Gemini thinking models; tune it only when latency or deeper reasoning warrants it.
Gemini long-context workflows can benefit from many-shot in-context learning when you have a large bank of representative examples.
Tool schemas are disclosed via the Gemini API tools (function declarations) parameter. Keep the prompt focused on tool policy; do not re-list function names or parameter schemas.