Large language models (LLMs) can achieve highly effective performance on vari-
ous reasoning tasks by incorporating step-by-step chain-of-thought (CoT) prompt-
ing as demonstrations. However, the reasoning chains of demonstrations generated
by LLMs are prone to errors, which can subsequently lead to incorrect reason-
ing during inference. Furthermore, inappropriate exemplars (overly simplistic or
complex), can affect overall performance among varying levels of difﬁculty. We
introduce Iter-CoT (Iterative bootstrapping in Chain-of-Thoughts Prompting), an
iterative bootstrapping approach for selecting exemplars and generating reasoning
chains. By utilizing iterative bootstrapping, our approach enables LLMs to au-
tonomously rectify errors, resulting in more precise and comprehensive reasoning
chains. Simultaneously, our approach selects challenging yet answerable questions
accompanied by reasoning chains as exemplars with a moderate level of difﬁculty,
Enhancing Chain-of-Thoughts Prompting with Iterative Bootstrapping in Large Language Models