Can Separators Improve Chain-of-Thought Prompting?

Yoonjeong Park, Hyunjin Kim, Chanyeol Choi, Junseong Kim, Jy-yong Sohn

Abstract

Chain-of-thought (CoT) prompting is a simple and effective method for improving the reasoning capabilities of Large Language Models (LLMs). The basic idea of CoT is to let LLMs break down their thought processes step-by-step by putting exemplars in the input prompt. However, the densely structured prompt exemplars of CoT may cause the cognitive overload of LLMs. Inspired by human cognition, we introduce COT-SEP, a method that strategically employs separators at the end of each exemplar in CoT prompting. These separators are designed to help the LLMs understand their thought processes better while reasoning. Interestingly, it turns out that COT-SEP significantly improves the LLMs' performances on complex reasoning tasks (e.g., GSM8K, AQuA, CSQA), compared with the vanilla CoT, which does not use separators. We also study the effects of the type and the location of separators tested on multiple LLMs, including GPT-3.5-Turbo, GPT-4, and LLaMA-2 7B.

Introduction

Chain-of-Thought (CoT) prompting has become a cornerstone of prompt engineering, enabling Large Language Models (LLMs) to solve complex problems by demonstrating step-by-step reasoning. However, as these prompts grow in complexity, they often become "dense"—long sequences of text packed tightly together. This density can lead to "cognitive overload" for the model, similar to the difficulty humans face when reading unstructured walls of text.

To address this, we propose COT-SEP, a structural refinement to CoT prompting. By inserting simple separators—such as triple newlines or hashes—between reasoning exemplars, we can "chunk" information into more digestible units. This approach leverages the psychological principle of chunking to enhance model comprehension without requiring expensive iterative refinement or more complex reasoning chains.

Methodology: The COT-SEP Approach

The core of COT-SEP is the strategic placement of structural markers within the prompt. The researchers investigated three primary dimensions of this technique:

  1. Separator Types: The study evaluated various markers, including whitespace (TripleSkip or \n\n\n), symbols (###, ***), and structural tags (<br>, <br/>).
  2. Granularity (The "Unit"): A critical finding was the importance of where these separators are placed. The researchers compared placing separators at the end of a complete Question-Answer exemplar (Unit: Exemplar) versus placing them between every individual sentence within the reasoning chain (Unit: Sentence).
  3. Heterogeneous Patterns: The team also tested rotating different separator types between exemplars to create a more distinct structural rhythm.
Comparison of separator placement units: Exemplar-level vs. Sentence-level.

As illustrated above, the "Unit: Exemplar" approach maintains the internal cohesion of a reasoning step while clearly demarcating the boundaries between different examples.

Experimental Evaluation

The effectiveness of COT-SEP was tested across three rigorous benchmarks: GSM8K (grade school math), AQuA (algebraic word problems), and CSQA (commonsense reasoning). The experiments spanned multiple state-of-the-art models, including GPT-3.5-Turbo, GPT-4-Turbo, and LLaMA-2-7B, to ensure the findings were robust across different architectures.

Key Insights and Results

The results demonstrate that structural clarity significantly impacts reasoning accuracy.

The Power of Whitespace and Location

The most consistent performance gains came from the TripleSkip (\n\n\n) separator. This suggests that LLMs benefit from "breathing room" that helps distinguish where one logic chain ends and the next begins. Crucially, the location of the separator is paramount: while separators between exemplars improved performance, placing them within an exemplar (between sentences) often degraded results by disrupting the logical flow of a single thought process.

Performance Gains

  • GPT-4-Turbo: Achieved a 5.1% improvement on GSM8K and a 2.6% increase on AQuA.
  • GPT-3.5-Turbo: Saw a 2.8% boost on AQuA and 1.3% on GSM8K.
  • Complexity Correlation: The benefits of COT-SEP were most pronounced on the most difficult tasks (like AQuA), indicating that structural aids are most valuable when the model is operating at its cognitive limit.
Comparison of reasoning performance with and without separators.

As shown in the comparison above, the added structural clarity can prevent the model from losing track of the logic, leading to correct final answers in scenarios where vanilla CoT might fail due to calculation or logic errors.

Conclusion and Future Directions

COT-SEP proves that simple structural changes can yield significant performance dividends in LLM reasoning. By reducing cognitive overload through effective chunking, we can make existing models more reliable on complex tasks. Future work will explore the synergy between COT-SEP and other advanced techniques like Self-Consistency or Tree of Thoughts, as well as investigating how pre-training data influences a model's preference for specific structural cues.

Summary updated

Abstract

Chain-of-thought (CoT) prompting is a simple and effective method for improving the reasoning capabilities of Large Language Models (LLMs). The basic idea of CoT is to let LLMs break down their thought processes step-by-step by putting exemplars in the input prompt. However, the densely structured prompt exemplars of CoT may cause the cognitive overload of LLMs. Inspired by human cognition, we introduce COT-SEP, a method that strategically employs separators at the end of each exemplar in CoT prompting. These separators are designed to help the LLMs understand their thought processes better while reasoning. Interestingly, it turns out that COT-SEP significantly improves the LLMs' performances on complex reasoning tasks (e.g., GSM8K, AQuA, CSQA), compared with the vanilla CoT, which does not use separators. We also study the effects of the type and the location of separators tested on multiple LLMs, including GPT-3.5-Turbo, GPT-4, and LLaMA-2 7B.
BibTeX
@inproceedings{park2024can,
  author = {Yoonjeong Park and Hyunjin Kim and Chanyeol Choi and Junseong Kim and Jy-yong Sohn},
  title = {{Can Separators Improve Chain-of-Thought Prompting?}},
  booktitle = {FLLM},
  year = {2024},
  doi = {10.1109/fllm63129.2024.10852507},
}
Figure