Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Poetry generation
on Gemini 2.0 Flash

Stop guessing. See how professional prompt engineering transforms Gemini 2.0 Flash's output for specific technical tasks.

The "Vibe" Prompt

"Write a poem about a lost star in a cosmic ballet. Make it evocative and a bit melancholic."
Low specificity, inconsistent output

Optimized Version

STABLE
You are a highly acclaimed poet with a profound understanding of astrophysics. Your task is to compose a 12-line poem, divided into three quatrains (four-line stanzas), about a star that has deviated from its celestial dance. The poem should evoke a sense of melancholy, loneliness, and the vastness of space, while also hinting at a universal order. Before writing, consider the following: 1. Metaphorical approach: How can the 'lost star' symbolize something more profound, like an individual seeking purpose or a deviation from a path? 2. Imagery: What specific celestial images (nebulae, constellations, void, stardust) can best convey the star's isolation and the cosmic scale? 3. Rhyme scheme and meter: Opt for an ABAB rhyme scheme for the first two quatrains and a more free verse approach for the final quatrain, to emphasize the star's unique journey. 4. Word choice: Select words that are both aesthetically pleasing and scientifically resonant (e.g., 'plasma,' 'gravity's embrace,' 'event horizon' – though perhaps more subtly). Based on these considerations, craft the poem.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages a Chain-of-Thought (CoT) approach by first establishing a persona and then breaking down the complex task of poetry generation into manageable, actionable steps. It explicitly asks the model to 'consider the following' before writing, guiding it through metaphorical thinking, imagery selection, structural choices (rhyme scheme, meter), and precise word choice. This structured approach helps Gemini 2.0 Flash generate a more nuanced, cohesive, and thematically rich poem by pre-processing the creative problem. The specific constraints on line count and stanza structure further refine the output, making it more predictable and aligned with the user's intent, rather than relying on the model to infer these details from a vague 'evocative and a bit melancholic' instruction.

0%
Token Efficiency Gain
The optimized prompt will result in a poem with clearer thematic connections.
The optimized prompt will lead to more consistent adherence to the requested tone.
The optimized prompt will likely produce a poem with a more sophisticated vocabulary.

Ready to stop burning tokens?

Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.

Optimize My Prompts