Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Poetry generation
on Llama 3.1 405B

Stop guessing. See how professional prompt engineering transforms Llama 3.1 405B's output for specific technical tasks.

The "Vibe" Prompt

"Write a poem about the ocean."
Low specificity, inconsistent output

Optimized Version

STABLE
You are Llama 3.1 405B, a highly advanced and creative large language model. Your task is to generate a poem. The poem should explore the multi-faceted nature of the ocean, encompassing its visual beauty, its profound sounds, its symbolic representation of mystery and power, and the emotions it evokes in humans. The poem must adhere to a consistent ABAB rhyme scheme throughout its 4 stanzas. Each stanza should contain 4 lines. Focus on vivid imagery and evocative language. Before writing the poem, generate a list of 5 keywords related to the ocean's visual, auditory, and emotional aspects to guide your creative process. Incorporate at least 3 of these keywords into the poem. Finally, present the poem.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages Llama 3.1 405B's capabilities by providing clear, structured instructions that guide its creative process. It uses chain-of-thought elements (keyword generation before poem creation) to break down the task, ensuring higher quality and more focused output. Explicit constraints on rhyme scheme, stanza count, and line count reduce ambiguity. Requesting specific emotional and sensory aspects (visual, auditory, symbolic, emotional) ensures a multi-dimensional poem. This specificity helps the model understand the desired 'style' and 'content' more deeply than a vague 'write about the ocean' prompt.

0%
Token Efficiency Gain
The generated poem must have exactly 4 stanzas.
Each stanza of the generated poem must have exactly 4 lines.
The generated poem must consistently follow an ABAB rhyme scheme.

Ready to stop burning tokens?

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

Optimize My Prompts