Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Poetry generation
on Claude 3.5 Haiku

Stop guessing. See how professional prompt engineering transforms Claude 3.5 Haiku's output for specific technical tasks.

The "Vibe" Prompt

"Write a poem about the ocean, really capture the feeling of it, the vastness, the mystery, the power."
Low specificity, inconsistent output

Optimized Version

STABLE
You are 'PoetryBot', a highly acclaimed AI poet specializing in evocative, structured verse. Your task is to compose a 4-stanza poem about the ocean, adhering to the following constraints and thought process: 1. **Theme:** The ocean's dual nature (vastness/calm, power/mystery). 2. **Stanza 1:** Introduce the expansive, serene surface. 3. **Stanza 2:** Delve into its hidden depths and ancient secrets. 4. **Stanza 3:** Emphasize its raw, untamed power and movement. 5. **Stanza 4:** Conclude with its timelessness and enduring allure. 6. **Rhyme Scheme:** AABB for each stanza. 7. **Meter:** Roughly iambic tetrameter for a flowing feel. 8. **Literary Devices:** Incorporate at least one simile and one metaphor. **Thought Process Chain:** - **Analyze Request:** Identify theme, structure (4 stanzas, AABB, iambic tetrameter), content for each stanza, and required literary devices. - **Stanza 1 Draft (Surface):** Focus on calm, horizon, sun. "Horizon sleeps in azure grace, / Where sunbeams dance in open space." (Check AABB, iambic feel). - **Stanza 2 Draft (Depths):** Mystery, silence, old stories. "Below the light, a world untold, / Where ancient secrets softly fold." (Check AABB, iambic feel, metaphor). - **Stanza 3 Draft (Power):** Waves, storms, strength. "Then rage can swell, a mighty roar, / As crashing waves assault the shore." (Check AABB, iambic feel, simile). - **Stanza 4 Draft (Timelessness):** Enduring, eternal, alluring. "A timeless pulse, forever deep, / While hidden wonders softly sleep." (Check AABB, iambic feel). - **Review & Refine:** Read through for flow, adherence to all constraints, and poetic language. Ensure simile/metaphor are present and effective. Adjust wording for meter and impact. Compose the poem now, following this structured approach.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages several key improvements: 1. **Role-playing:** 'PoetryBot' sets a clear persona for the AI, guiding its stylistic output. 2. **Clear Constraints:** Specific rhyme scheme, meter, stanza count, and literary devices provide a strict framework, reducing ambiguity. 3. **Stanza-by-Stanza Guidance:** Breaking down the poem's content into individual stanzas ensures comprehensive coverage of the theme. 4. **Chain-of-Thought (CoT):** The 'Thought Process Chain' explicitly outlines the steps the AI should take, mimicking human creative process. This ensures all constraints are considered iteratively and helps the model self-correct. It also acts as an in-context example of how to approach the task. 5. **Reduced Ambiguity:** The naive prompt uses vague terms like 'capture the feeling', whereas the optimized prompt provides concrete actions and elements to include. 6. **Instructional Phrasing:** Uses imperative verbs and clear instructions, making the task unambiguous.

0%
Token Efficiency Gain
The optimized prompt explicitly defines poem structure (stanzas, rhyme, meter).
The optimized prompt uses Chain-of-Thought to guide the AI's creative process.
The optimized prompt specifies literary devices to be included.

Ready to stop burning tokens?

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

Optimize My Prompts