arXiv:2610.38039cs.SEOct 2026

Manuscript Offprint

arXiv:2610.38039

Reusable LLM-Based Plans with Probabilistic Guarantees for Self-Adaptive Systems

Asher Tempest Arya, Rajan Maghera, Nicholas Wu Jiang, Federico Mora, Aren A. Babikian, Marsha Chechik

Asher Tempest Arya

University of Toronto

Toronto, Canada

asherarya@cs.toronto.edu

Rajan Maghera

University of Toronto

Toronto, Canada

maghera@cs.toronto.edu

Nicholas Wu Jiang

University of Toronto

Toronto, Canada

nwjiang@cs.toronto.edu

Federico Mora

University of Waterloo

Waterloo, Canada

federico@uwaterloo.ca

Aren A. Babikian

McGill University

Montreal, Canada

aren.babikian@mcgill.ca

Marsha Chechik

University of Toronto

Toronto, Canada

chechik@cs.toronto.edu

Abstract—Self-adaptive systems are designed to accommodate variants of their environment, which form a family of instances whose uncertainty is captured by probabilistic models, and must meet probabilistic requirements on each instance. Within such a family, changes in size and structure complicate the fundamental adaptation decision: whether to retain, reuse, or construct a new controller, since controllers are often synthesized for and specific to an instance. Large language models (LLMs) have recently been used to write reusable controllers, but existing approaches largely target deterministic domains, and probabilistic model checking of their output remains limited to preliminary single-instance studies. In this paper, we propose a verifier-guided framework for controller reuse with explicit support for families of environments. The framework introduces a novel combination of LLM-written controllers with probabilistic model checking to provide per-instance guarantees for probabilistic requirements. We evaluate our approach using three LLMs on three benchmarks, assessing its effectiveness and cost with respect to baseline implementations, the distribution of adaptation decisions, and the impact of individual framework components. On grid worlds, LLM-written rule lists are verified on about 90% of held-out instances, against at most 77% for the baselines, and verifying a stored rule list is 15 to 103 times faster than per-instance synthesis. Reuse serves most episodes at a small fraction of the cost of generation or per-instance synthesis, and model-checking feedback increases verified coverage over independent restarts.

Index Terms—self-adaptive systems, probabilistic model checking, large language models, controller reuse, generalized planning

I. INTRODUCTION

Motivation. Self-adaptive systems adjust their behavior at run time to keep meeting their requirements as their environment changes, typically through a MAPE-K loop [1].

A central adaptation decision is whether to retain the current controller, reuse another, or construct a new one. The decision is hard when the environment changes in size and structure, e.g., for a robot deployed in buildings whose maps differ, or for a Mars rover whose resource arbiter serves different numbers of requests. We call each such environment, e.g., one building, an instance of a family of environments. When elements inside the environment are uncertain, e.g., a robot's actions can fail or other agents act unpredictably, probabilistic requirements, such as the upper bound on the probability of a collision, are required.

Problem Statement. Before each run on an instance, the system must deploy a controller that is guaranteed to meet the probabilistic requirements on the model of that instance, which may be completely new. Probabilistic model checking at run time can establish whether a configuration of the system meets such requirements [2], [3]. Synthesizing a strategy for each instance with a probabilistic model checker such as PRISM [4] or Storm [5] gives this guarantee, but at the cost of reuse and speed. Each strategy applies only to its own instance. Synthesizing the full model of each new instance is slow, and delays every adaptation. Methods for families of Markov decision processes (MDPs) synthesize strategies that meet the requirements on every member [6], [7], but assume that all members share one state space.

Existing reusable controllers avoid repeated synthesis, but they are limited in their guarantees or in how far they generalize [8]–[10]. Large language models (LLMs) can write reusable controllers as generalized plans [11]–[14], but these generalized planners target deterministic domains, in which simply running a plan on an instance verifies it. Where probabilistic model checking has been applied to LLM output, it covers a single model [15]–[18].

To efficiently and verifiably deploy adaptive LLM-written controllers in uncertain environments, architectures must integrate LLM reasoning with formal probabilistic verification, supporting temporal and probabilistic requirements.

Contributions. In this paper, we propose a verifier-guided framework for adaptation through controller reuse and generation across families of stochastic environments. Our specific contributions are as follows: (1) We propose a verifier-guided adaptation mechanism that retains the current controller only if it is verified on the instance at hand, and otherwise selects a verified one from a library or generates a new one and adds it to the library. (2) We define generalized rule lists, a formal representation of reusable symbolic controllers (Fig. 1),

#ConditionAction
1g3any
2!wall & closer & !risky & !obstacle & !earlyany
3!wall & !obstacle & !early & !risky & !patrolany
4!wall & closer & !obstacle & !early & !patrolany
5!wall & !obstacle & !early & !riskyany
6wall & !obstacle & !early & !riskyany
7!wall & !obstacle & !earlyany
8trueany

Fig. 1. A rule list written by Claude Haiku 5.5 for three members ( 6×66 \times 6 to 8×88 \times 8) of a rooms family of grid worlds.

and a permissive strategy criterion [19] for verifying them on an instance. (3) We propose an LLM-based approach for generating and repairing controllers with verification feedback. (4) We empirically assess verified coverage and the effect of verifier feedback, and compare the cost of reuse with that of synthesis per instance on grid-world navigation, Pac-Man [20] and Mars Exploration Rovers (MER) [21]. We compare LLM-written rule lists with decision trees learned as in 1–2–3–Go! [10] and with policies trained by reinforcement learning.

Novelty and Significance. To the best of our knowledge, this paper is the first to combine LLM-written controllers with probabilistic verification to adapt across stochastic environments under temporal logic constraints. Our results provide insight into how far these controllers generalize across such environments and the costs of such adaptation decisions. On grid worlds, LLM-written rule lists are verified on about 90% of held-out instances, against at most 77% for the baselines, and verifying a stored rule list is 15 to 103 times faster than per-instance synthesis. Furthermore, since each guarantee comes from verification, our framework lets self-adaptive systems use LLM-written controllers without assuming that the LLM's output meets the requirements.

References (68)