How to write prompts for Gemini

Text, files and images together, plus work that lives in Google's apps.

Gemini is often used for tasks that mix text with other kinds of input, such as documents, images and spreadsheets, and for work that happens in Google's apps. It tends to do well when you say exactly what to look at in an attachment and what form the answer should take. This page explains how to write prompts for it, with a copyable formula, before-and-after examples, common mistakes and templates that suit it. It suits people who work with files, long material or Google Workspace. The advice is general, so check the provider's documentation for the latest features.

What works best with Gemini

  • Mix text with files and images deliberately

    If your plan supports attachments, you can combine a written instruction with a document, a screenshot, a chart or another file. The attachment does not explain itself, so describe it: what it is, what it contains and why you are sharing it. Name each file in your prompt and say which one the question concerns. If you attach several files, tell the model how they relate, for example that one is the contract and the other is your notes about it. For images, say whether to read text in them, describe what they show or compare two of them, since each is a different task.

  • Say what to look at in an attachment

    A request such as "summarize this" leaves the model to decide what matters. Point to the part you care about: a section, a page range, a column, a region of an image. Say what kind of answer you need from it, such as the totals, the unusual values or the risks. Narrow instructions tend to produce more useful results than broad ones, particularly for long or dense material. If you want a comparison, name the two items and the criteria. A short instruction like "compare page 2 and page 7 on cost" is far easier to follow than "compare the document".

  • Use long material, but organize it

    Gemini is often used with long inputs, such as reports, transcripts or several documents at once. Long input does not remove the need for structure. Label the material, state the task clearly, and ask for an answer that refers back to the source, for example by section or page. For very long material, a two-step approach can help: ask for an outline or key points first, then ask follow-up questions about the parts that matter. Ask for a short list of the sections you should read yourself, since some details deserve your attention even when the summary is good. A quick spot-check against the source builds trust in the method.

  • Work where your files already are

    If your work lives in Google Docs, Sheets, Gmail or Drive, see whether your plan lets the assistant work with that material directly. Features and names change over time, so check the documentation. Whatever the setup, describe the task in terms of the document: which sheet, which column, which section. Be careful with private data, and review any change before you accept it. Keep a copy of the original and review each suggested change before you accept it, because the assistant works from the material it is given and may misread context that you know and it does not.

  • Ask for structured output

    State the shape of the answer: a table with named columns, a numbered list, a short email, a set of rows that you can paste into a sheet. If you plan to paste the result into a spreadsheet, ask for values separated in a way that pastes cleanly, and say which columns you need. A defined structure also makes the answer easier to check against the source. Ask it to say when a value is missing rather than leaving a blank, so empty cells do not slip through unnoticed.

The Gemini prompt formula

The formula below starts with the attachments and what they are, then points to what to look at, the task, the format and the checks. Use only the parts you need: a plain text question may need only the task and the format. When you attach files, keep the attachment section, because naming each file and its purpose is one of the most useful habits for this kind of prompt.

Prompt
<attachments>
{attachment_list}
</attachments>

<look_at>
{what_to_look_at}
</look_at>

<task>
{task}
</task>

<context>
{context}
</context>

<output_format>
{output_format}
</output_format>

Base your answer only on the attachments and the text above. For every important point, say where in the attachments it comes from. If something is missing or unclear, ask me instead of guessing. At the end, list what you could not verify.
VariableWhat to put inExample
{attachment_list}Each file or image, with a short description of what it is.report.pdf: the quarterly report. chart.png: a screenshot of the sales chart.
{what_to_look_at}The part of the attachments that matters.The summary table on page 3 and the chart's last four quarters.
{task}The one thing you want done.Explain why sales fell in the last quarter.
{context}Background the model cannot guess.The audience is the sales team; they know the products.
{output_format}The shape and length of the answer.Three bullet points and one sentence on the likely cause.

Before and after

Illustrative examples of how a prompt can change. They are not output from any specific product.

Weak prompt

Summarize this PDF.

Stronger prompt

Attached: report.pdf, the Q3 operations report. Summarize it for a manager who has five minutes. Focus on the risks section and the budget table. Give five bullet points, each with the page it comes from, and one sentence on the biggest risk.

Why it is better: It names the file, points to the parts that matter, defines the reader and length, and asks for page references so you can check the summary against the report. You can reuse the same structure for the next report by changing the file name and the focus.

Weak prompt

What is in this image?

Stronger prompt

Attached: chart.png, a bar chart of monthly sales. Describe the trend from January to December, name the month with the largest change, and say what you cannot tell from the chart alone. Do not guess numbers that are not readable.

