Can Separators Improve Chain-of-Thought Prompting?

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

TL;DR

COT-SEP is a simple yet effective prompting technique that improves Large Language Model (LLM) reasoning by strategically inserting separators (like \n\n\n or ###) between few-shot exemplars. By mimicking human "chunking" behavior to prevent cognitive overload, this method achieves significant accuracy gains—up to 5.1% on math benchmarks—without requiring additional model iterations or fine-tuning.

What Problem Does This Paper Address?

Chain-of-Thought (CoT) prompting has become a standard way to help LLMs solve complex problems by providing step-by-step reasoning examples. However, these few-shot exemplars are typically packed densely into a single prompt. The authors argue that this density can cause "cognitive overload" for the model, making it difficult to distinguish where one reasoning path ends and the next begins.

While other researchers have tried to fix this by adding complex verification modules or iterative refinement steps, these solutions are often computationally expensive and slow. The authors sought a "zero-cost" structural fix: can we improve reasoning simply by changing how we format the prompt?

Methods

The authors introduce COT-SEP, a method that inserts a separator (SEP) at the end of each prompt exemplar.

Fig. 1. Comparison of the Vanilla CoT [1] and our COT-SEP for a test data sampled from the GSM8K benchmark [10], where two exemplars (colored as green texts) are provided in the input prompt. For COT-SEP, a separator (denoted as SEP, usually chosen as ‘\n’ or ‘<br>’) is added at the end of each exemplar for better readability. Interestingly, adding the separators is enough to fix the issue of CoT.

Key variations explored include:

  • Separator Types: They tested five different separators: \n\n\n (TripleSkip), ### (TripleHash), *** (TripleStar), and HTML tags like <br> and <br/>.
  • Placement (Unit of Separation): They compared placing separators at the end of each full exemplar (Unit: Exemplar) versus placing them between every single sentence within the reasoning chain (Unit: Sentence).
  • Heterogeneous COT-SEP: To avoid the need to find the "perfect" separator for every task, they tested a version that rotates through different separators (e.g., using \n\n\n after the first example, ### after the second, etc.).

Datasets

The method was evaluated across three challenging reasoning benchmarks:

  1. GSM8K: Grade school math word problems (1,319 samples).
  2. AQuA: Algebraic word problems with multiple-choice answers (254 samples).
  3. CSQA: Commonsense Question Answering (1,221 samples).

Evaluations were performed on several state-of-the-art models, including GPT-3.5-Turbo, GPT-4, GPT-4-Turbo, and LLaMA-2 7B.

Key Insights and Ideas

  • Chunking is Essential: Just as humans use line breaks and headers to organize information, LLMs benefit from clear structural boundaries. Separators act as a signal to the model to "reset" or conclude one context before starting the next.
  • Placement is Everything: The "Unit: Exemplar" approach significantly outperformed the "Unit: Sentence" approach. Inserting separators between sentences within a single reasoning chain actually hurts performance because it disrupts the logical flow of that specific thought process.
  • Triple Newlines Reign Supreme: The \n\n\n (TripleSkip) separator was generally the most effective across the board.
  • Robustness via Heterogeneity: Even if you don't know the optimal separator, using a mix of different ones (Heterogeneous COT-SEP) still consistently beats vanilla CoT. This makes the technique highly practical for real-world applications where prompt engineering time is limited.

Key Results

The improvements, while seemingly small in terms of prompt changes, yielded impressive accuracy boosts:

  • GPT-3.5-Turbo: Adding \n\n\n increased accuracy by 2.8% on AQuA and 1.3% on GSM8K.
  • GPT-4-Turbo: The gains were even more pronounced, with a 5.1% improvement on GSM8K and 2.6% on AQuA.
  • Qualitative Success: As shown in Figure 1, COT-SEP allowed the model to correctly calculate a multi-step average (the "jelly bean problem") that the vanilla CoT model failed to solve.

Limitations and Future Work

  • Model Sensitivity: The results on the smaller LLaMA-2 7B model were less consistent than on the GPT series, suggesting that smaller models might interpret structural tokens differently or require different types of separators.
  • Dataset Scope: The study focused on arithmetic and commonsense reasoning. The authors acknowledge that more work is needed to see if these benefits extend to other domains like code generation or creative writing.
  • Prompt Dependency: COT-SEP is an enhancement for CoT; if the underlying CoT exemplars are poor, separators alone won't save the performance.

The authors suggest that COT-SEP is a "plug-and-play" improvement that can be easily combined with other advanced techniques like Self-Consistency or Tree of Thoughts to push reasoning boundaries even further. Not discussed in the paper is how these separators might interact with long-context windows or very high few-shot counts (e.g., 20+ examples).

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