Large language models can perform various reasoning tasks by using chain-of-thought prompting, which guides them to find answers through step-by-step demonstrations. However, the quality of the prompts depends on the demonstrations given to the models, and creating many of them by hand is costly. We introduce Synthetic prompting, a method that leverages a few handcrafted examples to prompt the model to generate more examples by itself, and selects effective demonstrations to elicit better reasoning. Our method alternates between a backward and forward process to generate new examples. The backward process generates a question that match a sampled reasoning chain, so that the question is solvable and clear. The forward process produces a more detailed reasoning chain for the question, improving the quality of the example. We evaluate our method on numerical, symbolic, and algorithmic reasoning tasks, and show that it outperforms existing prompting techniques.
翻译:大语言模型可通过思维链提示执行多种推理任务,这种提示方式通过逐步示例引导模型找到答案。然而,提示质量取决于提供给模型的示例,而手动创建大量示例成本高昂。我们提出合成提示方法,该方法利用少量手工制作的示例引导模型自行生成更多示例,并选择有效示例以激发更优推理。我们的方法交替进行反向与正向过程来生成新示例:反向过程生成与采样推理链匹配的问题,确保问题可解且清晰;正向过程则针对问题生成更详细的推理链,提升示例质量。我们在数值、符号和算法推理任务上评估该方法,结果表明其性能优于现有提示技术。