← Latest papers
🤖 AI

Trace2Policy: From Expert Behavior Traces to Self-Evolving Decision Agents

Trace2Policy introduces an error-driven iterative skill refinement (EISR) framework that systematically recovers and improves expert decision rules into high-accuracy, deterministic Python code, outperforming both static LLM distillation and pure-LLM baselines in compliance-sensitive tasks while significantly reducing refinement costs.

Original authors: Junli Zha, Jinbo Wang, Chao Zhou, Xiang Song

Published 2026-06-10
📖 5 min read🧠 Deep dive

Original authors: Junli Zha, Jinbo Wang, Chao Zhou, Xiang Song

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 a busy logistics company where expert auditors spend their days reviewing thousands of shipping claims. They look at photos, read reports, and decide: "Is this damage the carrier's fault, or the sender's?" These experts make these decisions based on a complex, unwritten set of mental rules they've learned over years. They know things like, "If the photo shows a torn box but the system says 'intact,' trust the photo," or "If the reviewer wrote a note starting with 'C:', it means they are secretly reassigning liability."

The problem is that these rules are stuck inside the experts' heads. If you try to teach a computer (an AI) to do this job just by showing it a few examples, it gets confused. It misses the subtle, hidden tricks the experts use.

Trace2Policy is a new system designed to solve this. Think of it as a "Rule Extraction and Refinement Machine." Here is how it works, using simple analogies:

1. The Detective Phase (Capturing Behavior)

First, the system acts like a silent detective. It watches the expert auditors work on their computers, recording every click, every screen they look at, and every note they type. It doesn't just record what they clicked; it tries to understand why they did it.

  • Analogy: Imagine a coach recording a master chef cooking a complex dish. The coach doesn't just write down "add salt"; they note, "The chef tasted the soup, frowned, and added a pinch of salt because the broth was too acidic."

2. The Drafting Phase (The First Attempt)

The system takes these recordings and asks a smart AI to write down the rules it thinks the chef is following.

  • The Problem: The first draft is usually shallow. It captures the obvious steps ("Check the box") but misses the deep, hidden logic ("Check the current code, not the original code, because the system updates in real-time").
  • The Result: This first draft (called "v1 Skills") is okay, but it only gets about 70% of the decisions right. It's like a student who memorized the textbook but hasn't learned the trick questions on the final exam.

3. The "EISR" Engine (The Magic Loop)

This is the core innovation. The system uses a process called EISR (Error-driven Iterative Skill Refinement).

  • How it works: The system runs the draft rules against a test set of cases. When it makes a mistake, it doesn't just say "Wrong." It acts like a strict editor:
    1. Diagnose: It groups the mistakes. Are they "Missing" (no rule covered this)? "Wrong" (the rule existed but gave the wrong answer)? Or "Conflicting" (two rules fought each other)?
    2. Patch: It writes a specific fix for that group of errors.
    3. Safety Check (The Regression Gate): Before saving the fix, it runs the old correct cases again. If the new fix breaks anything that was working before, it throws the fix away.
  • Analogy: Imagine a mechanic fixing a car engine. Every time they tighten a bolt to fix a rattle, they immediately test the engine to make sure they didn't accidentally loosen the spark plugs. They keep doing this until the car runs perfectly without breaking anything else.

4. The "Trap Rules" Discovery

Through this loop, the system found "Trap Rules"—deep knowledge that no one could have written down in a single interview.

  • Example: One trap was that a specific code on the screen might look like "Shared Liability," but it was actually just a temporary label that changed from "Packaging Damage" five minutes ago. The experts knew to ignore the label and look at the action the reviewer took. The AI only learned this after making the mistake repeatedly and being corrected.

5. The Final Product: Compiled vs. Prompt

The paper makes a very specific and surprising claim about how the rules are used:

  • The Prompt Method: You can feed the rules to an AI as a long list of instructions (a "prompt"). This works, but it's like asking a genius to solve a math problem while reading a 50-page manual. It gets about 70% right.
  • The Compiled Method: The system translates those rules into a strict computer program (Python code). This is like turning the manual into a calculator that just does the math.
  • The Result: The "Compiled" version jumped to 79.6% accuracy. The paper argues that for these specific, rule-heavy tasks, the quality of the rules matters more than the intelligence of the AI. A smart AI following bad rules fails; a simple computer following perfect rules succeeds.

6. The "Flywheel" (Self-Improvement)

Once deployed, the system doesn't stop.

  • The Loop: Human auditors still review every case (as part of their normal job). The system compares its answer to the human's answer. If they disagree, the system flags it, analyzes the error, and automatically triggers another "EISR" round to fix the rule.
  • Cost: Doing this manually would take a human expert 70 hours per cycle. The automated version (Auto-EISR) does it for 55–10 and takes a few hours.

Summary of Claims

  • What it does: Turns expert behavior into self-improving decision rules.
  • What it found:
    • One-shot learning (asking AI once) fails to capture deep, hidden rules.
    • Iterative error correction (EISR) finds "trap rules" that boost accuracy significantly.
    • For these specific tasks, running the rules as a strict computer program is much better than asking an AI to read the rules as a prompt.
    • Adding an AI "safety net" (letting the AI fix the rules when it's unsure) actually lowered accuracy in this specific case because the AI was too eager to reject claims, whereas the rules were perfectly tuned to the company's specific needs.
  • Scope: This was tested on a logistics company's damage claims (3,349 cases) and a few legal reasoning benchmarks. The authors do not claim this works for every type of decision, but specifically for tasks where experts follow systematic, implicit rules.

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 →