Why it is better: It says what the image is, what to extract and how to treat unreadable details, which prevents invented numbers. It also makes the answer easier to verify, because each point can be compared with the picture.

Weak prompt

Help me with my spreadsheet.

Stronger prompt

I have a sheet with columns Date, Customer, Amount and Status. Write a formula that totals Amount for rows where Status is Paid in the current month. Explain how it works in two sentences and say which cells to put it in. Ask me if the column layout is unclear.

Why it is better: It describes the structure instead of assuming the model can see it, states the exact result needed and invites a question if anything is unclear. The explanation lets you adapt the formula to your own columns.

Working with agentic features

Gemini can often handle multi-step tasks in a conversation, and some products connect it to tools, search or your own files. What is available depends on the product, your plan and your settings, so check the provider's documentation before relying on a feature.

For multi-step work, state the goal and what a finished result looks like. Name the files it may use and say which actions need your approval. Ask for a short plan before it starts, and break long jobs into stages: first extract the facts, then analyze them, then write the result. Reviewing each stage keeps errors from carrying forward. Check each stage's output before the next one starts.

If search or file access is available, ask the assistant to say where each important fact came from, and verify the ones that matter. Ask for a summary of what it did and what it could not confirm. Be careful with documents that contain private or sensitive data, and check what is shared and with whom. When in doubt, share less, and ask for a summary of what it used.

Top templates for Gemini

All templates
  • Agent Task Brief

    Give an AI agent a clear goal, boundaries and a checkable definition of done.

    agenttask briefplanning All models
  • Article from an Outline

    Turn a rough outline into a complete article with the audience, tone and length you choose.

    articlelong-formdrafting All models
  • Edit and Proofread

    Get clear, marked-up edits for grammar, clarity and flow without losing your own voice.

    editingproofreadinggrammar All models
  • Research Brief with Sources

    Get a structured research brief that separates findings from assumptions and names its sources.

    researchsourcesbrief All models
  • SWOT Analysis

    Build a SWOT analysis from facts you provide, with priorities and next actions for each area.

    SWOTstrategyanalysis All models

5 common mistakes

  1. Attaching a file and asking a vague question

    Name the file, say what it is and point to the part that matters. State what kind of answer you want from it, such as totals, risks or a short summary. A short description of each file costs one line and saves a wrong answer.

  2. Assuming the model knows how files relate

    When you attach several files, say how they relate and which one each part of the question concerns. Use the file names in your prompt. For example, say which file is the draft and which is the source of truth.

  3. Treating long input as a reason to skip structure

    Label the material, state one clear task and ask for answers that refer back to sections or pages. For very long material, ask for an outline first. If it loses track, ask a smaller question about one section.

  4. Accepting numbers from an image or chart without checking

    Tell the model not to guess values that are not readable, and check any figure it extracts against the original. Reading a chart is estimation, so ask for approximate values and ranges.

  5. Leaving the output shape open

    Ask for a table, a numbered list or rows you can paste into a sheet, and name the columns you need. Specifying the format before you ask is quicker than reformatting later.

Frequently asked questions

Can I attach files and images to my prompt?

Many versions of Gemini support attachments, but what is available depends on the product and your plan. If it is supported, name each file in your prompt and say what to look at. If not, paste the relevant text instead. If it is not, ask whether a pasted excerpt would do.

How do I get accurate answers from a long document?

Label the document, ask one clear question and request references to sections or pages so you can check the answer. For very long material, ask for an outline first, then ask about the parts that matter. Spot-check a few references against the original to confirm that the method works.

Can it work inside Google Docs, Sheets or Gmail?

Some Google products offer built-in assistant features, and availability varies by product and plan. Check the provider's documentation. The same prompting habits apply there: describe the document, the task and the format. If your work involves private data, check what is shared before you start.

How do I stop it from inventing details about an image?

Describe what the image is, say what to extract and tell it not to guess anything that is not clearly visible. Then check any figures yourself against the original. If the image is small or blurry, say so and ask which parts are not readable.

How can I get output that pastes into a spreadsheet?

Name the columns you need and ask for rows separated in a way that pastes cleanly, such as a table. Check a few rows against your source before you paste everything. Check a few rows against the source first.

Do these templates work in Gemini as written?

They are written to work across assistants. In Gemini, they tend to work best when you attach the relevant files, name them in the prompt and say what to look at. They are drafts, so test one on a real task and adjust it. If a template mentions files that you do not have, delete those lines.

Keep reading

Product features change often — check the provider's documentation for the latest.