Why Prompt Design Matters and Works: A Complexity Analysis of Prompt Search Space in LLMs
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 29 papers in the map (data through 7 Oct 2026). Builds on 29 of its 48 references that are in the map. First posted on arXiv 13 Mar 2025.
Builds on
29 of 48 references.
References · 29
- 2017Attention Is All You Needcited by 59,932
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2022RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learningcited by 361
- 2022A Systematic Evaluation of Large Language Models of Codecited by 360
- 2024ReST-MCTS*: LLM Self-Training via Process Reward Guided Tree Searchcited by 338
- 2016On the Expressive Power of Deep Neural Networkscited by 302
- 2023Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspectivecited by 293
- 2023Physics of Language Models: Part 3.1, Knowledge Storage and Extractioncited by 264
- 2024Chain of Thought Empowers Transformers to Solve Inherently Serial Problemscited by 256
- 2019Depth-Adaptive Transformercited by 227
17 more
- 2022Neural Networks and the Chomsky Hierarchycited by 214
- 2024Tokenization counts: the impact of tokenization on arithmetic in frontier LLMscited by 112
- 2024Physics of Language Models: Part 2.1, Grade-School Math and the Hidden Reasoning Processcited by 107
- 2023Don't Trust ChatGPT when Your Question is not in English: A Study of Multilingual Abilities and Types of LLMscited by 103
- 2024Transformers, parallel computation, and logarithmic depthcited by 75
- 2022NUWA-Infinity: Autoregressive over Autoregressive Generation for Infinite Visual Synthesiscited by 71
- 2020Towards Data Distillation for End-to-end Spoken Conversational Question Answeringcited by 34
- 2020Knowledge Distillation for Improved Accuracy in Spoken Question Answeringcited by 31
- 2024Calibrating Multi-modal Representations: A Pursuit of Group Robustness without Annotationscited by 30
- 2020Contextualized Attention-based Knowledge Transfer for Spoken Conversational Question Answeringcited by 26
- 2024Language Models Need Inductive Biases to Count Inductivelycited by 25
- 2025Beyond Matryoshka: Revisiting Sparse Coding for Adaptive Representationcited by 25
- 2022Aligning Source Visual and Target Language Domains for Unpaired Video Captioningcited by 14
- 2022A Character-Level Length-Control Algorithm for Non-Autoregressive Sentence Summarizationcited by 13
- 2025Multi2: Multi-Agent Test-Time Scalable Framework for Multi-Document Processingcited by 12
- 2021Weakly-guided Self-supervised Pretraining for Temporal Activity Detectioncited by 5
- 2021Black-Box Diagnosis and Calibration on GAN Intra-Mode Collapse: A Pilot Studycited by 3
Built on by
Citing papers per year: 2025: 16; 2026: 13.
29 papers.
Sort:
By area:
- 2025From AI for Science to Agentic Science: A Survey on Autonomous Scientific Discoverycited by 74
- 2025Semantic-Aware Logical Reasoning via a Semiotic Frameworkcited by 32
- 2025The Curse of CoT: On the Limitations of Chain-of-Thought in In-Context Learningcited by 30
- 2025TimeSeriesScientist: A General-Purpose AI Agent for Time Series Analysiscited by 18
- 2025Tokenization Constraints in LLMs: A Study of Symbolic and Arithmetic Reasoning Limitscited by 9
- 2025PosterGen: Aesthetic-Aware Multi-Modal Paper-to-Poster Generation via Multi-Agent LLMscited by 8
- 2025Retrieval is Not Enough: Enhancing RAG Reasoning through Test-Time Critique and Optimizationcited by 5
- 2025Universal Biological Sequence Reranking for Improved De Novo Peptide Sequencingcited by 5
- 2025Seeing Sarcasm Through Different Eyes: Analyzing Multimodal Sarcasm Perception in Large Vision-Language Modelscited by 4
- 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Modelscited by 4
- 2026FORESTLLM: Large Language Models Make Random Forest Great on Few-shot Tabular Learningcited by 4
- 2026The End of Reward Engineering: How LLMs Are Redefining Multi-Agent Coordinationcited by 3
17 more
- 2026Confusion-Aware Rubric Optimization for LLM-based Automated Gradingcited by 3
- 2025Bidirectional Representations Augmented Autoregressive Biological Sequence Generationcited by 1
- 2025When Retrieval Succeeds and Fails: Rethinking Retrieval-Augmented Generation for LLMscited by 1
- 2025Towards Accurate UAV Image Perception: Guiding Vision-Language Models with Stronger Task Promptscited by 1
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Codecited by 1
- 2026Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMscited by 1
- 2026Semiotic logical hexagon theory for LLM logical reasoningcited by 1
- 2025TORSO: Template-Oriented Reasoning Towards General Taskscited by 0
- 2025Reasoning with Preference Constraints: A Benchmark for Language Models in Many-to-One Matching Marketscited by 0
- 2025Reasoning About Reasoning: Towards Informed and Reflective Use of LLM Reasoning in HCIcited by 0
- 2026SGG-Rrm 3: From Next-Token Prediction to End-to-End Unbiased Scene Graph Generationcited by 0
- 2026Combating Data Laundering in LLM Trainingcited by 0
- 2026When LLMs Develop Languages: Symbolic Communication for Efficient Multi-Agent Reasoningcited by 0
- 2026Cognivia: A Cognitive Behavioral Therapy Copilot for Evidence-Based Mental Healthcarecited by 0
- 2026SurveyAgent-HKA: A multi-agent framework for scientific survey generation with LLMs and human knowledge augmentationcited by 0
- 2026LLJ Cards: Best practices for the Use of LLMs as Judgescited by 0
- 2026Agent Memory with Episodic Retrieval for Financial Decision-Makingcited by 0
- 2026Agent Memory with Episodic Retrieval for Financial Decision-Making23 Sep 2026
- 2026LLJ Cards: Best practices for the Use of LLMs as Judges21 Sep 2026
- 2026SurveyAgent-HKA: A multi-agent framework for scientific survey generation with LLMs and human knowledge augmentation5 Sep 2026
- 2026Cognivia: A Cognitive Behavioral Therapy Copilot for Evidence-Based Mental Healthcare28 Jul 2026
- 2026Semiotic logical hexagon theory for LLM logical reasoning24 Jul 2026
- 2026Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMs7 Jul 2026
- 2026When LLMs Develop Languages: Symbolic Communication for Efficient Multi-Agent Reasoning28 Jun 2026
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code13 May 2026
- 2026Combating Data Laundering in LLM Training2 Apr 2026
- 2026SGG-Rrm 3: From Next-Token Prediction to End-to-End Unbiased Scene Graph Generation9 Mar 2026
- 2026Confusion-Aware Rubric Optimization for LLM-based Automated Grading28 Feb 2026
- 2026FORESTLLM: Large Language Models Make Random Forest Great on Few-shot Tabular Learning16 Jan 2026
17 more
- 2026The End of Reward Engineering: How LLMs Are Redefining Multi-Agent Coordination13 Jan 2026
- 2025Towards Accurate UAV Image Perception: Guiding Vision-Language Models with Stronger Task Prompts8 Dec 2025
- 2025Reasoning About Reasoning: Towards Informed and Reflective Use of LLM Reasoning in HCI27 Oct 2025
- 2025When Retrieval Succeeds and Fails: Rethinking Retrieval-Augmented Generation for LLMs10 Oct 2025
- 2025Bidirectional Representations Augmented Autoregressive Biological Sequence Generation9 Oct 2025
- 2025TimeSeriesScientist: A General-Purpose AI Agent for Time Series Analysis2 Oct 2025
- 2025Semantic-Aware Logical Reasoning via a Semiotic Framework29 Sep 2025
- 2025Reasoning with Preference Constraints: A Benchmark for Language Models in Many-to-One Matching Markets16 Sep 2025
- 2025TORSO: Template-Oriented Reasoning Towards General Tasks11 Sep 2025
- 2025PosterGen: Aesthetic-Aware Multi-Modal Paper-to-Poster Generation via Multi-Agent LLMs24 Aug 2025
- 2025From AI for Science to Agentic Science: A Survey on Autonomous Scientific Discovery18 Aug 2025
- 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Models5 Aug 2025
- 2025Universal Biological Sequence Reranking for Improved De Novo Peptide Sequencing23 May 2025
- 2025Tokenization Constraints in LLMs: A Study of Symbolic and Arithmetic Reasoning Limits20 May 2025
- 2025Retrieval is Not Enough: Enhancing RAG Reasoning through Test-Time Critique and Optimization21 Apr 2025
- 2025The Curse of CoT: On the Limitations of Chain-of-Thought in In-Context Learning7 Apr 2025
- 2025Seeing Sarcasm Through Different Eyes: Analyzing Multimodal Sarcasm Perception in Large Vision-Language Models15 Mar 2025
- 2025Semantic-Aware Logical Reasoning via a Semiotic Frameworkcited by 32
- 2025The Curse of CoT: On the Limitations of Chain-of-Thought in In-Context Learningcited by 30
- 2025Tokenization Constraints in LLMs: A Study of Symbolic and Arithmetic Reasoning Limitscited by 9
- 2025Retrieval is Not Enough: Enhancing RAG Reasoning through Test-Time Critique and Optimizationcited by 5
- 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Modelscited by 4
- 2025When Retrieval Succeeds and Fails: Rethinking Retrieval-Augmented Generation for LLMscited by 1
- 2026Semiotic logical hexagon theory for LLM logical reasoningcited by 1
- 2025TORSO: Template-Oriented Reasoning Towards General Taskscited by 0
- 2025Reasoning with Preference Constraints: A Benchmark for Language Models in Many-to-One Matching Marketscited by 0
- 2025Reasoning About Reasoning: Towards Informed and Reflective Use of LLM Reasoning in HCIcited by 0
- 2026When LLMs Develop Languages: Symbolic Communication for Efficient Multi-Agent Reasoningcited by 0
- 2026Semiotic logical hexagon theory for LLM logical reasoning24 Jul 2026
- 2026When LLMs Develop Languages: Symbolic Communication for Efficient Multi-Agent Reasoning28 Jun 2026
- 2025Reasoning About Reasoning: Towards Informed and Reflective Use of LLM Reasoning in HCI27 Oct 2025
- 2025When Retrieval Succeeds and Fails: Rethinking Retrieval-Augmented Generation for LLMs10 Oct 2025
- 2025Semantic-Aware Logical Reasoning via a Semiotic Framework29 Sep 2025
- 2025Reasoning with Preference Constraints: A Benchmark for Language Models in Many-to-One Matching Markets16 Sep 2025
- 2025TORSO: Template-Oriented Reasoning Towards General Tasks11 Sep 2025
- 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Models5 Aug 2025
- 2025Tokenization Constraints in LLMs: A Study of Symbolic and Arithmetic Reasoning Limits20 May 2025
- 2025Retrieval is Not Enough: Enhancing RAG Reasoning through Test-Time Critique and Optimization21 Apr 2025
- 2025The Curse of CoT: On the Limitations of Chain-of-Thought in In-Context Learning7 Apr 2025
- 2025From AI for Science to Agentic Science: A Survey on Autonomous Scientific Discoverycited by 74
- 2025TimeSeriesScientist: A General-Purpose AI Agent for Time Series Analysiscited by 18
- 2025PosterGen: Aesthetic-Aware Multi-Modal Paper-to-Poster Generation via Multi-Agent LLMscited by 8
- 2026The End of Reward Engineering: How LLMs Are Redefining Multi-Agent Coordinationcited by 3
- 2026SurveyAgent-HKA: A multi-agent framework for scientific survey generation with LLMs and human knowledge augmentationcited by 0
- 2026Agent Memory with Episodic Retrieval for Financial Decision-Makingcited by 0
- 2026Agent Memory with Episodic Retrieval for Financial Decision-Making23 Sep 2026
- 2026SurveyAgent-HKA: A multi-agent framework for scientific survey generation with LLMs and human knowledge augmentation5 Sep 2026
- 2026The End of Reward Engineering: How LLMs Are Redefining Multi-Agent Coordination13 Jan 2026
- 2025TimeSeriesScientist: A General-Purpose AI Agent for Time Series Analysis2 Oct 2025
- 2025PosterGen: Aesthetic-Aware Multi-Modal Paper-to-Poster Generation via Multi-Agent LLMs24 Aug 2025
- 2025From AI for Science to Agentic Science: A Survey on Autonomous Scientific Discovery18 Aug 2025
- 2025Universal Biological Sequence Reranking for Improved De Novo Peptide Sequencingcited by 5
- 2026FORESTLLM: Large Language Models Make Random Forest Great on Few-shot Tabular Learningcited by 4
- 2026Confusion-Aware Rubric Optimization for LLM-based Automated Gradingcited by 3
- 2025Bidirectional Representations Augmented Autoregressive Biological Sequence Generationcited by 1
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Codecited by 1
- 2026Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMscited by 1
- 2026SGG-Rrm 3: From Next-Token Prediction to End-to-End Unbiased Scene Graph Generationcited by 0
- 2026Combating Data Laundering in LLM Trainingcited by 0
- 2026Cognivia: A Cognitive Behavioral Therapy Copilot for Evidence-Based Mental Healthcarecited by 0
- 2026LLJ Cards: Best practices for the Use of LLMs as Judgescited by 0
- 2026LLJ Cards: Best practices for the Use of LLMs as Judges21 Sep 2026
- 2026Cognivia: A Cognitive Behavioral Therapy Copilot for Evidence-Based Mental Healthcare28 Jul 2026
- 2026Prompting Complexity: Shortest Prompts for Texts and Behaviors in LLMs7 Jul 2026
- 2026Characterizing Readability Issue Patterns and the Role of Prompt Design in LLM-Generated Code13 May 2026
- 2026Combating Data Laundering in LLM Training2 Apr 2026
- 2026SGG-Rrm 3: From Next-Token Prediction to End-to-End Unbiased Scene Graph Generation9 Mar 2026
- 2026Confusion-Aware Rubric Optimization for LLM-based Automated Grading28 Feb 2026
- 2026FORESTLLM: Large Language Models Make Random Forest Great on Few-shot Tabular Learning16 Jan 2026
- 2025Bidirectional Representations Augmented Autoregressive Biological Sequence Generation9 Oct 2025
- 2025Universal Biological Sequence Reranking for Improved De Novo Peptide Sequencing23 May 2025
Similar, not cited
Close in wording, no citation either way
- 2026Beyond the Prompt in Large Language Models: Comprehension, In-Context Learning, and Chain-of-Thought
- 2024ChainLM: Empowering Large Language Models with Improved Chain-of-Thought Prompting
- 2025Mapping the Minds of LLMs: A Graph-Based Analysis of Reasoning LLM
- 2022Towards Understanding Chain-of-Thought Prompting: An Empirical Study of What Matters
- 2025You Don't Need Prompt Engineering Anymore: The Prompting Inversion
- 2023Towards Better Chain-of-Thought Prompting Strategies: A Survey
- 2024Unveiling the Statistical Foundations of Chain-of-Thought Prompting Methods
- 2024Enhancing Chain of Thought Prompting in Large Language Models via Reasoning Patterns