← Latest papers
🤖 AI

Answer Engineering: Local Trajectory Editing for Protocol-Constrained Decision Making in Large Language Models

This paper introduces "Answer Engineering," a deterministic runtime layer that improves protocol adherence in large language models by applying localized, rule-guided interventions to reasoning trajectories during generation, achieving significant accuracy gains in clinical decision-making for sudden sensorineural hearing loss without requiring model retraining.

Original authors: Victor Lavrenko, Anastasiia Molodnitskaia

Published 2026-06-23
📖 4 min read☕ Coffee break read

Original authors: Victor Lavrenko, Anastasiia Molodnitskaia

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

The Big Problem: The "Confident but Wrong" AI

Imagine you hire a very smart, articulate intern to write a medical report. You give them a strict checklist (a protocol) they must follow to be safe.

  • The Issue: Even if you tell the intern, "Please follow the checklist step-by-step," they often get confident and write a report that looks logical but secretly skips a crucial safety step or jumps to a conclusion too early. They might write a beautiful explanation that justifies a wrong answer, rather than actually following the rules to find the right one.
  • The Paper's Finding: Simply asking the AI to "think step-by-step" didn't fix this. In fact, in their test, it made the AI worse at following the rules for the specific condition they were testing (Sudden Hearing Loss), dropping success rates from 54% down to 25%.

The Solution: "Answer Engineering" (The Real-Time Editor)

The authors propose a new method called Answer Engineering. Instead of trying to retrain the AI (which is expensive and slow) or just hoping it gets it right, they built a real-time editor that sits between the AI and the final answer.

Think of the AI's thinking process as a train moving along a track.

  • Standard AI: The train just keeps moving forward. If it takes a wrong turn, it keeps going until it hits a dead end or arrives at the wrong station.
  • Answer Engineering: This is like having a traffic controller standing on the tracks with a remote control. As the train moves, the controller watches every step.
    • If the train tries to skip a mandatory stop (a protocol rule), the controller hits the brakes.
    • The controller then rewinds the train slightly to the last safe spot.
    • It forces the train to take a different path or inserts a required signpost that the AI missed.
    • Then, the train continues from that corrected spot.

How It Works (The Three Moves)

The paper describes three specific ways this "traffic controller" fixes the AI while it's still writing:

  1. Editing the Past (The "Undo" Button): If the AI writes a sentence that violates a rule (e.g., "This is definitely a heart attack" before checking the symptoms), the controller deletes that sentence and replaces it with a safer, rule-compliant version.
  2. Rolling Back and Trying Again (The "Detour"): If the AI starts heading down a wrong path, the controller sends it back to the last intersection and asks, "Try a different direction." It tests a few options and picks the one that follows the rules.
  3. Forcing the Future (The "Mandatory Signpost"): If the rules say the AI must mention a specific warning (like "This is an emergency"), the controller simply inserts that phrase into the text before the AI can continue, ensuring the rule is never skipped.

The Results: Fixing the Train Tracks

The authors tested this on a medical scenario involving sudden hearing loss.

  • Before the fix: When the AI was just told to "think step-by-step," it followed the rules only 25% of the time.
  • After the fix: With the "Answer Engineering" editor watching and correcting the path in real-time, the AI followed the rules 83.5% of the time.
  • The Bonus: It didn't just fix the main problem; it also helped the AI avoid mistakes in other similar but different cases (conductive hearing loss), proving it wasn't just "guessing" the right answer but actually following the logic.

The Catch (Limitations)

The paper is honest about the limits of this approach:

  • It's a patch, not a cure-all: It works best when the rules are clear and the mistakes are local (like skipping a step). It can't fix everything if the AI's fundamental "personality" is to ignore the rules entirely.
  • It takes time: Because the system has to stop, check, and sometimes rewind the AI's thinking, it runs about 2.8 times slower than a normal AI.
  • It needs a human to write the rules: You still need a human expert to write the "traffic laws" (the rules) that the controller enforces. The system doesn't invent the rules itself; it just enforces them.

The Bottom Line

This paper shows that we don't always need to build smarter AI brains to get safer results. Sometimes, we just need a smart editor that watches the AI's work in real-time, catches it when it breaks the rules, and gently steers it back onto the right track before it finishes the job.

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 →