Should I Have Expressed a Different Intent? Counterfactual Generation for LLM-Based Autonomous Control
Amirmohammad Farzaneh, Salvatore D’Oro, Osvaldo Simeone · 2026
Read Should I Have Expressed a Different Intent? Counterfactual Generation for LLM-Based Autonomous Control by Amirmohammad Farzaneh, Salvatore D’Oro, Osvaldo Simeone (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-20090.txt.
Introduction
Amirmohammad Farzaneh, Salvatore D'Oro, and Osvaldo Simeone give users of AI agents a way to ask what if. Language model agents turn a user's stated intent into plans and actions. After seeing an outcome, a user may wonder whether different wording would have done better. The authors build a framework for that counterfactual reasoning.
The framework explores alternative phrasings of the original intent and estimates their outcomes. Crucially, it provides formal reliability guarantees on those estimates. Without guarantees, counterfactual answers are just more model guesses. Reliable what-if analysis helps users phrase instructions better next time. It also helps designers see which intents are fragile. The work brings counterfactual thinking to everyday agent control. A guess with no bounds is just a guess.
Catalog record
| CREATOR | Amirmohammad Farzaneh, Salvatore D’Oro, Osvaldo Simeone |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 54 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-20090
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Should I Have Expressed a Different Intent? Counterfactual Generation for LLM-Based Autonomous Control Amirmohammad Farzaneh, Salvatore D’Oro, Osvaldo Simeone Abstract Large language model (LLM)-powered agents can translate high-level user intents into plans and actions in an environment. Yet after observing an outcome, users may wonder: What if I had phrased my intent differently? We introduce a framework that enables such counterfactual reasoning in agentic LLM-driven control scenarios, while providing formal reliability guarantees. Our approach models the closed-loop interaction between a user, an LLM-based agent, and an environment as a structural causal model (SCM), and leverages test-time scaling to generate multiple candidate counterfactual outcomes via probabilistic abduction. Through an offline calibration phase, the proposed conformal counterfactual generation (CCG) yields sets of counterfactual outcomes that are guaranteed to contain the true counterfactual outcome with high probability. We showcase the performance of CCG on a wireless network control use case, demonstrating significant advantages compared to naive re-execution baselines. 1 Introduction Context and Motivation: Large language models (LLMs) are increasingly being used as decision-making agents in autonomous control pipelines [ 13 , 30 ] . In such agentic AI systems, a human user specifies a high-level goal or intent in natural language, and an LLM-based agent must interpret this intent, plan a sequence of actions, execute them, observe the outcomes, and finally report back to the user. Figure 1 : (a) Example of the agentic framework studied in this work: A network operator provides an intent as a prompt to an LLM-based agent. The agent translates this prompt into an action, which is used to configure the network. The network executes the action, and returns environment feedback to the LLM in the form of KPIs, which the LLM processes and summarizes into a report for the operator. (b) LLM-environment interaction model: The user provides a prompt X , which the LLM maps to an action A . The environment executes action A and produces feedback Z . The LLM then combines (X,A,Z) to generate the response Y , which is returned to the user. (c) Given a factual episode T=(X,A,Z,Y) , the network operator chooses a counterfactual prompt X^{\prime} . Given an observed factual episode T=(X,A,Z,Y) , our goal is to estimate the counterfactual report Y_{X^{\prime}}(T) that the user would have received, under the same conditions, had the input prompt been X^{\prime}\in\mathcal{E}(X) instead of X (see Fig. 2 for an example). A recent example of such settings is given by AgentRAN [ 6 ] . AgentRAN is an agentic network control framework in which, as illustrated in Fig. 1 , a wireless cellular network operator provides a plain-text intent, such as a configuration request. The LLM agent issues corresponding network commands, and the network, returns key performance indicators (KPIs). Finally, the agent generates a summary report of the outcome for the operator. Once the agent presents its report, the human may naturally ask “what if” questions about alternative instructions or intents. For instance, in the AgentRAN scenario, the operator may wonder what would have happened if the intent had been phrased differently or if different KPI targets had been indicated to the LLM-based agent. An example can be found in Fig. 2 . Addressing such counterfactual queries requires reasoning about both the agent’s internal decision process and the environment’s response under the hypothetical counterfactual scenario that a different intent had been expressed. All else being equal, a different user prompt could cause the agent to choose a different plan of actions, which in turn would induce a different environment trajectory and outcome. While the agent’s internal operation is typically accessible, making it possible to study counterfactual actions by the agent [ 26 , 4 ] , reasoning about alternative environment responses requires a simulation-in-the-loop approach [ 12 ] . Developing a method to reliably evaluate these counterfactual outcomes – as if the user had expressed a different intent — is the problem we address in this work. Figure 2 : An example of a factual episode with a true and a generated counterfactual report. Emphasis (bold fonts) added to highlight the main differences between factual and counterfactual intents. Main Related Work: Counterfactual generation with LLMs has been recently studied in text-generation settings by reformulating LLMs as structural causal models (SCMs) [ 24 , 23 ] . This enables the generation of true counterfactual text by reusing the same sampling noise for original and perturbed prompts [ 26 , 4 ] . However, these methods do not account for interactions with an external environment. The counterfactual inference of network KPIs under alternative configurations was studied in [ 11 ] , building on the framework in [ 15 ] . These works apply to settings in which the operator directly sets actions and observes outcomes. Thus, they do not account for the presence of an LLM agent as the intermediary between operator and system. Recent work on conformal language modeling (CLM) has introduced a principled framework for endowing LLM text generation with statistical guarantees. This is done by producing sets of candidate generations whose miscoverage with respect to a task-specific admission function is controlled via conformal calibration [ 25 ] . See also [ 14 , 7 , 2 ] for related work. All these prior studies focus on standalone text generation and do not account for closed-loop interactions between an LLM agent and an external environment. Figure 3 : SCM of the agent-environment pipeline: The user prompt X influences the action A chosen by the LLM, which in turn affects the environment feedback Z . Finally, the LLM combines (X,A,Z) to generate the response Y . The exogenous variables U_{A} , U_{Z} , and U_{Y} capture the randomness specific to the action, the environment, and the textual response, respectively, and are assumed independent of X . Main Contributions: This work addresses the problem of reliable counterfactual generation in LLM-powered autonomous control systems, enabling operators to obtain trustworthy answers to the question “What would have happened if I had expressed a different intent?” As exemplified in Fig. 2 , counterfactual prompts may capture the following types of differences with respect to the factual prompt: ( i ) different environmental contexts; ( ii ) different design goals and targets of the user; and ( iii ) different prompt designs expressing the same contexts, goals, and target. \bullet Agent-environment counterfactual generation: We introduce an SCM, shown in Fig. 3 , that unifies token-level LLM counterfactual reasoning [ 26 , 4 ] with environment-level causal inference [ 24 ] . The SCM incorporates the true LLM architecture for the agent, and a learned simulator for the environment. Based on the SCM in Fig. 3 , we introduce a counterfactual generation (CG) methodology that proceeds via abduction to produce an estimate of the true counterfactual report in response to a counterfactual prompt. \bullet Conformal counterfactual generation: Through test-time scaling, CG can produce a set of counterfactual reports. We introduce conformal CG (CCG), a calibration framework that ensures that, with high probability, at least one element of the set constitutes a semantically faithful approximation of the true counterfactual outcome, while minimizing the cardinality of the set (see Fig. 4 ). \bullet Experimental results: Through experiments in a network control scenario, CG