Problem-Solving Logic Guided Curriculum In-Context Learning for LLM s Complex Reasoning (2025)

Abstract: In-context learning (ICL) can significantly enhance the complex reasoning capabilities of large language models (LLMs), with the key lying in the selection and ordering of demonstration examples. Previous methods typically relied on simple features to measure the relevance between examples. We argue that these features are not sufficient to reflect the intrinsic connections between examples. In this study, we propose a curriculum ICL strategy guided by problem-solving logic. We select demonstration examples by analyzing the problem-solving logic and order them based on curriculum learning. Specifically, we constructed a problem-solving logic instruction set based on the BREAK dataset and fine-tuned a language model to analyze the problem-solving logic of examples. Subsequently, we selected appropriate demonstration examples based on problem-solving logic and assessed their difficulty according to the number of problem-solving steps. In accordance with the principles of curriculum learning, we ordered the examples from easy to hard to serve as contextual prompts. Experimental results on multiple benchmarks indicate that our method outperforms previous ICL approaches in terms of performance and efficiency, effectively enhancing the complex reasoning capabilities of LLMs. Our project will be publicly available subsequently.

## introduction large language models (llms) @xcite @xcite can rapidly acquire new capabilities through in-context learning (icl) to solve many new tasks @xcite , and can be extended through chain of thought (cot) @xcite to solve many tasks that require complex reasoning (zhang et al., 2023; zhao and zhang, 2024; hou et al., * corresponding author: hua huang ## problem-solving logic guided curriculum icl this paper introduces a problem-solving logic guided curriculum icl strategy. the overall methodology is illustrated in figure 3 . specifically, we first constructed an instruction set based on the break dataset and fine-tuned a language model to automatically analyze problem-solving logic. then, we analyzed the problem-solving logic for all data in the benchmark training set to construct a dataset of candidate examples. when an actual query is input, its problem-solving logic is first analyzed and then compared with the candidate examples, selecting those with similar problem-solving steps as demonstration examples. furthermore, the number of problem-solving steps serves as an appropriate metric for assessing the difficulty of each example. a greater number of steps means the problem is more difficult to solve. this inspired us to apply the principles of curriculum learning to order the demonstration examples from easy to hard. finally, the ordered demonstration examples and the query are combined to form the final prompt, which is then input into the llms. the following sections will offer a detailed explanation of how problemsolving logic is analyzed, along with the process of selecting and ordering demonstration examples. ## conclusion this paper proposes a problem-solving logic guided icl strategy. by analyzing the problemsolving logic, we measure the similarity between problems and select demonstration examples. additionally, the difficulty of problems is assessed based on the number of problem-solving steps, and the selected examples are ordered from easy to hard following the principles of curriculum learning. experimental results across multiple benchmarks demonstrate that our proposed method outperforms other icl methods in terms of average performance, significantly improving the reasoning capabilities of llms.