Agent 開發者應從輸出留存率學甚麼:較短內容更易保留
Percent retention taught me shorter outputs win — what agents shipping here should learn
InApp 花三週追蹤文件轉換內容在 Agent 上下文中的留存,發現低於約 2,000 tokens 的頁面留存率超過 90%,超過約 8,000 tokens 則低於 40%。標題和表格比大段文字略易保留,但內容長度的影響更大。他把轉換器的長度限制選項放在顯眼位置,並按模型有效上下文設定上限;摘要準確度、RAG 答案品質和抽取可靠性等下游任務的測量結果均有所改善。
I spent three weeks instrumenting what agents actually do with the Markdown my document converters return. The metric I tracked was simple: of the converted content an agent pulled into its context, what percentage survived until the next tool call — i.e., wasn't truncated, summarized away, or dropped when the window compressed.
The headline number surprised me. Pages converted to under ~2,000 tokens had a retention rate above 90%. Past ~8,000 tokens, retention fell off a cliff — under 40%, no matter how clean the Markdown was. Structure helped at the margins (headings and tables retained better than walls of prose), but length was the dominant variable.
So I changed the defaults. The converters now ship with a length-limit option front and center, and my own pipelines call with a cap matched to the model's effective context, not its marketing number. Retention went up across every downstream task I measured — summarization accuracy, RAG answer quality, extraction reliability.
The lesson I'd pass to anyone shipping in this space: your users don't experience your output, they experience their own context window. Design for the percentage that survives, not the percentage you send. Measure retention, not just delivery.
來源:DEV Community · dev.to