In-context Learning (ICL) is a technique that allows LLMs to complete target tasks during inference
by using a few tasks-speciﬁc examples as demonstrations, without modifying the model parameters
(Shao et al., 2023a; Brown et al., 2020). Zhao et al. (2021) underscored that the accuracy of LLMs in
ICL depends heavily on the selection and permutation of examples. Additionally, the employment of
demonstrations established a highly intimate connection between CoT prompting and ICL. Therefore,
signiﬁcant efforts have been invested in developing approaches to identify appropriate few-shot
demonstrations.
Zhang et al. (2022) adopted a clustering-based method to select demonstrations. Fu et al. (2022)
selected the demonstrations with the most reasoning steps or the longest questions and similarly,
Diao et al. (2023) chose the demonstrations with most uncertain questions. Nonetheless, Shum et al.
(2023) posited that excessively intricate exemplars do not aid simple problems. Instead, they added
Enhancing Chain-of-Thoughts Prompting with Iterative Bootstrapping in Large Language Models