← Latest papers
💬 NLP

Retrieved In-Context Principles from Previous Mistakes

The paper proposes Retrieved In-Context Principles (RICP), a teacher-student framework that analyzes and clusters student model mistakes to generate customized, task-level principles for improving Large Language Model performance across various reasoning benchmarks.

Original authors: Hao Sun, Yong Jiang, Bo Wang, Yingyan Hou, Yan Zhang, Pengjun Xie, Fei Huang

Published 2026-05-26
📖 4 min read☕ Coffee break read

Original authors: Hao Sun, Yong Jiang, Bo Wang, Yingyan Hou, Yan Zhang, Pengjun Xie, Fei Huang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a student (the Student Model) how to solve tricky puzzles. Usually, we teach by showing them perfect examples of how to do it right. But this paper argues that we can teach them even better by showing them where they went wrong and explaining why.

The authors call their new method RICP (Retrieved In-Context Principles). Think of it as a smart, two-step tutoring system involving a Teacher and a Student.

Here is how it works, using a simple analogy:

The Problem: The "One-Size-Fits-All" Textbook

Previous methods tried to learn from mistakes, but they were like handing the student a generic textbook chapter titled "How to Avoid Mistakes."

  • The Flaw: If the student is stuck on a math problem about pizza, reading a generic rule about "checking your work" might not help enough. Conversely, if the student is solving a logic puzzle, a rule about "pizza math" is useless.
  • The Result: The advice was either too vague or didn't cover enough different types of errors.

The Solution: The "Personalized Tutor" (RICP)

The RICP method acts like a master teacher who watches the student take a practice test, analyzes their specific errors, and then creates a custom study guide for the next test.

Step 1: The "Mistake Autopsy" (Insight Generation)

First, the Student Model tries to solve a bunch of practice problems. The Teacher Model (a smarter AI) looks at the ones the Student got wrong.

  • What the Teacher does: Instead of just saying "Wrong," the Teacher writes a report. It identifies the Root Cause (e.g., "You forgot to add the tip to the pizza price") and gives specific Insights (e.g., "Always check if you've included every part of the total cost").

Step 2: The "Library of Lessons" (Principle Formulation)

This is where the magic happens. The Teacher organizes these mistakes into two types of advice:

  1. The "General Rules" (Task-Level Principles):

    • Analogy: Imagine a Textbook Chapter.
    • The Teacher groups similar mistakes together (e.g., all math errors about proportions). From these groups, it writes broad rules that apply to any math problem.
    • Example: "Always double-check your arithmetic operations."
  2. The "Personal Cheat Sheet" (Question-Level Principles):

    • Analogy: Imagine a Sticky Note on the specific problem you are looking at right now.
    • For the exact question the Student is about to answer, the Teacher searches the library for the most similar past mistakes. It then pulls out the specific advice that applies only to this situation.
    • Example: "For this specific pizza problem, remember to add the tip to the base price, not just calculate the tip."

Step 3: The "Exam Day" (Principle Utilization)

When the Student faces a new question:

  1. It gets the General Rules (the textbook chapter) to keep it on the right track.
  2. It gets the Personal Cheat Sheet (the sticky note) tailored to that specific question.
  3. It combines these with its normal instructions to solve the problem.

Crucially: The Teacher doesn't need to be present during the exam. The Student just uses the notes the Teacher prepared earlier. This makes it fast and cheap to run.

Why is this better?

The paper tested this on seven different "exam boards" (datasets) involving math, common sense, and logic.

  • Customization: Unlike old methods that gave the same advice to everyone, RICP gives the right advice for the specific question.
  • Coverage: By grouping mistakes, it ensures the Student learns from a wide variety of errors, not just the most common ones.
  • Results: When they added these "Mistake Notes" to standard AI prompting methods, the Student Models got significantly smarter and more accurate, especially on hard logic and math problems.

In a Nutshell

Instead of just showing an AI how to get things right, this method teaches it how to avoid getting things wrong by analyzing its past failures. It creates a hybrid guide that offers both broad wisdom (for general safety) and specific tips (for the immediate problem), helping the AI reason much more like a human who learns from their own mistakes.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →