Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Poetry generation
on Cerebras Llama 3.1 70B

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

The "Vibe" Prompt

"Write a beautiful poem about a lonely lighthouse."
Low specificity, inconsistent output

Optimized Version

STABLE
Here's the plan to generate a poem about a lonely lighthouse: 1. **Brainstorm Core Themes:** Identify key elements associated with a lonely lighthouse (isolation, solitude, watchfulness, guiding light, the sea, storms, endurance, a sense of longing or purpose). Keep these concise. 2. **Select Poetic Form/Structure:** Choose a common, accessible poetry form like a quatrain (four-line stanzas, ABAB or AABB rhyme scheme) or free verse. For this poem, let's aim for quatrains with an ABAB rhyme scheme to add a touch of classic melancholy. 3. **Outline Stanza by Stanza Content:** * **Stanza 1:** Introduce the lighthouse, its location, and the initial sense of isolation. * **Stanza 2:** Focus on its duty – the guiding light, the endless watch, the contrast with the dark sea. * **Stanza 3:** Explore its emotional state (personified) – perhaps a quiet longing, enduring storms alone. * **Stanza 4:** Conclude with its enduring purpose, finding beauty in its solitude, a timeless sentinel. 4. **Draft Poem (Stanza by Stanza), Focusing on Imagery and Rhyme:** * **Stanza 1 Draft:** A tower stands, by ocean's roar / A silent sentinel, upon the shore / No human warmth, nor friendly face / Just endless waves, its lonely place. * **Stanza 2 Draft:** Its beam cuts through the inky night / A steadfast star, a guiding light / For ships that brave the ocean's vast / A silent promise, built to last. * **Stanza 3 Draft:** It dreams of shores it cannot greet / Of bustling ports, and hurried feet / Yet in the tempest, fierce and loud / It stands unbowed, within the cloud. * **Stanza 4 Draft:** A noble soul, in weathered stone / Forever watchful, and alone / Its ancient heart, a beacon bright / Through sun and storm, and darkest night. Now, generate the poem based on this structured plan, refining language and imagery.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt utilizes a chain-of-thought approach, breaking down the poetry generation into discrete, logical steps. This guides the model through brainstorming, structure selection, content outlining, and stanza-by-stanza drafting. It provides constraints (quatrains, ABAB rhyme) and specific thematic guidance for each stanza, which significantly reduces the 'search space' for the model. This makes the output more predictable, higher quality, and less prone to deviations. The naive prompt is highly ambiguous, leaving too much to the model's interpretation, which can lead to generic or unfocused output. The optimized prompt ensures a coherent narrative, consistent tone, and adherence to specific poetic elements.

0%
Token Efficiency Gain
The optimized prompt explicitly defines the desired poetic form (quatrains, ABAB rhyme).
The optimized prompt outlines the content for each stanza before generation.
The optimized prompt encourages brainstorming core themes to enrich the poem.

Ready to stop burning tokens?

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

Optimize My Prompts