TL;DR
Large language models can now write reusable simulation programs to model complex operational workflows, which platforms typically validate by checking if the code can accurately replay past logs. However, reproducing the past doesn't mean a simulator understands causality: an AI-generated program might hard-code historical constants and fail spectacularly when asked a counterfactual "what-if" question. This paper introduces Vouch, a lightweight assurance library that actively probes generated simulators with targeted, question-specific tests before letting you trust a single answer.
What Problem Does This Paper Address?
Instead of paying an LLM to reason through massive operational logs every time you have a question, you can have it write a Python simulator once from your process rules and historical records, then run that code cheaply forever. To verify that the generated code works, platforms usually run a history check: feed the simulator past inputs and see if it reproduces recorded outcomes. If it passes, the whole program gets a blanket green light.
Here is the catch: matching history is a surprisingly weak test for counterfactuals. Imagine a loan-application log where every past applicant happened to take exactly one day to fill out a form. An LLM-generated simulator might lazily ignore the actual per-applicant data in the logs and hard-code duration = 1 day. It will pass every history check with a 100% score. Yet the moment you ask, "What if Sarah finished her form in 1 second?", the simulator predicts a full-day delay anyway. Because historical data never varied that specific parameter, the bug stayed invisible—a classic case of model underspecification.
Methods
Rather than issuing a single pass/fail grade for an entire simulator, the authors propose intervention-level assurance via a Python library called Vouch. Vouch acts as a gatekeeper for individual answers without ever peeking at ground-truth labels or the final answer value itself:
- Structured Translation & Contract Check: One LLM call translates a natural-language what-if question into a structured intervention (target, time, operation), which is deterministically checked against document tables to catch hallucinated names or impossible values.
- Exact History Check: Vouch verifies that the program reproduces the baseline historical run down to the exact second or item.
- Change-Specific Metamorphic Tests: Since there is no ground-truth "oracle" for a hypothetical future, Vouch tests relationships between inputs and outputs (known in software engineering as metamorphic testing). For instance, an input-use test alters the same type of variable on a different case in the logs; outputs after that event must shift, and nothing before it is allowed to move (causality!). Other rules verify that unavailable workers start zero tasks during restricted hours, or that routing probability shifts alter paths where expected.
- Capability Record: Vouch maintains a memory of which change types a specific program has passed or failed, instantly blocking future questions that rely on a broken mechanism without wasting compute.
Datasets
The authors built a new benchmark of 547 test questions across four domains: Loan Applications, Pharmacy Workflows (derived from published business-process models), Manufacturing (SupplyGraph logs), and IT Operations (Google cluster traces).
Crucially, evaluating counterfactuals in stochastic workflows is tricky—removing one customer usually shifts the random number generator stream for everyone else, turning a clean "what-if" into two unrelated timelines. Using the common-random-numbers technique, the authors pinned every random draw to specific cases and printed them in the documents, guaranteeing exact, deterministic ground-truth answers verified by independent reference engines. They also included no-effect controls (valid changes that shouldn't alter the queried outcome) and policy variants (e.g., adding a worker to a pool). Across three generation platforms (OTF-Tools, DEVS-Gen, and a coding agent) and five LLMs, they evaluated 86 generated programs over 9,792 program–question pairs.
Key Insights and Ideas
- Silent bugs hide in unvaried parameters: Out of 277 wrong answers produced by Claude-built programs, 195 occurred after changing routing probabilities—a parameter that remained static in historical logs, allowing broken simulators to breeze past history checks.
- Targeted probing beats random poking: Ablation tests showed that generic, randomly sampled input-use tests missed almost every error (leaving 205 of 207 history-check survivors intact). You have to test the specific causal mechanism the user is asking about.
- Give an AI a sandbox, and it still might just skim the code: Even when compared against a ReAct LLM agent given a Python sandbox to test the simulator itself, the agent only bothered to execute the code ~42% of the time (Haiku) or 22% of the time (Sonnet), preferring to guess by reading.
Key Results
- Error Reduction: On simulators built by Claude Haiku 5.5 and Sonnet 5.5, standard history checks let 207 wrong answers slip through. Vouch caught nearly all of them—leaving just 5 wrong answers (a 97.6% reduction from the 207, or 0.1% error rate) while still trusting 80.1% of all pairs.
- Platform Concentration: Nearly the entire gain came from OTF-Tools R1, where 202 wrong answers survived history checks and Vouch caught 100% of them through failed tests (not mere abstention), at the cost of falsely declining ~6% of valid answers.
- Outperforming LLM Judges Cheaply: At matched coverage, Vouch accepted significantly fewer wrong answers than Claude Haiku answer-level (0.2% vs. 1.1%), program-level (0.1% vs. 3.5%), and ReAct (0.0% vs. 1.4%) judges, as well as a dedicated decision model (Jev, 2.3%). Plus, Vouch requires zero extra LLM calls beyond parsing the question—just ~1.54 extra program executions (~4.2 seconds median).
Limitations and Future Work
- Brittle under policy changes: When process rules actually changed (e.g., adding an extra pharmacist), every pre-built simulator failed the baseline history check, causing Vouch to reject 100% of answers. Meanwhile, simply checking if the simulator agreed with an LLM reading the text directly salvaged 47.4% of answers error-free. Figuring out how to salvage simulators when history no longer applies remains an open problem.
- Synthetic transparency & shared model families: Real-world businesses don't print future random draws in their logs, and template-based questions are cleaner than human queries. Furthermore, Claude models assisted in building the reference engines, simulators, and judges, leaving a slight risk of shared blind spots despite independent verification.
Summary updated