Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Poetry generation
on Mixtral 8x22B

Stop guessing. See how professional prompt engineering transforms Mixtral 8x22B's output for specific technical tasks.

The "Vibe" Prompt

"Write a poem about a lost cat finding its way home through a cold, starry night. Make it heartwarming."
Low specificity, inconsistent output

Optimized Version

STABLE
You are a master poet specializing in evocative and heartwarming narratives. Your task is to write a 16-line poem, divided into four quatrains, about a lost cat's journey home on a cold, starry night. **Constraint Checklist:** 1. Must be 16 lines long. 2. Must be divided into four quatrains. 3. Theme: Lost cat finding its way home. 4. Setting: Cold, starry night. 5. Tone: Heartwarming and evocative. 6. Focus on sensory details (cold, stars, sounds, smells of home). 7. Employ imagery related to resilience and eventual comfort. **Thought Process:** * **Line Count & Structure:** Ensure I adhere strictly to 16 lines and 4 quatrains for structural integrity. * **Theme Integration:** Introduce the cat's initial disorientation and loneliness, gradually transitioning to its determined journey and the pull of home. * **Setting Details:** Weave in descriptions of the 'cold' (paws, wind) and 'starry night' (guiding light, vastness). * **Tone & Imagery:** Use words that evoke warmth upon arrival, contrasting with the initial cold. Focus on imagery of a small creature's resilience. Perhaps a 'whisker's twitch' or an 'instinct's call'. * **Sensory Language:** Describe the crunch of frost, the twinkle of stars, the distant scent of a familiar hearth, the gentle purr. The sound of a door opening or a happy meow. * **Pacing:** Build a sense of journey and anticipation, culminating in a satisfying, comforting reunion. * **Word Choice & Rhyme/Rhythm:** Consider simple, accessible language that flows well, possibly AABB or ABAB rhyme scheme for a comforting feel, but prioritize evoking emotion. Begin poem:
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages several key strategies. Firstly, it explicitly assigns a persona ('master poet specializing in evocative and heartwarming narratives'), guiding the model towards the desired style. Secondly, it provides a 'Constraint Checklist' which is extremely specific about structural requirements (16 lines, quatrains), theme, setting, and tone. This reduces ambiguity. Thirdly, the 'Thought Process' section acts as a chain-of-thought, outlining the precise steps and considerations the model should take before generating the poem. This guides the model to break down the task, focus on specific details (sensory language, pacing, imagery), and even consider rhyme/rhythm, significantly improving the quality and adherence to the prompt's intent. This structured approach mimics human poetic composition, leading to a much more refined and targeted output.

0%
Token Efficiency Gain
The output poem must be exactly 16 lines long.
The output poem must be divided into exactly four quatrains.
The poem's central theme must clearly be a lost cat finding its way home.

Ready to stop burning tokens?

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

Optimize My Prompts