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.

AI Prompts·30 commands·Last updated 2026-08-21

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 separators
Layer long prompts with headings
Put role and constraints in system instruction or at the start of user
Front-load key instructions
Label each multi-part input to avoid confusion
Tag 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 last
Gemini 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 directly
Skip fiddly retrieval chunking
Chunk and number very long material; cite numbers when asking
More targeted
Ask the model to cite specific passages
Easy 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 needed
Base answers on retrieval, not training memory
Ask it to flag "uncertain" rather than invent
Reduce 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 interest
Improve fine-grained understanding

Model Selection 5

Gemini 3.5 Flash: high-frequency / low-latency
Fast and cheap
Gemini 3.1 Pro Preview: hardest reasoning
Quality first
Gemini 2.5 Pro: very long context (1M)
Whole-repo analysis
Gemini 2.5 Flash: balanced cost/quality
Daily workhorse
Switch models by task, not one-size-fits-all
Trade 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 handling
Codegen template
Compare A/B in a Markdown table, dimensions: {dimensions}
Comparison template
Current year 2026; answers must reflect the latest facts
Recency-calibration template
Upload image, list 5 design points to improve
Visual 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