<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>输出长度 on AI 观察</title><link>https://ai.wujiong.cc/tags/%E8%BE%93%E5%87%BA%E9%95%BF%E5%BA%A6/</link><description>Recent content in 输出长度 on AI 观察</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Mon, 19 Oct 2026 14:33:00 +0800</lastBuildDate><atom:link href="https://ai.wujiong.cc/tags/%E8%BE%93%E5%87%BA%E9%95%BF%E5%BA%A6/index.xml" rel="self" type="application/rss+xml"/><item><title>控制 AI 输出长度的五种写法：字数、结构与硬截断怎么选</title><link>https://ai.wujiong.cc/posts/2026-10-19-ai-prompt-length-control-patterns/</link><pubDate>Mon, 19 Oct 2026 14:33:00 +0800</pubDate><guid>https://ai.wujiong.cc/posts/2026-10-19-ai-prompt-length-control-patterns/</guid><description>&lt;p&gt;&lt;strong&gt;控长不是越严越好，而是选对约束类型：要可读摘要用字数，要清单用条目数，要固定字段用结构模板。&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id="何时该控长"&gt;何时该控长&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;要贴进短信、工单备注、幻灯片讲者注释&lt;/li&gt;
&lt;li&gt;模型爱写开场白和总结腔&lt;/li&gt;
&lt;li&gt;你已经有下游解析，多余段落会破坏格式&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="五种写法"&gt;五种写法&lt;/h2&gt;
&lt;h3 id="1-硬字数字符上限"&gt;1. 硬字数/字符上限&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;全文不超过 120 字；超出则删例子，保留结论。
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;适合短通知。若模型仍超长，可加「先写草稿再自行删到上限，只输出终稿」。&lt;/p&gt;</description></item></channel></rss>