<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: yaya806798160-ai</title>
    <description>The latest articles on DEV Community by yaya806798160-ai (@yaya806798160ai).</description>
    <link>https://dev.to/yaya806798160ai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4192472%2F36435465-add9-4b22-a35d-a6c62828a57b.png</url>
      <title>DEV Community: yaya806798160-ai</title>
      <link>https://dev.to/yaya806798160ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yaya806798160ai"/>
    <language>en</language>
    <item>
      <title>The 5-section prompt framework that finally made my LLM output "ship it" instead of "almost right"</title>
      <dc:creator>yaya806798160-ai</dc:creator>
      <pubDate>Sun, 18 Oct 2026 17:07:15 +0000</pubDate>
      <link>https://dev.to/yaya806798160ai/the-5-section-prompt-framework-that-finally-made-my-llm-output-ship-it-instead-of-almost-right-4d1d</link>
      <guid>https://dev.to/yaya806798160ai/the-5-section-prompt-framework-that-finally-made-my-llm-output-ship-it-instead-of-almost-right-4d1d</guid>
      <description>&lt;p&gt;Most "prompt engineering tips" articles are useless. They say "be specific" without showing you HOW.&lt;/p&gt;

&lt;p&gt;Here is the template I now use for every serious prompt. It has five sections, and each one exists because leaving it out causes a specific, predictable failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 5-Section Structure
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Role]
You are a {role} with {years} years of experience in {domain}.

[Context]
Working on {project}. Target audience: {audience}.
Goal: {goal}.

[Output Schema]
Return a JSON object with fields:
- {field1}: {description}
- {field2}: {description}

[Constraints]
- Length: {n} words max
- Tone: {tone}
- Must include: {items}
- Avoid: {forbidden}

[Examples]
Input: {example_input}
Output: {example_output}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Real Example: Writing a Product Intro
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Without the framework:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Write a product intro for my SaaS.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output (GPT, no framework):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Welcome to AcmeCloud, the leading cloud management platform
that helps businesses streamline their operations. Our
cutting-edge solution offers a wide range of features
designed to meet your needs...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generic. Useless. Could be any SaaS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With the framework:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Role]
You are a B2B SaaS marketer with 10 years experience
writing for ops directors at 200-person companies.

[Context]
Product: AcmeCloud (Kubernetes cost optimization)
Audience: Ops directors at Series B SaaS companies
Goal: Generate qualified demo bookings

[Output Schema]
Return JSON with: headline (10 words max),
subheadline (20 words max), 3 bullet benefits
(15 words each), CTA button text (3 words)

[Constraints]
- Tone: confident but not salesy
- Must include: 1 specific number (cost savings %),
  1 specific time saving (hours/week)
- Avoid: "leverage", "synergy", "revolutionize"

[Examples]
Good headline: "Cut your K8s bill by 40% in 30 days"
Bad headline: "Unlock the power of cloud optimization"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output (GPT, with framework):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"headline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Cut your K8s bill by 40% in 30 days"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"subheadline"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AcmeCloud auto-rightsizes your clusters. Ops teams save 12 hrs/week."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"bullets"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Average customer saves $18k/year"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"Setup takes 15 minutes, no code required"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"SOC 2 compliant, no data leaves your VPC"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cta"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"See your savings"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same model, same product, vastly different output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Role gives the model a "persona"&lt;/strong&gt; to write from, which calibrates tone and vocabulary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output Schema forces structured thinking&lt;/strong&gt; — the model can't ramble when it has to fill fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Constraints prevent common failure modes&lt;/strong&gt; — banning "leverage" eliminates 80% of corporate-speak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Examples anchor the quality bar&lt;/strong&gt; — one good example beats ten rules.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  I Built a Tool That Does This Automatically
&lt;/h2&gt;

&lt;p&gt;I got tired of writing this scaffolding manually, so I built &lt;a href="https://promptopt.promptopt.workers.dev/en?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=framework-launch" rel="noopener noreferrer"&gt;PromptOpt&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Paste a rough idea. Get back a structured prompt in this exact format. Feed it to any LLM. Free tier includes 10 optimizations, no card required.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;Pick a recent prompt you wrote. Add the 5 sections above. Re-run it on the same model. The output difference is usually dramatic.&lt;/p&gt;

&lt;p&gt;What's your "always include" section that I missed?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>promptengineering</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
