<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jace Yu on Medium]]></title>
        <description><![CDATA[Stories by Jace Yu on Medium]]></description>
        <link>https://medium.com/@jace.yu?source=rss-559f0dc03d9b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*0JBPXzgY0indyEg1</url>
            <title>Stories by Jace Yu on Medium</title>
            <link>https://medium.com/@jace.yu?source=rss-559f0dc03d9b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 06:31:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jace.yu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bridging the Gap: How Engineers and PMs Ship Winning LLM Features Together]]></title>
            <link>https://medium.com/opus-engineering/bridging-the-gap-how-engineers-and-pms-ship-winning-llm-features-together-147a36ab4089?source=rss-559f0dc03d9b------2</link>
            <guid isPermaLink="false">https://medium.com/p/147a36ab4089</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[product-management]]></category>
            <dc:creator><![CDATA[Jace Yu]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 10:58:07 GMT</pubDate>
            <atom:updated>2025-09-15T10:58:07.920Z</atom:updated>
            <content:encoded><![CDATA[<h3>How Engineers and PMs Ship Winning LLM Features Faster: 3 Technical Decisions</h3><p><strong>TL;DR:</strong></p><ul><li><strong>Prompts belong in configs, not code: </strong>Enable rapid iteration without deployments</li><li><strong>Variables go last: </strong>Save 90% on costs through KV-cache optimization</li><li><strong>Separate semantics from schema</strong>: PMs own meaning, engineers own structure</li></ul><p>The best LLM features aren’t built in silos. When engineers and PMs at <strong>OpusClip</strong> started collaborating on prompt architecture, <strong>iteration cycles dropped from days to minutes</strong>, <strong>API costs fell by 10x</strong>, and <strong>prompts in production are more reliable</strong>. Here are the three technical decisions that made the biggest difference.</p><h3>PM to Prompt Distance</h3><p><strong>What it is:</strong> The number of hops — and the amount of interpretation — between your product requirement and the exact text/settings the model actually receives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zLLFbHw29DqVCOuTB7jkcQ.png" /><figcaption><a href="https://www.linkedin.com/posts/manus-im_product-to-prompt-distance-is-fast-becoming-activity-7349444736048320512-zjjS?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAACdAQCkBye_l2SHKxHq1FoCJdVQJdLz5Boc">Tao Zhang first defines this metric in Manus.</a></figcaption></figure><p>Here’s what typically happens:</p><ol><li><strong>PM writes</strong>: “The assistant should be professional but approachable”</li><li><strong>Spec translates</strong>: “Use formal language with occasional casual phrases”</li><li><strong>Engineer implements</strong>: “You are a professional assistant. Maintain formal tone while being friendly.”</li><li><strong>Runtime adds context</strong>: “You are a professional assistant. Maintain formal tone while being friendly. Current user: {user_name}. Previous context: {history}”</li></ol><p>Each step adds interpretation and delay.</p><p><strong>Why it matters:</strong></p><ul><li><strong>Speed of iteration.</strong> Fewer hops = faster experiments.</li><li><strong>Quality &amp; intent fidelity.</strong> Each handoff (PM → spec → UI copy → template → runtime prompt) adds interpretation risk.</li><li><strong>Observability.</strong> When prompts are hidden in code, it’s hard to debug.</li></ul><p><strong>How to reduce distance: </strong>Ask your engineer teammates to put prompts on dynamic configs, or a prompt management platform. Don’t put prompts on code.</p><h3>KV‑Cache</h3><p><strong>What it is:</strong> KV-Cache (Key-Value Cache) is like a smart notebook that lets LLMs remember their previous calculations. Without it, every time your chatbot generates a new word, it would need to re-read the entire conversation from scratch.</p><p>Imagine you’re having a conversation with a chatbot. Each time you send a new message, the chatbot needs to understand the entire conversation history to provide a relevant response. Without a KV-Cache, the model would have to re-read and re-process the whole conversation from the beginning every single time it generates a new word. This is incredibly inefficient and slow, leading to a frustratingly laggy user experience, especially with longer conversations or longer prompts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h8t0jEhBl2fpC89sKmjmxw.png" /></figure><p>KV-Cache has two major benefits:</p><ul><li><strong>Faster Response Times (Same response qualities but faster speeds):</strong> By avoiding redundant computations, the KV-Cache allows the LLM to generate responses much more quickly. For users, this means less waiting and a more fluid, natural interaction with your AI feature.</li><li><strong>Reduced Computational Costs (Same money but more users):</strong> Re-processing less data means using less computational power. This directly translates to lower operational costs for running your LLM, making your product more scalable.</li></ul><p><strong>Why PMs should care: </strong>modern LLM providers now charge 10x less for cached tokens than new tokens.</p><blockquote>For example, GPT-5 charges $1.25 for 1M input tokens, but it only charges $0.125 for 1M cached tokens.</blockquote><p><strong>How to leverage KV-cache: </strong>Always put variables at the end of your prompts.</p><p>❌ <strong>Bad prompt structure</strong> (minimal caching):</p><pre>User: {{user_name}}<br>Question: {{user_question}}<br>Conversation history: {{chat_history}}<br><br>You are a customer support agent for TechCorp.<br>Guidelines:<br>- Be empathetic and professional<br>- Check our knowledge base before answering<br>- Escalate billing issues to human agents<br>- Always verify account details first</pre><p>✅ <strong>Good prompt structure</strong> (maximum caching):</p><pre>You are a customer support agent for TechCorp.<br>Guidelines:<br>- Be empathetic and professional  <br>- Check our knowledge base before answering<br>- Escalate billing issues to human agents<br>- Always verify account details first<br><br>User: {{user_name}}<br>Question: {{user_question}}<br>Conversation history: {{chat_history}}Structured Output / Response Schema</pre><p>The static instructions get cached across all requests, while only the dynamic user content changes. For a support bot handling 10,000 daily conversations, this restructuring alone could save $200–300 or more per day.</p><h3>Structured Output / Response Schema</h3><p><strong>What it is:</strong> Instead of returning free‑form text, the model returns <strong>well‑formed JSON</strong>. You define a schema — fields, types, enums — and the model adheres to it.</p><p><strong>This is counterintuitive for many PMs: you don’t need to describe the format in your prompt at all.</strong></p><ul><li><strong>Structured output is an API-level feature</strong>, not a prompt trick. You turn it on <strong>in code</strong> by registering a schema/response format; then the runtime enforces it.</li><li><strong>Once it’s configured, don’t re-specify the format in the prompt.</strong> Tell the model <em>what</em> to fill, not <em>how to format</em> it.</li><li><strong>Consumer chatbot UIs (e.g., ChatGPT-style apps) generally don’t expose this.</strong> They’re optimized for human-readable text, not machine-parsable payloads.</li></ul><p><strong>We have to show some code here to explain it:</strong></p><pre>import OpenAI from &quot;openai&quot;<br>import { z } from &quot;zod&quot;<br>import { zodTextFormat } from &quot;openai/helpers/zod&quot;<br><br>// 1) Your schema stays in code (Zod)<br>const RelevancyItem = z.object({<br>  clipId: z.string(),<br>  relevant: z.boolean(),<br>  relevantReason: z.string(),<br>  advertisement: z.boolean(),<br>})<br>const RelevancyArray = z.array(RelevancyItem)<br>type Relevancy = z.infer&lt;typeof RelevancyArray&gt;<br><br>// 2) Build the semantics-only prompt (no format instructions)<br>const prompt = promptTemplate.join(&quot;\n&quot;).replace(INPUT_REPLACE, input)<br><br>const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY })<br><br>// 3) Call Responses API and let the helper parse &amp; validate for you<br>const response = await openai.responses.parse({<br>  model: &quot;gpt-4o-mini&quot;,<br>  input: [<br>    { role: &quot;system&quot;, content: &quot;Judge search-trend relevancy using the definitions provided.&quot; },<br>    { role: &quot;user&quot;, content: prompt },<br>  ],<br>  text: {<br>    // zodTextFormat drives structured output and runtime validation<br>    format: zodTextFormat(RelevancyArray, &quot;relevancy_results&quot;),<br>  },<br>})<br><br>// 4) Already parsed &amp; validated:<br>const results: Relevancy = response.output_parsed<br><br>// 5) Same post-filtering<br>const relatedResults = results.filter(<br>  (r) =&gt; r.relevant &amp;&amp; r.evergreen &amp;&amp; !r.advertisement<br>)</pre><p><strong>⚠️ Conflict Notice (VERY IMPORTANT)</strong></p><p>Once a <strong>schema/responseFormat</strong> is set in code, <strong>do not describe output formatting in the prompt</strong>. Mixing prompt-format rules with the engineer-defined schema creates two sources of truth and measurably hurts reliability:</p><ul><li><strong>Validation failures &amp; retries</strong> → higher latency/cost; occasional data loss if coerced.</li><li><strong>Instruction dilution</strong> → worse task quality (model juggles format vs. content).</li><li><strong>Downstream breakage</strong> → typed logic fails on “pretty” but invalid payloads.</li></ul><p><strong>Please remember:</strong> <em>Schema owns format; prompt owns semantics. </em>Keep prompts about what each field should contain (definitions, decision rules), <strong>not</strong> how to format.</p><p>❌ <strong>Your prompt should NOT say</strong>:</p><pre>Analyze these search results and return a JSON object with:<br>- videoId: the video identifier<br>- isRelevant: boolean indicating if it matches<br>- relevanceReason: explanation string<br>- isPaid: boolean for sponsored content<br>Format as valid JSON with these exact field names.</pre><p>✅ <strong>Your prompt SHOULD say</strong>:</p><pre>Analyze these search results for relevance to the user&#39;s query.<br><br>For relevance assessment:<br>- Consider semantic match, not just keyword overlap<br>- Educational content is preferred over entertainment<br>- Recent content (last 6 months) is more relevant<br><br>For paid content detection:<br>- Look for &quot;Sponsored&quot;, &quot;Ad&quot;, or &quot;#ad&quot; markers<br>- Check if the channel name includes &quot;Official&quot; or &quot;Brand&quot;<br><br>Provide clear reasoning for why content is or isn&#39;t relevant.</pre><p>Notice: all semantics, zero formatting. The schema handles structure; your prompt handles meaning.</p><p>One worth-to-mention common pitfall that PMs to avoid: changing field names in prompts without coordinating with engineering. If your engineer’s schema says videoId but your prompt mentions video_id or clip_id, you&#39;re creating confusion that degrades performance.</p><h3>Putting It All Together</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCAC6ywG17E1WbUqvhuZRg.png" /></figure><ol><li><strong>Low pm to prompt distance</strong> lets you iterate quickly on prompt improvements</li><li><strong>Optimized KV-cache</strong> makes those iterations cheaper to test at scale</li><li><strong>Proper structured output</strong> ensures reliable, parseable responses regardless of prompt changes</li></ol><h3>Next Steps</h3><ol><li><strong>Audit your current setup</strong>: Where do your prompts live? Are variables at the end? Are you mixing format and content instructions?</li><li><strong>Start one conversation</strong>: Pick the highest-impact improvement and discuss with your engineering team. Most engineers appreciate PMs who understand these constraints.</li><li><strong>Measure the impact</strong>: Track iteration speed, cost per request, and error rates before and after changes.</li></ol><p><strong>Questions?</strong> Drop them in the comments. Our team loves talking about efficient engineering &amp; pm collaborations.</p><h3>Join Our Team</h3><p>If these practical takeaways resonate with you and you’re passionate about solving complex technical challenges at scale, we’d love to hear from you.</p><p>Check out our open positions: <a href="https://www.opus.pro/careers">opus.pro/careers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=147a36ab4089" width="1" height="1" alt=""><hr><p><a href="https://medium.com/opus-engineering/bridging-the-gap-how-engineers-and-pms-ship-winning-llm-features-together-147a36ab4089">Bridging the Gap: How Engineers and PMs Ship Winning LLM Features Together</a> was originally published in <a href="https://medium.com/opus-engineering">OpusClip AI Engineering &amp; Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>