Lune

ACL2025顶会

Why Prompt Design Matters and Works: A Complexity Analysis of Prompt Search Space in LLMs

Xiang Zhang, Juntai Cao, Chenyu You, Dujian Ding

摘要

Despite the remarkable successes of large language models (LLMs), the underlying Transformer architecture has inherent limitations in handling complex reasoning tasks. Chain-of-thought (CoT) prompting has emerged as a practical workaround, but most CoT-based methods rely on a single, generic prompt such as"think step by step", with no task-specific adaptation. These approaches expect the model to discover an effective reasoning path on its own, forcing it to search through a vast prompt space. In contrast, several studies have explored task-specific prompt designs to boost performance. However, these designs are typically developed through trial and error, lacking theoretical grounding. As a result, prompt engineering remains largely ad hoc and unguided. In this paper, we provide a theoretical framework that explains why some prompts succeed while others fail. We show that prompts function as selectors, extracting task-relevant information from the model's full hidden state during CoT reasoning. Each prompt defines a unique trajectory through the answer space, and the choice of trajectory is crucial for task performance and future navigation within the space. We analyze the complexity of finding optimal prompts and characterize the size of the prompt space for a given task. Our theory reveals principles behind effective prompt design and shows that naive CoT-using self-guided prompts like"think step by step"-can severely hinder performance. Through experiments, we show that optimal prompt search can lead to more than a 50% improvement on reasoning tasks, providing a theoretical foundation for prompt engineering.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Large Language Models are Zero-Shot Reasoners 引用了 AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
  • Graph of Thoughts: Solving Elaborate Problems with Large Language Models 引用了 Tree of Thoughts: Deliberate Problem Solving with Large Language Models
  • When LLMs Develop Languages: Symbolic Communication for Efficient Multi-Agent Reasoning 引用了 Tree of Thoughts: Deliberate Problem Solving with Large Language Models
  • When LLMs Develop Languages: Symbolic Communication for Efficient Multi-Agent Reasoning 引用了 Graph of Thoughts: Solving Elaborate Problems with Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Retrieval is Not Enough: Enhancing RAG through Test-Time Critique and OptimizationJiaqi Wei, Hao Zhou, Xiang Zhang, Di Zhang 等NeurIPS 2025 · 14 次引用
  2. Bidirectional Representations Augmented Autoregressive Biological Sequence GenerationXiang Zhang, Jiaqi Wei, Zijie Qiu, Sheng Xu 等NeurIPS 2025
  3. When LLMs Develop Languages: Symbolic Communication for Efficient Multi-Agent ReasoningZhengqi Pei, Qingming Huang, Shuhui WangICML 2026

它引用的 Paper17

  1. Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo 等NeurIPS 2022 · 8,168 次引用
  2. Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran 等NeurIPS 2023 · 5,068 次引用
  3. Graph of Thoughts: Solving Elaborate Problems with Large Language ModelsMaciej Besta, Nils Blach, Ales Kubicek, Robert Gerstenberger 等AAAI 2024 · 1,292 次引用
  4. AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace 等EMNLP 2020 · 1,162 次引用
  5. Faith and Fate: Limits of Transformers on CompositionalityNouha Dziri, Ximing Lu, Melanie Sclar, Xiang Lorraine Li 等NeurIPS 2023 · 728 次引用

相关 Paper

  1. Towards Revealing the Mystery behind Chain of Thought: A Theoretical PerspectiveGuhao Feng, Bohang Zhang, Yuntian Gu, Haotian Ye 等NeurIPS 2023 · 470 次引用
  2. Transformers Learn to Implement Multi-step Gradient Descent with Chain of ThoughtJianhao Huang, Zixuan Wang, Jason D. LeeICLR 2025
  3. Unveiling Factual Recall Behaviors of Large Language Models through Knowledge NeuronsYifei Wang, Yuheng Chen, Wanting Wen, Yu Sheng 等EMNLP 2024 · 3 次引用
  4. Chain of Thoughtlessness? An Analysis of CoT in PlanningKaya Stechly, Karthik Valmeekam, Subbarao KambhampatiNeurIPS 2024 · 156 次引用
  5. The Impact of Reasoning Step Length on Large Language ModelsMingyu Jin, Qinkai Yu, Dong Shu, Haiyan Zhao 等ACL Findings 2024 · 39 次引用
黄昏的海面,两侧是细线勾勒的悬崖