Gemini Prompts Cheatsheet - Long-Context & Multimodal Prompt Engineering
Essential Gemini prompt templates — structured delimiters, long-context anchoring, multimodal input, model selection. Copy a template, fill the variables, and ship.
Structured Delimiters 5
Wrap sections in XML tags: <context>...</context><task>...</task>Clearer than bare newlines; Gemini parses tags well
Use Markdown headings (## Background / ## Task) as separatorsLayer long prompts with headings
Put role and constraints in system instruction or at the start of userFront-load key instructions
Label each multi-part input to avoid confusionTag sources for multiple docs/examples
Constrain output format with tags: <output>JSON</output>Specify the return structure
Long-Context Anchoring 5
Give all context first, then put the instruction lastGemini is more sensitive to trailing instructions
Anchor with "based on the above..."Force the model to use the text, not memory
1M/2M context: feed a whole repo / long doc directlySkip fiddly retrieval chunking
Chunk and number very long material; cite numbers when askingMore targeted
Ask the model to cite specific passagesEasy to verify long-text claims
Thinking & Date / Grounding 5
For hard tasks add "think very carefully"Triggers deeper internal thinking (Gemini 3/2.5)
Add a current-date clause: "Remember it is 2026 this year"Calibrate the model's sense of time
Add a grounding clause when live facts are neededBase answers on retrieval, not training memory
Ask it to flag "uncertain" rather than inventReduce hallucination
For step-by-step use "step by step, show work"Explicitly request the process
Multimodal Prompts 5
Image+text: upload image + "describe anomalies in the image"Native image understanding
Image+audio: upload audio + "transcribe and summarize"Native audio handling
Video: upload video + "find the 3rd scene transition"Native video understanding
Mixed: "look at the image and answer from the audio"Cross-modal reasoning
For an image, describe the region of interestImprove fine-grained understanding
Model Selection 5
Gemini 3.5 Flash: high-frequency / low-latencyFast and cheap
Gemini 3.1 Pro Preview: hardest reasoningQuality first
Gemini 2.5 Pro: very long context (1M)Whole-repo analysis
Gemini 2.5 Flash: balanced cost/qualityDaily workhorse
Switch models by task, not one-size-fits-allTrade cost against quality
Templates 5
<docs>...</docs><task>Answer X from docs, cite passages</task>Document analysis template
Implement {req} in {lang} with tests and edge handlingCodegen template
Compare A/B in a Markdown table, dimensions: {dimensions}Comparison template
Current year 2026; answers must reflect the latest factsRecency-calibration template
Upload image, list 5 design points to improveVisual review template
Tips
- Gemini's signature is huge context (2.5 Pro 1M) + native multimodal; the prompt craft is "structured delimiters + long-context anchoring + trailing instruction" — don't fragment like for short-context models.
- For hard tasks explicitly add "think very carefully" and a current-date clause; it markedly improves reasoning and time sense, especially for 2026 recency questions.
- When you need live/latest facts, always add a grounding clause, or the model falls back to training memory and gives stale answers.
- Pick the model by task: Flash for daily, Pro for hard, 2.5 Pro for whole-repo — cheaper and more accurate than one model for everything.
Official References
Commands are compiled from the official docs below. Click to verify the latest usage.
Maintained by LaoHand
Publicly updated on Aug 21, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us