BatchPrompt: Accomplish more with less
Jianzhe Lin, Maurice Diesendruck, Liang Du, Robin Abraham
摘要
The ever-increasing token limits of large language models (LLMs) have enabled long context as input. Many LLMs are trained and fine-tuned to perform zero/fewshot inference using instruction-based prompts. Prompts typically include a detailed task instruction, several examples, and a single data point for inference. This baseline is referred to as "SinglePrompt" in this paper. In terms of token count, when the data input is small compared to instructions and examples, this results in lower token utilization, compared with encoder-based models like finetuned BERT. This cost inefficiency, affecting inference speed and compute budget, counteracts many of the benefits that LLMs offer. This paper aims to alleviate this problem by batching multiple data points in each prompt, a strategy we refer to as "BatchPrompt". We improve token utilization by increasing the "density" of data points, however, this cannot be done naively. Simple batching can degrade performance, especially as batch size increases, and data points can yield different answers depending on their position within a prompt. To address the quality issue while retaining high token utilization, we introduce Batch Permutation and Ensembling (BPE) for BatchPrompt -a simple majority vote over repeated permutations of data, that recovers label quality at the cost of more token usage. To counterbalance this cost, we further propose Self-reflection-guided EArly Stopping (SEAS), which can terminate the voting process early for data points that the LLM handles confidently. Our comprehensive experimental evaluation demonstrates that BPE + SEAS can boost the performance of BatchPrompt by a striking margin on a range of popular NLP tasks, including question answering (Boolq), textual entailment (RTE), and duplicate questions identification (QQP). This performance is even competitive with/higher than single-data prompting (SinglePrompt), while using far fewer LLM calls and input tokens. At batch size 32, our BatchPrompt + BPE + SEAS uses 15.7% the number of LLM calls, and achieves: Boolq accuracy 90.6% → 90.9% with 27.4% tokens, QQP accuracy 87.2% → 88.4% with 18.6% tokens, RTE accuracy 91.5% → 91.1% with 30.8% tokens. We hope our simple yet effective approach will shed light on the future research of large language models. Code: github.com/microsoft/BatchPrompt
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Language Models are Few-Shot Learners
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- ConPress: Learning Efficient Reasoning from Multi-Question Contextual Pressure 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Promptimizer: User-Led Prompt Optimization for Personal Content Classification 引用了 Large Language Model Cascades with Mixture of Thought Representations for Cost-Efficient Reasoning
- Promptimizer: User-Led Prompt Optimization for Personal Content Classification 引用了 Language Models are Few-Shot Learners
- Promptimizer: User-Led Prompt Optimization for Personal Content Classification 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- Large Language Model Cascades with Mixture of Thought Representations for Cost-Efficient Reasoning 引用了 Language Models are Few-Shot Learners
- Large Language Model Cascades with Mixture of Thought Representations for Cost-Efficient Reasoning 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Reflexion: language agents with verbal reinforcement learning 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- SEMA: A High-performance System for LLM-based Semantic Query Processing 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- Calibrate Before Use: Improving Few-shot Performance of Language Models 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper7
- Large Language Model Cascades with Mixture of Thought Representations for Cost-Efficient ReasoningMurong Yue, Jie Zhao, Min Zhang, Liang Du 等ICLR 2024 · 153 次引用
- SEMA: A High-performance System for LLM-based Semantic Query ProcessingKangkang Qi, Dongyang Xie, Wenbo Li, Hao Zhang 等VLDB 2026 · 5 次引用
- Generating Succinct Descriptions of Database Schemata for Cost-Efficient Prompting of Large Language ModelsImmanuel TrummerVLDB 2024 · 5 次引用
- ConPress: Learning Efficient Reasoning from Multi-Question Contextual PressureJie Deng, Shining Liang, Jun Li, Hongzhi Li 等ICML 2026 · 3 次引用
- Promptimizer: User-Led Prompt Optimization for Personal Content ClassificationLeijie Wang, Kathryn Yurechko, Amy X. ZhangCHI 2026 · 1 次引用
它引用的 Paper10
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan 等NeurIPS 2023 · 5,828 次引用
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran 等NeurIPS 2023 · 5,068 次引用
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein 等ICML 2021 · 1,843 次引用
相关 Paper
- Optimized Batch Prompting for Cost-effective LLMsZhaoxuan Ji, Xinlu Wang, Zhaojing Luo, Zhongle Xie 等VLDB 2025 · 5 次引用
- M-Ped: Multi-Prompt Ensemble Decoding for Large Language ModelsJiaxin Guo, Daimeng Wei, Yuanchang Luo, Hengchao Shang 等EMNLP Findings 2025
- Cost-Effective In-Context Learning for Entity Resolution: A Design Space ExplorationMeihao Fan, Xiaoyue Han, Ju Fan, Chengliang Chai 等ICDE 2024 · 40 次引用
- Ask Me Anything: A simple strategy for prompting language modelsSimran Arora, Avanika Narayan, Mayee F. Chen, Laurel J. Orr 等ICLR 2023 · 74 次引用
- Efficient Prompt Optimization Through the Lens of Best Arm IdentificationChengshuai Shi, Kun Yang, Zihan Chen, Jundong Li 等NeurIPS 2024 · 44 次引用
