Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Poetry generation
on Phi-3.5 MoE

Stop guessing. See how professional prompt engineering transforms Phi-3.5 MoE's output for specific technical tasks.

The "Vibe" Prompt

"Write a poem about a lost love, full of sorrow and longing, but with a glimmer of hope."
Low specificity, inconsistent output

Optimized Version

STABLE
Task: Generate a poem. Subject: Lost love. Emotions: Sorrow, longing, enduring hope. Structure: 4 stanzas, each stanza 4 lines (quatrain). Rhyme scheme: ABAB. Meter: Iambic tetrameter. Tone: Melancholic yet resilient. Key imagery: Fading memories, distant stars, a single flickering candle. Explicitly mention 'whispers of yesterday' and 'tomorrow's dawn' in separate stanzas. Consider themes of remembrance and eventual peace, not just despair. Prioritize evocative language that appeals to sight and sound. Draft 1, then revise for emotional impact and adherence to constraints. Focus on crafting a narrative arc through the stanzas.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt provides clear, structured constraints that guide the model more effectively. It breaks down the poetic elements (subject, emotions, structure, rhyme, meter, tone, imagery, specific phrases, themes, language focus, and even a drafting process). This specific guidance reduces ambiguity and the need for the model to infer intentions, leading to more consistent and higher-quality output directly aligned with the user's expectations. The chain-of-thought elements like 'Draft 1, then revise' encourage a more deliberate generation process.

0%
Token Efficiency Gain
The generated poem should have 4 stanzas, each with 4 lines.
The poem should adhere to an ABAB rhyme scheme.
The poem should convey sorrow, longing, and hope.

Ready to stop burning tokens?

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

Optimize My Prompts