LLMs Learn Better In-Context from Rules than from Examples

Xiang Fu, Seungmin Cho, Yukyung Lee, Najoung KimarXiv 2026

TL;DR

Modern Large Language Models (LLMs) are significantly more effective at learning new, complex tasks from explicit natural language rules than from few-shot examples. Surprisingly, providing examples on top of clear rules offers almost no additional performance boost, suggesting that for today’s models, a good instruction is worth more than a handful of demonstrations.

What Problem Does This Paper Address?

In-context learning (ICL) allows LLMs to tackle new tasks without any weight updates, simply by looking at the prompt. Historically, this has been done in two ways: rule-based learning (giving the model a set of instructions) and example-based learning (providing a few input-output demonstrations, or "few-shot" prompting).

While researchers know these two methods activate different internal mechanisms, it hasn't been clear which one is actually better for complex reasoning. Does a model "understand" a task better if you explain the logic, or if you show it how it’s done? Furthermore, does the common practice of providing both (Rules + Examples) actually lead to better performance, or is it just adding noise to the context window?

Methods

The authors conducted a systematic comparison using a suite of five novel tasks designed to test different types of reasoning. They evaluated a range of open-weight models (Gemma 3, Qwen 2.5/3, OLMo 3/3.1) and used GPT-5.4 as a high-end reference point.

The experimental design was rigorous:

  1. Three Learning Conditions: Every task was tested in "Rules-only," "Examples-only," and "Combined" (Rules + Examples) modes.
  2. Minimum Coverage Examples: To ensure the "Examples-only" condition was fair, the authors used a "minimum coverage" design, ensuring that the few-shot examples included every possible output label and task primitive at least once.
  3. Linear Mixed Models (LMM): They used statistical modeling to isolate the effects of the learning mode, model size, instruction tuning, and task difficulty.
Figure 1: Visualization of our experiment design. (A) illustrates our tasks and (B) shows how the same task is presented to the model in different learning conditions.

Datasets

The study uses five synthetic benchmarks, each with three difficulty levels (Easy, Medium, Hard), to ensure the models were learning something new rather than just reciting training data:

  • Set Game: A variation of the card game requiring attribute matching.
  • Tapatan: A 3-in-a-row board game testing spatial reasoning and win-condition detection.
  • Operator Function: Novel arithmetic operations (e.g., $f(x, y, z) = (x \times y) + z$) testing algebraic abstraction.
  • Noun Class Agreement: An artificial language grammar task testing formal linguistic sensitivity.
  • Lexical Category Inference: A semantic task requiring models to judge if words belong to specific categories (e.g., "birds AND lives in South America") using their internal parametric knowledge.

Key Insights and Ideas

  • Rules Rule: Across the board, models learned more reliably from rules than from examples. The authors argue that rules constrain the "hypothesis space" more tightly, leaving less room for the model to guess the wrong pattern.
  • The "Combined" Myth: One of the most surprising findings is that adding examples to a prompt that already contains clear rules provides a negligible performance gain (~1.2 points). For complex tasks, if the instructions are good, the examples are redundant.
  • Instruction Tuning is a Force Multiplier: Instruction tuning significantly boosts a model's ability to learn from rules (+12.2 points) but has almost no effect on its ability to learn from examples. This suggests that tuning specifically sharpens the "instruction-following" pathway.
  • Task-Dependent Efficacy: The "rule advantage" is strongest in tasks requiring algebraic abstractions (like Operator Function) and weakest in tasks that rely on distributional patterns or semantic knowledge (like Lexical Category Inference).

Key Results

The statistical analysis (Figure 3) showed that switching from examples to rules improved accuracy by an average of 17.1 percentage points.

Figure 3: Main LMM effects of learning condition, in- struction tuning, model size, and difficulty on accuracy.

As shown in Figure 4 (left), the benefit of rules was most dramatic for the Operator Function (+40.1 points) and Set Game (+31.9 points). Conversely, the right panel of Figure 4 illustrates the marginal, often statistically insignificant, impact of adding examples to rules across all tasks.

Figure 4: Task-specific LMM contrasts for rules minus examples (left) and combined minus rules (right). Panel scales differ, so distances should be compared only within panels.

Interestingly, even base models (not instruction-tuned) showed a preference for rules in algebraic domains, suggesting that the capacity to follow verbal logic is an emergent property of scale, not just a result of fine-tuning.

Limitations and Future Work

The authors acknowledge several caveats:

  • Idealized Rules: In this study, rules were carefully revised for clarity. In the real world, user instructions are often "noisy," ambiguous, or incomplete, which might make examples more valuable.
  • Synthetic Tasks: While novel, these tasks are synthetic. Future work should explore if these findings hold for more "natural" reasoning tasks.
  • Example Scaling: While the study focused on "minimum coverage" examples, the authors noted in the appendix that scaling to a very large number of examples (many-shot) sometimes led to performance degradation as models got lost in repetitive patterns.

For practitioners, the takeaway is clear: if you can describe the logic of your task precisely, spend your time perfecting the instructions rather than hunting for the perfect set of few-shot examples.

Summary updated

BibTeX
@misc{fu2026llms,
  author = {Xiang Fu and Seungmin Cho and Yukyung Lee and Najoung Kim},
  title = {{LLMs Learn Better In-Context from Rules than from Examples}},
  year = {2026},
  eprint = {2609.03213},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.03213},
}
Figure