Chain-Of-Thought Prompting Under Streaming Batch: A Case Study

Yuxin Tang · DOI

Abstract

Chain-of-Thought (CoT) prompting has significantly enhanced the reasoning capabilities of Large Language Models (LLMs). However, traditional prompt optimization often assumes an offline setting where the entire dataset is available for selection. This paper investigates CoT prompting in a "streaming batch" scenario, where data arrives sequentially. We explore the impact of rationale correctness and reasoning depth on model performance. Our findings suggest that incorrect rationales do not necessarily degrade performance and that "shallow" (concise) reasoning steps frequently outperform more complex, "deep" rationales, offering a more token-efficient approach to prompt engineering.

1. Introduction

Chain-of-Thought (CoT) prompting—where an LLM is provided with step-by-step reasoning examples—has become a standard technique for solving complex reasoning tasks. Most existing methods for automatically generating or selecting these prompts operate in an "offline" capacity, assuming access to the full test dataset to optimize example selection.

In real-world applications, however, data often arrives as a continuous stream. Previous attempts to adapt CoT to streaming environments typically appended every new reasoning path to the prompt. This approach is unsustainable due to two primary factors: token limits (exceeding context windows) and computational efficiency (increased costs and latency). This case study investigates how to optimize prompt selection in a streaming environment by evaluating two key attributes: correctness and depth.

2. Methodology

We employ a "streaming batch" framework where a dataset is partitioned into $m$ sequential batches. For each batch, the model ($M$) utilizes a prompt ($P$) to generate rationales. An optimization function ($f$) then updates the prompt for the subsequent batch based on the performance and characteristics of the previous outputs.

To determine the optimal design for $f$, we tested two variables:

  • Correctness (Right vs. Wrong CoT): We compared "Correct-CoT" (using only rationales that led to the correct answer) against "Wrong-CoT" (where over 50% of the rationales in the prompt were intentionally incorrect).
  • Depth (Deep vs. Shallow CoT): Depth was defined using a newline heuristic (\n). "Deep" rationales contained multiple steps and line breaks, while "Shallow" rationales were concise and direct.

Experiments were conducted using OpenAI’s text-davinci-002 model across four benchmarks: MultiArith, GSM8K, StrategyQA, and the Last Letter Concatenation task (Letter).

3. Key Findings

3.1 The "Correctness" Paradox

A counter-intuitive finding of this study is that the presence of incorrect rationales in a prompt does not significantly diminish model performance. This suggests that the primary value of CoT prompting may lie in demonstrating the structure of reasoning—showing the model how to decompose a problem—rather than providing factually accurate intermediate steps for the model to mimic.

3.2 The Efficacy of Shallow Reasoning

"Shallow" CoT (shorter rationales) consistently outperformed "Deep" CoT across the tested datasets. This finding is particularly relevant for streaming scenarios: shorter prompts are more cost-effective, consume fewer tokens, and, in this study, yielded higher accuracy. This was especially evident in symbolic logic tasks like the Letter task, where brevity appeared to reduce the likelihood of the model deviating from the required logic.

4. Results Analysis

  • MultiArith: Both Shallow-CoT and Wrong-CoT maintained high accuracy (85-95%), often matching or exceeding the performance of more rigorous, correct-only prompting methods.
  • GSM8K: Despite the higher difficulty of this dataset (40-50% accuracy), the trend persisted: Wrong-CoT performed comparably to Correct-CoT, and Shallow-CoT remained more effective than Deep-CoT.
  • StrategyQA & Letter: Similar patterns emerged, reinforcing the idea that concise, structural examples are more beneficial than lengthy, complex ones in a streaming context.

5. Limitations and Future Work

As a preliminary exploration, this study has several limitations. First, the experiments were limited to text-davinci-002; newer, more highly aligned models might react differently to incorrect rationales. Second, the use of line breaks as a proxy for reasoning depth is a simple heuristic that may not capture the true semantic complexity of a rationale. Future research should explore more sophisticated measures of information density and investigate specific selection algorithms for promoting samples from a batch to the permanent prompt.

6. Conclusion

This case study challenges the assumption that CoT prompts must be both correct and deeply detailed to be effective. In streaming environments where token efficiency is paramount, shallow and even partially incorrect rationales can provide sufficient structural guidance for LLMs to maintain high performance. These insights suggest that simple, heuristic-based filtering can be a powerful tool for automated prompt optimization.

Summary updated

BibTeX
@misc{tang2023chain,
  author = {Yuxin Tang},
  title = {{Chain-Of-Thought Prompting Under Streaming Batch: A Case Study}},
  year = {2023},
  eprint = {2306.00550},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.00550},
}
Figure