Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Poetry generation
on GPT-4o

Stop guessing. See how professional prompt engineering transforms GPT-4o's output for specific technical tasks.

The "Vibe" Prompt

"Write a poem about a rainy day, focusing on comfort and introspection. Make it evoke a sense of peace."
Low specificity, inconsistent output

Optimized Version

STABLE
You are a highly skilled poet. Your task is to compose a five-stanza poem. Each stanza must have four lines (quatrain) and follow an AABB rhyme scheme. The poem should explore the themes of comfort and introspection during a rainy day, specifically focusing on the sounds, sights, and feelings associated with the rain and indoor warmth. Ensure the tone is peaceful and contemplative. To achieve this, follow these steps: 1. **Brainstorm imagery:** List 3-5 specific visual, auditory, and tactile details related to a rainy day and indoor comfort (e.g., 'patter on pane', 'warm tea steam', 'soft blanket'). 2. **Outline stanza themes:** For each of the five stanzas, briefly describe the primary focus or sentiment (e.g., 'Stanza 1: Initial feeling of rain, coziness beginning', 'Stanza 3: Deepening introspection, world outside'). 3. **Draft stanza by stanza:** Write each quatrain, ensuring it adheres to the AABB rhyme scheme and the assigned theme, incorporating brainstormed imagery. 4. **Review for flow and tone:** Read the entire poem aloud to check for rhythm, consistent tone, and emotional resonance. Make any necessary adjustments for peace and contemplation. Begin by listing your brainstormed imagery and stanza themes before writing the poem.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt provides clear structural constraints (stanza count, line count, rhyme scheme) and a chain-of-thought process. It forces GPT-4o to brainstorm and outline before writing, which helps in generating a more coherent and thematic poem. By specifying the 'highly skilled poet' persona, it primes the model for a higher quality output. The step-by-step guidance reduces ambiguity and directs the model's creative process, making it less prone to generating off-topic or unstructured content. This approach not only improves quality but also often leads to more efficient generation by front-loading planning.

0%
Token Efficiency Gain
The optimized prompt explicitly asks for brainstorming and outlining, ensuring a structured approach.
The optimized prompt defines the 'persona' of the AI ('highly skilled poet'), which usually improves output quality.
The optimized prompt specifies structural elements like 'five-stanza', 'four lines', and 'AABB rhyme scheme'.

Ready to stop burning tokens?

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

Optimize My Prompts