google · Google AI Docs
Gemini API Prompt design strategies
A collection of methodologies and techniques for constructing effective prompts, including zero-shot, few-shot, and chain-of-thought prompting patterns.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Gemini API Prompt design strategies
A collection of methodologies and techniques for constructing effective prompts, including zero-shot, few-shot, and chain-of-thought prompting patterns.
When To Use
Use when you need to improve model accuracy, structure model outputs, or implement reasoning patterns like few-shot or chain-of-thought prompting.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/gemini-api-prompt-design-strategies-workflow-guide.md | A guide outlining best practices and techniques for creating effective natural language prompts for the Gemini API. | Questions about a guide outlining best practices and techniques for creating effective natural language prompts for the Gemini API. |
examples/gemini-api-prompt-design-strategies-few-shot.text | A text example demonstrating prompt design strategies for generating creative business names using the Gemini API. | Exact payloads, commands, or snippets shown in A text example demonstrating prompt design strategies for generating creative business names using the Gemini API. |
examples/gemini-api-prompt-design-strategies-flower-shop-naming.text | A text example demonstrating a few-shot prompting technique to generate flower shop names. | Exact payloads, commands, or snippets shown in A text example demonstrating a few-shot prompting technique to generate flower shop names. |
examples/gemini-api-prompt-design-strategies-classification.text | A text example demonstrating a classification prompt strategy for the Gemini API. | Exact payloads, commands, or snippets shown in A text example demonstrating a classification prompt strategy for the Gemini API. |
examples/gemini-api-prompt-design-strategies-few-shot-classification.text | A text example demonstrating few-shot prompting techniques for classifying objects by size using the Gemini API. | Exact payloads, commands, or snippets shown in A text example demonstrating few-shot prompting techniques for classifying objects by size using the Gemini API. |
examples/gemini-api-prompt-design-strategies-versioning-examples.text | Textual examples demonstrating three different structural approaches to ordering examples, context, and input for Gemini API prompts. | Exact payloads, commands, or snippets shown in Textual examples demonstrating three different structural approaches to ordering examples, context, and input for Gem... |
examples/gemini-api-prompt-design-strategies-time-sensitive-query.text | A text example demonstrating how to instruct the Gemini API to use a specific current date for time-sensitive search queries. | Exact payloads, commands, or snippets shown in A text example demonstrating how to instruct the Gemini API to use a specific current date for time-sensitive search... |
examples/gemini-api-prompt-design-strategies-text-examples.text | A collection of text-based examples demonstrating various prompt design strategies for the Gemini API. | Exact payloads, commands, or snippets shown in A collection of text-based examples demonstrating various prompt design strategies for the Gemini API. |
examples/gemini-api-prompt-design-strategies-gemini-api-grounded-assistant-prompt.text | A text-based prompt example demonstrating how to instruct the Gemini API to act as a strictly grounded assistant using only provided user context. | Exact payloads, commands, or snippets shown in A text-based prompt example demonstrating how to instruct the Gemini API to act as a strictly grounded assistant usin... |
examples/gemini-api-prompt-design-strategies-role-persona.text | A text example demonstrating the use of role prompting and clear instruction separation for the Gemini API. | Exact payloads, commands, or snippets shown in A text example demonstrating the use of role prompting and clear instruction separation for the Gemini API. |
examples/gemini-api-prompt-design-strategies-identity-constraints-format.text | A text file demonstrating prompt design techniques including identity, constraints, and output format instructions for the Gemini API. | Exact payloads, commands, or snippets shown in A text file demonstrating prompt design techniques including identity, constraints, and output format instructions fo... |
examples/gemini-api-prompt-design-strategies-role-persona-2.text | A text example demonstrating how to use role prompting and persona instructions to guide Gemini API responses. | Exact payloads, commands, or snippets shown in A text example demonstrating how to use role prompting and persona instructions to guide Gemini API responses. |
examples/gemini-api-prompt-design-strategies-context-few-shot.text | A text file demonstrating prompt design strategies using context and few-shot prompting techniques for the Gemini API. | Exact payloads, commands, or snippets shown in A text file demonstrating prompt design strategies using context and few-shot prompting techniques for the Gemini API. |
examples/gemini-api-prompt-design-strategies-reasoning-persona.text | A text example demonstrating a persona-based prompting strategy that instructs the model to act as a strong reasoner and planner. | Exact payloads, commands, or snippets shown in A text example demonstrating a persona-based prompting strategy that instructs the model to act as a strong reasoner... |
What This Skill Covers
- Prompt design is the process of creating prompts, or natural language requests, that elicit accurate, high quality responses from a language model.
- Main sections:
Topic-specific prompt guides,Clear and specific instructions,Input,Constraints,Response format.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://ai.google.dev/gemini-api/docs/prompting-strategies
