← Latest papers
💬 NLP

SafeRun: Enabling Determinism in LLM Planning for Running

SafeRun is a framework that ensures deterministic and safe running plans by decoupling an LLM's flexible natural-language interpretation from a deterministic solver's strict constraint enforcement, achieving 100% safety compliance while maintaining competitive instruction-following capabilities.

Original authors: Meilin Chen, Zepeng Zhai, Jiaxuan Zhao, Yuan Lu

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

Original authors: Meilin Chen, Zepeng Zhai, Jiaxuan Zhao, Yuan Lu

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 Problem: The "Creative but Reckless" Coach

Imagine you ask a very smart, creative AI to plan your running schedule. You say, "I want to run 50 kilometers a week for 8 weeks, with one hard workout every Tuesday."

The AI is great at understanding your words. It's like a talented storyteller who can write a beautiful, exciting story about running. However, the AI is also probabilistic—it guesses the next word based on patterns, not strict math.

In the world of running, this is dangerous. If the AI accidentally schedules two hard workouts back-to-back or makes you run too far in one day, you could get injured. It's like asking a storyteller to design a bridge; they might make it look beautiful, but if they don't follow the laws of physics, the bridge collapses.

The paper calls this the "determinism gap." In safety-critical tasks (like running plans), you can't rely on the AI's "best guess." You need 100% certainty that the rules are followed.

The Solution: SafeRun (The "Creative Writer" + The "Strict Engineer")

The authors propose SafeRun, a new way to use AI that separates the "creative thinking" from the "safety checking."

Think of SafeRun as a two-person team working on a project:

  1. The Translator (The LLM): This is the AI. Its only job is to listen to you and translate your messy, natural language requests into a clear, structured list of instructions. It cannot build the plan itself. It just writes the "shopping list."
  2. The Engineer (The Deterministic Solver): This is a rigid, math-based computer program. It takes the shopping list from the Translator and builds the actual plan. It has a set of unbreakable rules (like "no two hard runs in a row" or "max 50km per week"). If the plan doesn't fit these rules perfectly, the Engineer rejects it and asks the Translator to try again.

The Analogy:
Imagine you are ordering a custom cake.

  • Old Way (Pure AI): You tell a baker, "Make me a cake that is safe to eat but also has 500 candles." The baker tries to guess what you mean. They might put 500 candles on a tiny cupcake, causing it to catch fire (unsafe).
  • SafeRun Way: You tell a Translator (who speaks your language), "I want a cake with 500 candles." The Translator writes a note for the Engineer (a robot baker). The Robot Baker has a rule: "No cake can have more than 10 candles per inch." The Robot calculates exactly how big the cake needs to be to hold 500 candles safely. If the cake is too small, the Robot says, "Nope, that's unsafe," and asks the Translator to adjust the order.

How It Works in Practice

The paper tested this system by creating a "Running Planning Benchmark." They gathered 100 different requests from real runners and 10 different runner profiles (from beginners to experts).

They tested SafeRun against two other methods:

  1. Prompt Engineering: Just asking the AI nicely to follow the rules.
  2. CodeAct: Letting the AI write its own code to solve the problem (but without a strict safety guard).

The Results: Safety First

The results were dramatic:

  • Safety Score:
    • Old Methods: The AI got it right about 79% of the time (Prompt Engineering) and 97% of the time (CodeAct). That means in 1 out of 5 or 1 out of 30 cases, the plan was unsafe.
    • SafeRun: 100%. Every single plan generated was safe. The "Engineer" never let a bad plan pass.
  • Instruction Following:
    • SafeRun didn't just make safe plans; it also listened well to what the user wanted. It scored slightly better than the other methods at actually doing what the user asked (like running the right number of days).

Why This Matters (According to the Paper)

The paper argues that for things where mistakes can cause physical harm (like running, medical dosing, or driving), we cannot trust AI to "guess" the right answer.

SafeRun proves that you can have the flexibility of human language (talking to the AI like a coach) while keeping the rigid safety of a math formula. The AI handles the "what do you want?" and the computer handles the "is this safe?"

The Limitations

The authors are honest about what SafeRun can't do yet:

  • It only works for running right now. The "Engineer" was built specifically for running rules.
  • It only tests requests that can be solved. If you ask for an impossible plan (e.g., "Run 1,000km a week"), the system is designed to handle feasible requests, not necessarily to negotiate impossible ones (though it does warn users).

Summary

SafeRun is like hiring a creative translator to talk to a strict safety inspector. The translator understands your dreams, and the inspector ensures those dreams don't break the laws of physics. The result is a running plan that is both personalized and 100% safe.

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 →