ACIL: Auto Chain of Thoughts for In-Context Learning
Rui Chu · 2026
Read ACIL: Auto Chain of Thoughts for In-Context Learning by Rui Chu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-17088.txt.
Introduction
Chu gives Auto Chain of Thoughts, a system that lifts in-context learning by building thought-rich demos. Standard in-context learning struggles on multi-step tasks because demos usually hold only input-output pairs without middle steps. Auto-CoT builds thought chains for input-output cases, augments prompts with middle notes, and drops weak demos through steady choice. Adding strong thought cases to prompts guides the model toward reliable thought and better scores. Tests across several thought tasks show the system lifts in-context learning with plain middle guidance.
Catalog record
| CREATOR | Rui Chu |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 31207 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2605.17088
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
ACIL: Auto Chain of Thoughts for In-Context Learning Rui Chu Abstract Recent advancements in Large Language Models (LLMs) have highlighted the critical role of Chain of Thought (CoT) reasoning in improving model performance across complex reasoning tasks. In parallel, In-Context Learning (ICL) has emerged as a vital mechanism that allows models to adapt to new tasks without parameter updates by leveraging examples provided in the prompt. However, traditional ICL approaches struggle to generalize well on tasks requiring intricate reasoning due to the lack of explicit intermediate reasoning steps. This paper introduces an Automatic Chain of Thought (Auto-CoT) framework designed to enhance the performance of ICL. Auto-CoT automatically generates reasoning chains for input-output pairs, augments the context with these structured explanations, and prunes irrelevant or low-quality demonstrations through a systematic selection process. By integrating high-quality reasoning examples into the ICL prompt, Auto-CoT improves the model’s reasoning ability and prediction accuracy. The approach is validated across various tasks, demonstrating its efficacy in optimizing ICL by guiding the model with intermediate reasoning steps. 1 Introduction 1.1 Background Recent advancements in Large Language Models (LLMs) have demonstrated the significant impact of Chain of Thought (CoT) reasoning on model performance. Notably, OpenAI’s O1 model has showcased the importance of CoT in enhancing LLMs’ problem-solving capabilities across various complex tasks. Concurrently, In-Context Learning (ICL) has been recognized as a crucial step in the inference process of LLMs, enabling models to adapt and learn from contextual information. However, current ICL methodologies face limitations when dealing with intricate reasoning tasks. Research Objective: This study aims to integrate Automatic Chain of Thought (Auto-CoT) generation with In-Context Learning to improve LLMs’ performance on complex reasoning tasks. The primary goal is to develop a novel methodology that automatically generates high-quality CoT examples and seamlessly incorporates them into the ICL process, thereby enhancing the model’s reasoning capabilities and adaptability. 1.2 Research Problem Description We are wondering if the CoT could enhance the In-Context Learning Performance. Even though CoT has few-shot CoT scenarios, to the best of our knowledge, there is lacking research on improving the In-Context Learning performance through zero-shot CoT. By refering to Fig 1 , assumping we are considering In-Context Learning as a function, we are trying to optimize the performance of given a accurate ( x_{1} , y_{1} ), ( x_{2} , y_{2} ), how we can make the yellow points which we are predicting either the bi-directional or the next-word prediction can be optimized onto the red line through minimizing the loss. In a real text scenario in Large Language Models, we are trying to enhance the accuracy of the next-word prediction, here is an example: "The movie was fantastic!" \to positive, "I absolutely loved the storyline." \to positive, "The plot was a bit predictable." \to neutral, "The acting was mediocre but the visuals were stunning." \to prompt neutral Hypopthesis Thus, we have, H_{0} : The Chain of Thoughts can not improve the performance of LLM’s In-Context Learning through Zero-Shot auto CoT. H_{1} : The Chain of Thoughts can improve the performance of LLM’s In-Context Learning through Zero-Shot auto CoT. Scope This project will address mostly on the linear and non-linear regression function scenarios on a simple Transformer or GPT2, and will extend some of the perspective towards real case LLMs with financial classification dataset. This research is a statistical learning on the causal inference performance of language models . Thus, there is no tuning on LLMs. Contribution and Novelty To our best knowledge, it is the first attempt on using CoT to enhance ICL performance on LLMs. (x_{1},y_{1}) (x_{2},y_{2}) (x_{j},?) w_{\text{test}}^{T}x \cdots Figure 1: Illustration of CoT enhancement for In-Context Learning 2 Prior Works In Context Learning firstly widely noticed from few-shot learning Brown et al. 2020b and was formed into mathematical functions for deeper logic-level research to find explainable performance as in-context learning which Garg et al. 2022 ; Xie et al. 2021 presented a systematic investigation into transformers’ in-context learning capabilities through the lens of simple function classes. They demonstrated that standard transformers can be trained from scratch to perform in-context learning of linear functions with performance comparable to optimal least squares estimation. Their work showed that in-context learning is possible even under distribution shifts between training and inference-time prompts, as well as between in-context examples and query inputs. The study provided valuable insights into transformers’ ability to learn and generalize from in-context examples by examining how they handle sparse linear functions, two-layer neural networks, and decision trees. Auto-CoT which Zhang et al. 2022 an innovative approach to automate chain-of-thought prompting in large language models. Their method eliminates the need for manual demonstration design by leveraging diversity-based question sampling and automatic reasoning chain generation. The authors demonstrated that Auto-CoT consistently matches or exceeds the performance of manual chain-of-thought prompting across ten public benchmark reasoning tasks. Their analysis revealed that diversity in demonstration selection is crucial for mitigating the effects of reasoning mistakes, and their approach effectively handles both arithmetic and commonsense reasoning tasks while maintaining robustness in streaming settings. In the other hand, Automatic prompt augmentation Shum et al. 2023 proposed a novel approach for automatic chain-of-thought prompt engineering in large language models. The method addresses the limitations of manual demonstration design through a three-stage framework: (1) augmenting rationale chains from labeled data, (2) pruning low-quality chains based on answer consistency, and (3) selecting optimal chain combinations via variance-reduced policy gradient optimization. The authors demonstrate that Automate-CoT achieves superior performance across multiple reasoning tasks, with significant improvements in arithmetic reasoning (+2.7%), commonsense reasoning (+3.4%), symbolic reasoning (+3.2%), and non-reasoning tasks (+2.5%). Their analysis reveals that the method effectively handles various sensitivity issues in prompt engineering, including order sensitivity, complexity-diversity trade-offs, and linguistic style variations, while maintaining computational efficiency by requiring only 100 training examples. CoT-ICL which Huang et al. 2024 provided a theoretical framework for understanding chain-of-thought prompting by examining how transformers learn multi-layer perceptrons in-context. They decomposed chain-of-thought into two distinct phases: filtering relevant information from prompts and in-context learning of individual computation steps. Their work established that CoT-I/O can learn MLPs with input dimension d and k neurons using O(max(k,d)) in-context samples, significantly improving upon the (kd) lower bound of standard in-context learning. The study also demonstrated how CoT accelerates pretraining by enabling the model to learn compositional shortcuts, offering valuable insights into the mechanics underlying chain-of-thought reasoning. 3 Methodology 3.1 Dataset non-Linear regression function As for functional data, we are taking x through a gaussian distribution and correlating generating y through a Relu-2NN function. Financial classification dataset FinBERT is a pre-trained NLP model to analyze sentiment of financial text. It is built by further training the BERT language model in the finance domain, using a large financial corpus and thereby fine-tuning it for financial sentiment classification. Araci 2019 LAMBADA dataset Following the early few-shot learning research Brown et al. 2020a , we have also chose the Lambada dataset for testing on next-word prediction performance on ICL-COT performance. 3.2 In-Context Learning Loss formulation optimization and testing We will try to optimize the performance through minimizing the loss function which considered as the MSE. We firstly trained a Transformer for linear functions with sampled distribution among: \mathcal{F}=\left\{f\mid f(x)=\mathbf{w}^{\top}\mathbf{x},\,\mathbf{w}\in\mathbb{R}^{d}\right\} . Then we have training progress