跳到正文
arXiv (AI + Vision + Imaging)· Anxo Perez, Jorge Gab\'in, Javier Parapar·· 6 天前AI 评分22

小样本的ROI:固定Token预算下如何优化上下文学习

The ROI of Small Examples: Optimizing In-Context Learning Under Token Budgets

AI 导读

研究在固定token预算下,把预算花在少量长示例还是更多短示例上更划算。在Beat the AI和Natural Questions两个QA基准、六款指令微调LLM上的实验显示,短示例通常是对prompt空间最有效的利用,该效应在Beat the AI上尤为明显,在NQ上增益较小且更早饱和。ANLI R3的推理实验也显示,两个较短分箱之一在六款模型中的五款上表现最佳。

正文 · 原文

arXiv:2611.24971v1 Announce Type: new 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. 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. 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. 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.

来源:arXiv (AI + Vision + Imaging) · arxiv.org