Auto-ICL: In-Context Learning without Human Supervision

Jinghan Yang, Shuming Ma, Furu WeiarXiv 2023 · DOI

Abstract

In-context learning (ICL) typically requires human-crafted demonstrations or instructions to guide Large Language Models (LLMs). This paper introduces Auto-ICL, a framework that enables LLMs to autonomously generate their own contextual aids—synthetic examples and task-specific instructions—removing the need for human intervention. Evaluations across diverse reasoning tasks show that Auto-ICL not only reduces labor but often outperforms human-annotated few-shot examples by leveraging "internal alignment" within the model.

Introduction

Large Language Models (LLMs) excel at in-context learning (ICL), where performance is boosted by providing a few examples (few-shot) or a "Chain-of-Thought" (CoT) prompt. However, this paradigm faces two significant hurdles: the high labor cost of manual prompt engineering and the inherent limitation of human expertise in complex tasks. While previous efforts like Zero-Shot-CoT or Auto-CoT have automated parts of the reasoning process, they often still rely on human-provided structures or are restricted to generating reasoning paths for existing questions.

Methodology: The Auto-ICL Framework

The Auto-ICL framework operates in two distinct stages to bridge the gap between raw queries and solved problems without human supervision.

The two-step Auto-ICL framework: Context Generation followed by Problem Solving.

Step 1: Context Generation

Upon receiving a user query, the model generates its own "contextual aids." The approach varies based on available resources:

  • Auto-ICL (Retrieving): When a dataset of unlabeled queries is available, the model retrieves a subset, generates reasoning paths for them, and distills these into a single, general "N-to-1" instruction.
  • Auto-ICL (Generating): If only the current query is available, the model generates $n$ similar synthetic questions and answers, then creates a "1-to-1" instruction tailored to that specific problem type.

Step 2: Problem Solving

The model appends the self-generated instructions and/or demonstrations to the original user query to generate the final solution. The "N-to-1" instruction generation is a key innovation, allowing the model to act as its own prompt engineer by distilling consistent, step-by-step logic across multiple examples.

Experimental Setup and Results

The researchers evaluated Auto-ICL using models like GPT-4, GPT-4-Turbo, GPT-3.5-Turbo, and Llama-3-70B across four categories of challenging reasoning tasks, including Theory of Mind, Symbolic Reasoning, and Arithmetic Reasoning (e.g., GSM8K).

Key Performance Metrics

Auto-ICL demonstrated superior performance over several established baselines:

  • Surpassing Human Labels: On the GSM8K dataset, Auto-ICL (retrieving) achieved 79.0% accuracy with GPT-3.5-Turbo, outperforming human-written Few-Shot-CoT (73.0%).
  • Automated Baseline Superiority: In symbolic reasoning, Auto-ICL (generating) reached 92.4%, significantly higher than Zero-Shot-CoT (80.6%).
  • Efficiency: In retrieving mode, the generated instructions are more concise than traditional multi-shot demonstrations, reducing token usage and inference costs.

Discussion and Insights

A core finding of this research is Model-to-Model Alignment: model-generated contexts often perform better than human-annotated ones. This suggests that models may understand the nuances of their own generated instructions better than potentially ambiguous human-written ones.

Comparison of prompt structures for Few-Shot CoT, Auto-ICL (retrieving), and Auto-ICL (generating).

The study also highlights a strategic trade-off: with access to a dataset (retrieving mode), a single high-quality instruction is more effective than multiple examples. Conversely, with a single query (generating mode), a combination of synthetic demonstrations and instructions yields the best results.

Conclusion and Limitations

Auto-ICL represents a significant step toward autonomous LLM optimization. However, it is constrained by a capability threshold; older or smaller models often lack the "self-reflection" necessary to generate high-quality instructions. Additionally, the "retrieving" variant is sensitive to the quality and representativeness of the unlabeled dataset. Future work may involve integrating real-time web data or user feedback loops to further refine autonomously generated contexts.

Summary updated

BibTeX
@misc{yang2023auto,
  author = {Jinghan Yang and Shuming Ma and Furu Wei},
  title = {{Auto-ICL: In-Context Learning without Human Supervision}},
  year = {2023},
  eprint = {2311.09263},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.09263},
}
Figure