AI
New method improves how language models use tools by learning interpretable rules from failures
Researchers propose RIMRULE, a technique that distills actionable rules from LLM errors to boost tool-use performance without retraining models.
Language models often stumble when adapting to specialized or custom tools, especially in domain-specific workflows where API documentation is sparse or non-standard. A new research approach called RIMRULE tackles this challenge by extracting interpretable rules directly from failure cases and feeding them back into the model during inference.
How RIMRULE Works#
The method combines neural and symbolic AI: compact, human-readable rules are distilled from traces of LLM errors and temporarily injected into the prompt to steer the model toward correct behavior. Rather than rewriting the model's weights, RIMRULE operates at inference time by proposing rules that the model itself generates, then consolidates those rules using a Minimum Description Length (MDL) objective—a principle that favors patterns that are both general and concise. Each rule is kept in two forms: natural language for interpretability and a structured symbolic representation for efficient lookup during use.
Key Advantages#
The approach works across multiple LLM architectures, including long-reasoning models. Rules learned from adapting one model can be reused to improve others, demonstrating portability of symbolic knowledge. Experiments show RIMRULE outperforms prompt-based adaptation and complements traditional finetuning, while achieving accuracy gains on both familiar and novel tools without modifying model weights.
Research Context#
The work originates from arXiv and addresses a practical problem: as language models move into production environments with idiosyncratic or proprietary APIs, they need ways to learn new tool behaviors on the fly. This neuro-symbolic approach offers a middle ground between fixed prompting and expensive retraining.

