Best AI Prompts for Gemini Workflows (2026)
Prompts for Gemini workflows#
Five starting points#
Act as a Gemini API engineer. I will give you a diagram or screenshot of a user interface: [PASTE YOUR IMAGE DESCRIPTION OR ATTACH THE IMAGE]. First describe what you see in the image, then list the components and layout, then write React and Tailwind code for them. Use only [LIST YOUR ALLOWED LIBRARIES], and mark anything you had to guess as an assumption.Write a system instruction for a Gemini code-refactoring assistant. It must set the role, state that the user's code and request come after the instructions, require changes to be listed file by file with a reason for each, forbid new dependencies, and tell the model to say so when a file it needs was not supplied. The target repository is [DESCRIBE YOUR REPOSITORY AND LANGUAGE].Design a research-synthesis workflow that uses Gemini function calling. Write the function declarations (name, description, typed parameters, required list) for [LIST YOUR DATA SOURCES, e.g. a search endpoint and a PDF reader], explain which calls are independent and can run in parallel, and say which must happen in sequence. Add the system instruction that stops the model from answering without a tool result.Write a Python example using the Gemini SDK that streams a response to a customer question and also handles a failed call. The question is [DESCRIBE YOUR USE CASE]. Show the system instruction, the streaming loop, and where your code must check the result before showing it to a customer. Do not invent method names: if you are unsure of an SDK call, say so.Compare these product pages and return a feature matrix as JSON: [PASTE THE TEXT OF EACH PAGE, LABELLED A, B, C]. First write the JSON schema (enum values for categories, integer for counts, null allowed where a page is silent), then fill it in. If a page does not state a feature, return null instead of guessing.What to add to any Gemini workflow prompt#
- The rules that must always hold (role, tone, output format) in the system instruction or at the start of the prompt, which is where Google's Gemini 3 guidance places critical instructions.
- A few varied examples with identical formatting. Google says prompts without few-shot examples are likely to be less effective, and warns that too many can cause overfitting.
- For long inputs, the documents first and your question last.
- Function declarations with a clear description, specific types (integer, string, enum) and a required list; Google suggests keeping the active set to 10 to 20 tools at most.
- A schema, not a sentence, when you need JSON: set the JSON MIME type and supply the schema, with
descriptionfields and enums. - A line telling the model to say when the answer is not in the supplied context. Google's Gemini 3 Flash guidance includes such a clause.
A worked example#
System instruction: You are a contracts analyst. Answer only from the
documents supplied. If a term is not stated in them, return null for it.
[Contract A text, contract B text, contract C text]
Return JSON that matches the supplied schema. Fields: party_name (string),
renewal_months (integer or null), termination_notice_days (integer or null),
governing_law (enum: "England", "New York", "California", "other", or null).
Question: for each contract, what are the renewal and termination terms?
A good result for this task has:
- One object per contract, in the order supplied, with no fields outside the schema.
- Null, not a guess, for every term the contract does not state.
- Values that match the contract text when you check each one by hand, since valid JSON can still be wrong.
- Governing law only from the listed enum values.
- No claim about a clause the model could not have seen in the pasted text.
The full prompt library is on our prompt library page.
Limits of this guide#
This page covers the Gemini API as Google documents it, not the Gemini app or Google Workspace features. Google's docs say Gemini 4 and 3.6 or later ignore custom temperature, top_p and top_k values and that guidance differs between model versions, so check the model you use. We did not run these prompts, did not test SDK code, and could not confirm OpenAI's current prompting guide, because the archive copy was blocked.
Sources & Further Reading#
All sources fetched on 2026-10-22.
| Claim | Source | Section or date |
|---|---|---|
| Critical instructions go in the system instruction or at the start; for long context put instructions at the end; few-shot examples; too many cause overfitting; grounding clause; parameters ignored on Gemini 4 and 3.6+ | Prompt design strategies (Google AI for Developers) | Gemini 3; Zero-shot vs few-shot; Experiment with model parameters; undated |
| Pass a system_instruction parameter to configure model behavior | System instructions (Google AI for Developers) | Undated |
| Model returns function name and arguments; your code runs it; declaration fields; parallel and compositional calling | Function calling (Google AI for Developers) | Overview and declarations; undated |
| Specific types, 10-20 tools max, validate calls, error handling, authentication | Function calling (Google AI for Developers) | Best practices; undated |
| JSON Schema output, validate values, unenforced keywords stripped | Structured outputs (Google AI for Developers) | Best practices; Limitations; undated |
| Query at the end; multiple-needle retrieval is less accurate; context caching | Long context (Google AI for Developers) | Best practices; Limitations; undated |
| Place a single image before the text; describe the image first if output is generic | File input methods (Google AI for Developers) | Prompt guidance; undated |
| Few-shot examples improve accuracy and consistency | Prompting best practices (Anthropic) | Examples section; undated |
Need a different task?
Browse all 36 tasks and 180 prompts, with search and level filters.
Frequently asked questions
What are the best AI prompts for Gemini workflows?
For Gemini workflows, put the rules in the system instruction, declare tools with precise descriptions, and request JSON through a schema instead of asking in prose. Then validate every returned value in your own code, because a schema guarantees syntax, not correct content.
Where should I put the question when I give Gemini a long document?
After the material. Google advises putting supplied context first and the instruction or question at the end, for long prompts. Google also notes retrieval gets less accurate when you need many separate facts, and recommends context caching when you query the same data repeatedly.
Does Gemini run the functions I declare?
No. The model returns a function name and arguments, and your code runs the function and sends the result back. That is why Google advises validating each call before executing it, keeping the active tool set small, and using specific types such as enums for parameters.
By TheBestSuperintelligence Editorial Team. Last reviewed .
How we sourced this. Model names, features and limits change often. The prompts below are our own untested starting points, and we did not measure which wording performs best. Facts are as printed on each source page on the date shown. Methodology
