Skip to content

Add example notebook: Self-Improving Prompts with Gemini #1110

@Karanjot786

Description

@Karanjot786

Description of the feature request:

Create a notebook showing how Gemini optimizes prompts through self-critique.

The notebook demonstrates:

  • Taking an initial user prompt
  • Generating a response
  • Having Gemini critique its own output
  • Suggesting prompt improvements
  • Re-running with the improved prompt
  • Comparing before and after results

The core loop:

  1. Run prompt
  2. Evaluate output quality
  3. Identify weaknesses
  4. Rewrite prompt
  5. Run again
  6. Show improvement

What problem are you trying to solve with this feature?

Prompt engineering is trial and error. Developers manually tweak prompts dozens of times before getting good results.

This notebook shows Gemini doing the optimization work. You give a rough prompt. Gemini refines it for you.

No existing cookbook example covers meta-prompting or self-critique patterns.

Benefits for developers:

  • Faster prompt iteration
  • Learn what makes prompts effective
  • Reduce manual experimentation

Any other information you'd like to share?

Proposed structure:

  1. Setup and API configuration
  2. Define a sample task with a weak prompt
  3. Run the weak prompt and show output
  4. Have Gemini critique the output
  5. Have Gemini rewrite the prompt
  6. Run the improved prompt
  7. Compare outputs side by side
  8. Repeat loop 2-3 times to show iterative gains

I will build this notebook if the team approves the concept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions