Prompt Design at Scale: How Format, Instruction Count, and Context Length Shape Instruction Adherence and Hallucination in Large Language Models
作者: Netanel Eliav
分类: cs.CL, cs.AI
发布日期: 2026-07-21
备注: 21 pages, 6 figures. Code and data: https://github.com/iNetanel/veyrabench
🔗 代码/项目: GITHUB
💡 一句话要点
提出大规模提示设计方法以优化指令遵循与模型记忆
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 提示设计 自然语言处理 模型遵循 上下文长度 实验研究 指令数量 合成语料库
📋 核心要点
- 现有提示设计缺乏系统的实证研究,导致设计决策的有效性不确定。
- 论文通过控制实验探讨提示格式、指令数量和上下文长度对模型表现的影响。
- 实验结果显示,指令数量过多会导致遵循率下降,而上下文长度影响回忆准确性和拒绝回答的比例。
📝 摘要(中文)
本研究探讨了提示设计中的三个关键决策:指令和上下文的格式、系统提示的指令数量以及模型可持有的上下文长度。通过在一个无污染的合成语料库上进行的两项控制实验,研究发现随着指令数量的增加,模型的遵循率显著下降,而上下文长度的增加则影响了模型的回忆准确性和回答拒绝率。实验结果为提示设计提供了实证依据,并发布了相关工具和数据集。
🔬 方法详解
问题定义:本研究旨在解决提示设计中缺乏实证依据的问题,特别是指令格式、数量和上下文长度对模型性能的影响。现有方法未能系统评估这些因素的相互作用及其对模型输出的影响。
核心思路:通过设计控制实验,系统地评估不同提示格式、指令数量和上下文长度对模型指令遵循和记忆准确性的影响,从而为提示设计提供科学依据。
技术框架:研究包含两个主要实验。实验一评估指令数量对遵循率的影响,实验二则考察上下文长度对回忆准确性和回答拒绝率的影响。每个实验在多个模型上进行,确保结果的广泛适用性。
关键创新:本研究的创新在于系统地交叉评估多个提示设计因素,揭示了指令数量和上下文长度对模型性能的复杂影响,尤其是在遵循率和拒绝回答方面的显著变化。
关键设计:实验中使用了多种提示格式(如Markdown、纯文本等),并设置了不同的指令数量和上下文长度。实验结果显示,指令数量超过80时,模型的完美响应率迅速下降,而上下文长度的增加则导致拒绝回答的比例显著上升。
🖼️ 关键图片
📊 实验亮点
实验结果表明,随着指令数量的增加,模型的完美响应率在80条指令时降至零,而在上下文长度达到64-128k tokens时,回忆准确性显著下降,拒绝回答的比例可高达90%。这些发现为提示设计提供了重要的实证依据。
🎯 应用场景
该研究的结果对自然语言处理领域的提示设计具有重要的指导意义,尤其是在构建高效的对话系统和智能助手时。通过优化提示格式和结构,可以提高模型的指令遵循率和信息回忆能力,进而提升用户体验和系统性能。未来,研究成果可应用于更复杂的多模态交互系统中。
📄 摘要(原文)
Practitioners make three prompt-design decisions with almost no controlled evidence behind them: how to format instructions and context (markdown, plain text, prose, or tabular), how many simultaneous instructions a system prompt can carry before compliance degrades, and how much context a model can hold before recall and honesty degrade. We report two controlled experiments crossing all three factors on one held, contamination-free synthetic corpus (the "Book of Veyra," 8,780 uniquely-named entities, deterministically regenerable from a fixed seed), evaluated across five models. Experiment 1 (960 calls/model) measures instruction-following decay as rule count N grows from 10 to 160, crossed with four formats and system-prompt vs. user-turn placement. Perfect-response rate collapses to zero by N=80 for every model, format, and placement. Placement produces effects at least as large as format at N=160 in most models, but the direction is model-specific. No model shows a reliable markdown advantage; one 35B model favors plain text instead. Experiment 2 (5,520 calls/model) measures recall accuracy, false-premise sycophancy, and absent-fact fabrication across a 2k-to-512k-token context ladder in the same four formats. Recall stays near ceiling through 64-128k tokens, then degrades sharply and format-dependently: one model's accuracy spread reaches 48 points at 128k tokens. Fabrication never occurs (0/5,760 probes), and sycophancy stays negligible (<=8.3%). What rises sharply near each model's context ceiling is outright refusal to answer (0% to 79-90%), distinct from sycophancy or fabrication. Neither pre-registered format ordering holds, and token overhead (+22% to +37% over plain text) further changes which format is preferable where accuracy spread is genuine. We release the full harness, corpus generator, and raw results (VeyraBench): https://github.com/iNetanel/veyrabench