Abstract
Chain-of-Thought (CoT) prompting has become a cornerstone for eliciting complex reasoning from Large Language Models (LLMs). However, the manual creation of high-quality demonstrations remains a significant bottleneck. This paper presents Synthetic Prompting, a novel framework that leverages the generative capabilities of LLMs to synthesize their own reasoning demonstrations. By utilizing a backward-forward generation process and a complexity-based selection mechanism, Synthetic Prompting achieves substantial performance gains—up to 15.6% absolute improvement—across numerical, symbolic, and algorithmic reasoning tasks without requiring additional human-annotated data.
1. Introduction
Large Language Models (LLMs) demonstrate remarkable capabilities in few-shot learning, particularly when provided with step-by-step reasoning examples, known as Chain-of-Thought (CoT) prompting. Despite its effectiveness, the reliance on human-crafted demonstrations limits the scalability and adaptability of LLMs to diverse or increasingly complex problem domains. To address this "data scarcity" problem, we propose a method for LLMs to "self-teach" by generating synthetic demonstrations from a small set of initial "seed" examples.
2. Methodology: The Synthetic Prompting Framework
The core of Synthetic Prompting lies in its ability to generate high-quality, diverse, and complex demonstrations autonomously. The process is divided into two primary phases: example synthesis and demonstration selection.
2.1 Example Synthesis (Backward-Forward Process)
To ensure that synthetic questions are both solvable and logically sound, we employ a two-step generation process:
- Backward Process: Instead of generating a question directly, the model is first prompted to generate a reasoning chain based on a specific "topic word" and a "target complexity" (defined by the number of reasoning steps). Subsequently, it generates a question that corresponds to this reasoning chain. This ensures the question is well-defined and has a clear path to a solution.
- Forward Process: The model then takes the synthesized question and generates a refined reasoning chain. This second pass acts as a verification step, ensuring the final logic is perfectly consistent with the question text.
2.2 Demonstration Selection (In-Cluster Complexity)
From a large pool of synthesized examples, we select the most effective ones for the final prompt using a strategy that balances diversity and informativeness:
- Diversity: Synthetic examples are clustered using semantic embeddings (Sentence-BERT) to ensure a wide coverage of problem types.
- Informativeness: Within each cluster, we select the example with the highest complexity (the longest reasoning chain). This approach ensures the final prompt challenges the model, leading to better generalization on difficult test queries.
3. Experimental Evaluation
We evaluated Synthetic Prompting across several reasoning benchmarks, including GSM8K (numerical), Colored Objects (symbolic), and Repeat Copy (algorithmic).
3.1 Results and Analysis
Synthetic Prompting consistently outperformed existing state-of-the-art methods, such as Program-Aided Language models (PAL).
- Numerical Reasoning: On GSM8K, the method achieved up to 75.3% accuracy, surpassing PAL's 73.1%.
- Symbolic Reasoning: In the Colored Objects task, accuracy reached 97.3%, a significant improvement over the 94.4% achieved by PAL.
- Algorithmic Reasoning: The Repeat Copy task saw the most dramatic improvement, with accuracy rising to 87.5% from PAL's 71.9%, representing a 15.6% absolute gain.
Our findings suggest that prompting with more complex examples elicits superior performance, and that a diverse set of demonstrations is more beneficial than a set specifically tailored to be similar to the test question. This "self-correction" effect allows the model to identify the logic needed for a problem by working backward from a solution.
4. Conclusion
Synthetic Prompting offers a scalable solution to the challenge of demonstration scarcity in LLM prompting. By enabling models to generate and select their own high-quality reasoning chains, we can significantly boost their performance on complex tasks. While the method relies on initial seed examples and incurs an upfront inference cost for synthesis, the resulting gains in reasoning accuracy demonstrate the potential for LLMs to autonomously improve their own problem-solving capabilities.
Summary updated