Gemini Prompts Cheatsheet - Long-Context & Multimodal Prompt Engineering

Prompting Gemini is a different discipline from prompting short-context models. With million-token context and native text, image, audio and video input built in, the wrong move is to slice a task up and ask repeatedly - the right move is to hand over all the material once and use explicit delimiter tags to mark which block is instruction and which block is source data, letting the model locate things inside the long context itself. XML or Markdown section tags are the officially recommended anchoring technique and the core technique on this sheet. Second is recency: Gemini will not volunteer that its knowledge is stale, so any question touching current events needs an explicit current-date clause plus an instruction to ground the answer, because a confidently outdated reply is harder to catch than an obvious error. Third is model selection - Flash for routine work, Pro for hard reasoning, 2.5 Pro reserved for whole-corpus analysis, since tiering beats using one model for everything on both cost and accuracy.

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

Command Examples

Document analysis: <docs> for material, <task> for the job

<docs>...</docs><task>Answer X using the document, and cite the paragraph you relied on.</task>

This is the minimal form of context-first, instruction-last; demanding paragraph citations makes every claim checkable against the source.

Date calibration plus grounding when live facts are needed

The current year is 2026, so the answer must reflect the latest facts. Where live facts are required, answer from retrieval and give links as sources; mark anything you cannot confirm as uncertain.

The first line fixes the time frame, the second turns on retrieval. Drop the second and it answers from memory with unchanged confidence, however new the question is.

Visual review: multimodal input, deeper thinking, named region

Here is a screenshot of this interface. Think very carefully and list five design points that could be improved; for the button area, describe the visual state of each one.

The explicit think-very-carefully clause triggers deeper internal reasoning, and naming a region yields fine-grained observations that a general ask for care would not.

Numbered chunks plus a required scope declaration

The material below is numbered by block: block 1 ... block 12 ... First tell me which block numbers you will use, then answer the question based on the material above; cite a specific location for each conclusion.

Declaring the scope first turns what it read into something you can check, and the "based on the material above" anchor keeps the answer on the supplied text rather than on memory.

Common Pitfalls

  • Asking about current events without a current-date clause: the reply comes from training-era facts with the same confident tone as a correct answer, which makes the staleness almost impossible to spot later.
  • Needing web facts but omitting the grounding clause, which amounts to asking for a memory-based answer without telling you that is what you are getting.
  • Placing the instruction before or inside the material, where your own explanatory text gets absorbed as input to analyze.
  • Leaving multiple inputs unlabeled: once several documents and examples are concatenated, the model has no way to tell which requirement applies to which one.
  • Standardizing on a single model across the whole pipeline: Pro for routine high-frequency work is waste, and Flash for whole-repository analysis drops detail. Mix them deliberately.

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.

FAQ

Why does Gemini prompting insist on context first, instruction last?

Because trailing instructions carry more weight. The working order is: wrap the full material in tags such as <context> or <docs>, then state the job in a <task> block, and give every chunk of input its own label so its origin is unambiguous. When instructions come first or interleave with the material, the model tends to read your explanatory text as something to analyze. Tags draw those boundaries more reliably than blank lines or heading levels.

With a 1M window, do I still need retrieval and chunking?

Not usually: feed the repository or the long document straight in and skip the retrieval plumbing. When the material genuinely exceeds the window, still chunk and number the pieces, then refer to them by number (block 3 migration plan) since a number anchors better than a paraphrase of the location. Adding a line asking for the section range it will use before answering measurably reduces omissions and lets you check the answer against the source in seconds.

How do I avoid stale answers when asking about what is current this year?

Two steps, both needed. First calibrate the sense of time with a current-date clause (something like "Remember it is 2026 this year"), then add a grounding clause so the answer is retrieved rather than remembered. Do only the first and it will answer from a training-era version of the facts, fluently and without any change in tone, which is harder to catch than an outright error. When you need web facts, also ask it to search and give links as sources.

How should mixed media and my text instructions be arranged?

Wrap each asset in its own <image>, <audio>, <video>, or <document> tag and place your instruction after the tags. Useful asks include describing anomalies in an uploaded image, transcribing and summarizing an audio file, locating the transition into the third scene of a video, and the cross-modal form: answer the question using the image together with the audio. For finer grain, name the region of the image you want described.

How do I choose between Flash, Pro, and 2.5 Pro?

Tier by task difficulty instead of picking one model for everything. High-frequency, latency-sensitive work goes to Gemini 3.5 Flash for speed and cost; the hardest reasoning goes to Gemini 3.1 Pro Preview when quality wins; whole-repository analysis at 1M context goes to Gemini 2.5 Pro; and Gemini 2.5 Flash is the balanced daily default. Mixing is both cheaper and more accurate than a single uniform choice.

Official References

Each command links to its official documentation below, so you can verify the latest usage and read deeper.

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