A bad prompt costs you twice: once for the answer you cannot use, and again for the retry. On a subscription that burns limits; on the API it burns money. Good prompting is the cheapest cost-control there is, and it is mostly about being specific.
What is different about Gemini
- Give it the whole file. Gemini's long context means you should attach the full document rather than a summary you wrote. It will find what it needs. Summarising first throws away the thing the model is good at.
- Point at the source. Because it reads files and screenshots natively, "look at page 4 of the attached PDF" or "the highlighted cell in this screenshot" works well.
- Ask for a format. Gemini follows explicit format instructions closely: "a table with three columns", "five bullets, no intro", "valid JSON only". Without them it tends towards long prose.
- Use Gems for repeat jobs. Anything you would type twice belongs in a Gem (app) or a system instruction (API).
Worked example 1: summarising a report
Before: "Summarise this." (with a 40-page PDF attached). You get a generic ten-paragraph overview that reads like the executive summary you already had.
After: "You are a financial analyst. From the attached annual report, list the five biggest risks the company names, one sentence each, with the page number. Then give one sentence on whether revenue grew or shrank. Do not add an introduction." You get a short, checkable list with sources. Fewer output tokens, more use.
Worked example 2: writing an email
Before: "Write an email to a client about the delay." Gemini invents a reason, a tone and a timeline, and you rewrite most of it.
After: "Draft a 120-word email to a client. Context: the delivery is now Thursday instead of Monday because a supplier missed a shipment. Tone: apologetic but confident, no excuses. End with a specific offer: a 10% discount on the next order. Sign off as Priya." One pass, done.
Worked example 3: getting code
Before: "Write a script to clean my data." You get a plausible script for data you do not have.
After: "Attached is a CSV sample (first 20 rows). Write a Python script using pandas that: removes rows where email is blank, lowercases email, converts signup_date to ISO format, and writes to clean.csv. Return only the code, no explanation." Now Gemini can see the real column names and the constraint "only the code" saves output tokens.
Knowledge check
Which instruction most directly reduces the cost of a Gemini API call?