smithery/abhishekmmgn

gemini-prompt-construction

effective prompt structure strategies for Gemini, including Zero-shot, Few-shot, Role, and System prompting. Use this to refine queries for better accuracy and style.

Installation

$ npx skills add smithery/abhishekmmgn --skill gemini-prompt-construction

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/abhishekmmgn.

npx skills add smithery/abhishekmmgn

Browse all from smithery/abhishekmmgn

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents gemini

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,488 B
  • docs SUMMARY.md 200 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Gemini Prompt Construction Strategies

Goal

Design high-quality prompts that guide Gemini to produce accurate, relevant, and stylistically appropriate outputs by applying proven prompting techniques.

Core Techniques

1. Zero-Shot Prompting

  • Usage: Use for simple tasks where no prior examples are needed.
  • Format: Provide a clear description of the task and the input text.
  • Constraint: Best for straightforward requests like "Summarize this text" or "Translate this sentence."

2. Few-Shot Prompting

  • Usage: Use when you need to steer the model toward a specific output structure, pattern, or style.
  • Rule of Thumb: Provide 3 to 5 examples of the input-output pattern.
  • Classification Tasks: When using few-shot for classification, ensure you mix up the classes in your examples to prevent the model from overfitting to a specific order.
  • Format:

``text Input: [Example 1] Output: [Desired Result 1] Input: [Example 2] Output: [Desired Result 2] ... Input: [Actual Task] Output: ``

3. Role Prompting

  • Usage: Assign a specific persona (e.g., "book editor," "travel guide") to control the tone, style, and perspective of the response.
  • Implementation: Start the prompt with "Act as a [Role]..." or "You are a [Role]...".
  • Benefit: Improves relevance and consistency with the desired domain expertise.

4. System vs. Contextual Prompting

  • System Prompting: Define the "big picture" goal or overarching rule (e.g., "Always return JSON," "Be respectful").
  • Contextual Prompting: Provide immediate, task-specific background info (e.g., "Context: You are writing for a blog about retro 80's arcade games").

Configuration Guidelines

  • Creativity (Temperature):

Factual/Math: Set Temperature to 0. Balanced: Set Temperature to 0.2, Top-P to 0.95, Top-K to 30. * Creative: Set Temperature to 0.9, Top-P to 0.99, Top-K to 40.

Best Practices

  • Simplicity: Use positive instructions (what to do) rather than negative constraints (what not to do).
  • Specificity: Be specific about the output format. For data extraction, explicitly request JSON output to limit hallucinations.