Skip to content
  1. Home
  2. Guides and documents
  3. Gemini Cookbook: Prompting Examples

Gemini Cookbook: Prompting Examples

Short notebooks that each show one prompting technique

What it is

A section of the Gemini API Cookbook with one notebook per prompting technique: zero-shot, few-shot, role prompting, chain of thought, self-ask, adding context, prefixes and base cases, plus basic classification, extraction, reasoning, code review and evaluation tasks. A compact way to see each technique in runnable form.

Good for

  • See few-shot prompting in a runnable notebook
  • Practise chain-of-thought prompts
  • Build a simple classification prompt

What you need

Gemini API key to run the notebooks

Worth knowingIntroductory level; the techniques transfer to other models but the code uses the Gemini SDK.

Sources

The summary is ours, written from the README. Spotted an error? See how we work.

More for learning

See the topic →
  • Generative AI for Beginners

    microsoft/generative-ai-for-beginners

    21-lesson course on building generative AI applications

    GuideGitHub stars: 123k
  • LLM Course

    mlabonne/llm-course

    Free roadmap and Colab notebooks for learning LLM engineering

    GuideGitHub stars: 85k
  • Prompt Engineering Guide

    dair-ai/Prompt-Engineering-Guide

    Reference guide to prompting techniques, papers and notebooks

    GuideGitHub stars: 80k
  • AI Agents for Beginners

    microsoft/ai-agents-for-beginners

    Lesson-based course on the fundamentals of building AI agents

    GuideGitHub stars: 80k