← Latest papers
💬 NLP

RIMRULE: Improving Tool-Using Language Agents via MDL-Guided Rule Learning

RIMRULE is a neuro-symbolic approach that enhances large language models' tool-use reliability in domain-specific settings by dynamically injecting compact, interpretable rules distilled from failure traces via a Minimum Description Length objective, thereby improving accuracy across seen and unseen tools without modifying model weights.

Original authors: Xiang Gao, Yuguang Yao, Qi Zhang, Kaiwen Dong, Avinash Baidya, Ruocheng Guo, Hilaf Hasson, Kamalika Das

Published 2026-07-09
📖 4 min read☕ Coffee break read

Original authors: Xiang Gao, Yuguang Yao, Qi Zhang, Kaiwen Dong, Avinash Baidya, Ruocheng Guo, Hilaf Hasson, Kamalika Das

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 teaching a very smart, but slightly clumsy, robot assistant how to use a new set of tools. Maybe the tools are weird, the instructions are missing, or the robot keeps pressing the wrong buttons.

In the past, if the robot failed, we had two main ways to fix it:

  1. Show it examples: "Here is how I did it once, try to copy me." (This is like showing a student a textbook example).
  2. Rewire its brain: We would retrain the robot from scratch to remember the new way. (This is expensive, slow, and you can't easily share the new "brain" with other robots).

The paper introduces a third, smarter way called RIMRULE. Think of it as teaching the robot to write its own cheat sheet based on its mistakes.

Here is how it works, broken down into simple steps:

1. The "Oops" Moment (Learning from Failure)

First, the robot tries to do a task and fails. Maybe it tried to call a tool incorrectly. Instead of just saying "try again," the system looks at why it failed.

  • Analogy: Imagine you are trying to bake a cake, but you burn it because you forgot to preheat the oven. Instead of just baking another one and hoping for the best, you write a note: "If the recipe says 'bake,' check the oven temperature first."

2. Writing the Cheat Sheet (Rule Generation)

The robot (using a Large Language Model) looks at its mistake and writes a simple rule to fix it.

  • The Twist: The robot doesn't just write a long, messy paragraph. It writes a short, clear "If-Then" rule.
    • Example: "IF the user asks about family trees, THEN break the question into smaller steps (find the mom, then find the grandpa) instead of asking for the whole thing at once."

3. The "Editor" (MDL Consolidation)

At first, the robot might write 100 rules, many of which are repetitive or too specific (e.g., "If the user asks about John's mom..." and "If the user asks about Sarah's mom...").
The system uses a principle called Minimum Description Length (MDL). Think of this as a strict editor who says, "Stop writing 100 rules. Combine them into one powerful rule that covers all cases."

  • The Goal: Keep the cheat sheet as short and simple as possible while still fixing the most problems. This makes the rules easy to read and easy to remember.

4. The "Pocket Guide" (Retrieval)

When the robot faces a new task, it doesn't read its entire 100-page history book. Instead, it quickly looks up the specific rule that applies to the current situation and puts it in its "pocket" (the prompt).

  • Analogy: It's like a mechanic who, before fixing a car, quickly checks their pocket for the specific manual page about "brake squeaks" rather than reading the whole book on how cars work.

Why is this special?

  • It's Portable: Because the rules are written in plain English (and a simple code format), you can take the cheat sheet written by a "dumb" robot and give it to a "super-smart" robot. The smart robot doesn't need to be retrained; it just reads the new cheat sheet and gets better immediately.
  • It's a "Cheat Sheet," not a "Brain Surgery": Unlike other methods that require retraining the model (which is like brain surgery), this just adds a note to the instructions. It's fast and doesn't change the robot's core personality.
  • It Works on New Tools: Even if the robot has never seen a specific tool before, if the rule says "Always check the tool's requirements first," that advice still helps.

The Results

The researchers tested this on two big sets of tool-use challenges. They found that:

  1. Giving the robot these cheat sheets made it much better at using tools, even on tasks it had never seen before.
  2. It worked better than just showing examples or trying to optimize the text prompts.
  3. It even helped robots that were already "fine-tuned" (trained specifically for the job), acting as a safety net to catch remaining mistakes.

In short: RIMRULE teaches AI to learn from its mistakes by writing its own simple, reusable instructions, rather than just memorizing examples or rewriting its entire brain. It turns "trial and error" into a permanent, shareable lesson.

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 →