The ROI of Small Examples: Optimizing In-Context Learning Under Token Budgets
Computer Science > Computation and Language arXiv:2611.24971 (cs) [Submitted on 16 Nov 2026] Title: The ROI of Small Examples: Optimizing In-Context Learning Under Token Budgets Authors: Anxo Perez, Jorge Gabín, Javier Parapar.
计算机科学 > 计算与语言 arXiv:2611.24971 (cs) [提交于 2026 年 11 月 16 日] 标题:小样本的投资回报率:在 Token 预算下优化上下文学习 作者:Anxo Perez, Jorge Gabín, Javier Parapar。
Abstract: In-context learning (ICL) improves large language model performance at inference time without updating model parameters. However, these gains are not free: in practical deployments, longer prompts directly increase inference cost and latency. Under a fixed token budget, prompt construction therefore becomes a resource-allocation problem.
摘要:上下文学习(ICL)可以在不更新模型参数的情况下提高大型语言模型在推理时的性能。然而,这些收益并非免费:在实际部署中,更长的提示词会直接增加推理成本和延迟。因此,在固定的 Token 预算下,提示词构建成为一个资源分配问题。
While prior work has often focused on how many examples to include in ICL, we study the complementary question of whether the available budget is better spent on a few long demonstrations or on a larger number of shorter ones. We study this aspect in question answering (QA), by organizing candidate demonstrations into length-based bins and constructing prompts from examples within the same length range under fixed budgets.
虽然以往的研究通常关注 ICL 中应包含多少个示例,但我们研究了一个互补的问题:现有的预算是应该用于少数几个长演示,还是用于更多数量的短演示。我们在问答(QA)任务中研究了这一方面,通过将候选演示按长度分类,并在固定预算下使用相同长度范围内的示例构建提示词。
Experiments on two QA benchmarks (\textit{Beat the AI} and \textit{Natural Questions}), using six instruction-tuned LLMs, show that shorter demonstrations are generally the most effective use of prompt space. This effect is especially strong on \textit{Beat the AI}, and remains visible on NQ, although gains are smaller and saturate earlier in the long-context setting.
在两个问答基准测试(\textit{Beat the AI} 和 \textit{Natural Questions})上,使用六个经过指令微调的 LLM 进行的实验表明,较短的演示通常是提示词空间最有效的利用方式。这种效果在 \textit{Beat the AI} 上尤为显著,在 NQ 上也依然可见,尽管在长上下文设置中收益较小且更早达到饱和。
An additional natural language inference experiment on ANLI R3 finds that one of the two shorter bins performs best for five of six models, although longer demonstrations remain competitive. Overall, our results highlight demonstration granularity as an important factor in prompt design.
在 ANLI R3 上进行的额外自然语言推理实验发现,对于六个模型中的五个,两个较短的分类区间之一表现最好,尽管较长的演示仍然具有竞争力。总的来说,我们的结果强调了演示粒度是提示词设计中的一个重要因素。