How to Write Gemini Prompts: Google’s Own Advice, Made Practical
10 min read · Updated 2026-10-21
To write a good Gemini prompt, give one clear task with explicit constraints, include a few examples in identical formats, supply the context the model needs instead of assuming it knows it, put long material first and your question at the very end, and use one consistent delimiter style. Google’s own guidance also says you generally do not need to ask current Gemini models to show step-by-step reasoning, because they reason internally.
Start with what Google actually recommends
Google publishes prompt design guidance for the Gemini API, and most of it applies equally to the Gemini app. A few of its recommendations are stronger than the generic advice you see elsewhere — notably on examples, which Google says to include "always" — and a few contradict older habits, such as asking the model to think step by step. This guide works through them with templates you can paste.
Two caveats up front. First, Google frames prompting as iterative: treat any template as a first draft and adjust it against real outputs. Second, model behaviour changes between Gemini versions, so re-test the prompts you rely on after an upgrade.
1. One clear task, with the constraints written down
The most effective lever is still a specific instruction: what to produce, for whom, how long, in what format, and what to avoid. Google’s guidance says to specify constraints such as length and format explicitly, and to "explicitly explain any ambiguous terms or parameters" — if you say "short", say how short.
- Weak: "Summarise this article."
- Strong: "Summarise the article below for a busy sales manager in 5 bullet points, each under 20 words. Focus on what changes for their team. If the article does not say, write 'not stated' rather than guessing."
2. Always include examples — in exactly the same format
Google’s wording is unusually direct: "We recommend to always include few-shot examples in your prompts," and prompts without them "are likely to be less effective". Two or three short examples of input and desired output often fix format problems that paragraphs of instruction do not.
The detail that matters: "Make sure that the structure and formatting of few-shot examples are the same to avoid responses with undesired formats." Same labels, same order, same separators, same whitespace. If one example uses bullets and another uses a numbered list, expect either in the output. Google also warns that too many examples can make the model over-fit to them, so start with two or three and add more only if needed.
3. Give it the context instead of hoping it knows
A model answers from what is in the prompt plus what it learned in training. For anything specific to you — your product, your policy, your data — paste it in. Google’s example is a troubleshooting guide: with the guide included, the answer follows the guide; without it, the model gives generic advice.
When the task depends on recent or obscure facts, the Gemini API offers Grounding with Google Search, and the Gemini app can search on its own. Either way, check facts that matter before relying on them.
4. Long material first, question last
For long inputs Google’s advice is to "supply all the context first" and "place your specific instructions or questions at the very end of the prompt". After a large block of text, add a short transition so the model knows where the material ends and the task begins — for example, "Based on the report above, answer the following:".
This sits alongside a second recommendation for current models: put essential behaviour rules, the persona and the output format near the start of the system instruction or prompt. The two fit together — standing rules at the top, the material in the middle, the specific question at the end.
5. Pick one delimiter style and stick to it
Google recommends clear, consistent delimiters to separate the parts of a prompt. XML-style tags (<context>, <task>) and Markdown headings (## Context, ## Task) both work; mixing them within one prompt is what causes confusion. Consistency also makes your prompts easier to reuse as templates.
6. Stop asking for "step by step" in the answer
Older advice says to add "let’s think step by step". Google’s current guidance notes that Gemini 2.5 and 3-series models generate internal thinking to improve reasoning, so "it’s generally not necessary to have the model outline, plan, or detail reasoning steps in the returned response itself." Asking for visible reasoning mostly makes answers longer.
If you need to check the work — a calculation, a decision — ask for the result plus a short justification or the key figures used, rather than a full transcript of its thinking. For genuinely hard problems, Google says asking the model to think carefully can still help, at the cost of more tokens.
7. Use prefixes and partial answers to lock a format
Google describes giving the model "a response prefix" and letting it complete the pattern — for example, ending your prompt with the first line of a table, an outline’s first heading, or "JSON:". This is useful in the API and also works conversationally: "Answer in this format, starting with: Verdict:".
For strict machine-readable output on the API, prefer the structured-output (JSON schema) options over prefixes.
8. Break big jobs into smaller prompts
Google suggests one prompt per instruction for complex work: chain steps so each output feeds the next, or run parallel sub-tasks and combine them. A research summary, then an outline from the summary, then a draft from the outline, will usually beat one prompt that asks for all three. PromptVibe’s Prompt Chains do this without copy-pasting between steps.
A note for API users: temperature
If you call Gemini through the API, check Google’s current parameter guidance before tuning sampling. The prompt design page now says its newest models ignore custom temperature, top_p and top_k values, and that for earlier Gemini 3 models these should be left at their defaults to avoid degraded reasoning. Older tutorials that recommend lowering temperature for factual tasks may not apply to the model you are using.
A reusable Gemini prompt template
## Role and rules You are [ROLE]. Output format: [FORMAT]. Constraints: [LENGTH, TONE, MUST/MUST NOT]. Define: [ANY AMBIGUOUS TERM]. ## Examples Input: [EXAMPLE INPUT 1] Output: [EXAMPLE OUTPUT 1] Input: [EXAMPLE INPUT 2] Output: [EXAMPLE OUTPUT 2] ## Material [PASTE LONG CONTEXT HERE] ## Task Based on the material above, [SPECIFIC QUESTION OR INSTRUCTION]. If something is not in the material, say so.
PromptVibe’s free Gemini prompt generator produces this structure from a one-line goal, if you would rather not fill it in by hand.
Common mistakes
- No examples, or examples in different formats.
- A long document pasted after the question.
- Mixing Markdown headings and XML tags in one prompt.
- Undefined words like "short", "simple" or "professional".
- "Think step by step" bolted onto every prompt, producing long answers with no gain.
- Copying sampling settings from an old tutorial into a new model.
- Leaving the output language implicit when the prompt mixes languages — name the language and its variety.
Frequently Asked Questions
Does Gemini need examples in every prompt?
Google’s prompt guidance recommends always including a few examples and says prompts without them are likely to be less effective. Keep the examples in identical formats, and start with two or three — too many can make the model copy them too closely.
Where should the question go in a long Gemini prompt?
At the very end, after the context, with a short transition such as "Based on the information above…". Standing rules — persona, constraints and output format — go at the start of the system instruction or prompt.
Should I ask Gemini to think step by step?
Usually not. Google notes that Gemini 2.5 and 3-series models reason internally, so asking for the reasoning in the answer is generally unnecessary. For hard problems, asking it to think carefully can help but costs more tokens.
Is a Gemini prompt different from a Claude or ChatGPT prompt?
The fundamentals are shared. Gemini-specific emphasis is on examples (always include them, in matching formats) and consistent delimiters; Claude’s guidance emphasises XML tags and explaining the reason for rules. A well-structured prompt transfers with small edits.
Put this into practice
Generate a structured prompt or turn your workflow into a reusable Agent Skill — both free.