arXiv:2610.18820cs.AIOct 2026

Manuscript Offprint

arXiv:2610.18820

Read the Room Before Your Model Generates

Muyao Kong, Zhihao Lin

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models (LLMs) generally rely on sampling temperature to regulate the amount of randomness in their outputs. Mainstream methods for selecting temperature typically involve fixed, heuristic global settings and context or token-level calibration, rather than a geometrically interpretable representation of the communicative scenario. In this work, we introduce a simple and interpretable temperature selection framework, the Scenario-Actor, which adapts decoding to the inferred situational characteristics. Scenario-Actor extracts scenario-relevant structures from Transformer hidden states and determines the temperature from scenario embedding, a structured geometric representation of the communicative setting. Empirical results show that on Llama-3.1-8B-Instruct, Scenario-Actor achieves strong goal-completion performance in interactive social scenarios, significant gains on open-ended instruction following, and competitive performance on multi-turn conversation compared to multiple baselines.

1 Introduction

Large language models (LLMs) generate text by repeatedly sampling from a conditional next-token distribution. One of the simplest yet most consequential hyperparameters in language generation is the sampling temperature, which controls the sharpness of the next-token probability distribution and, in turn, the rigor and creativity of model output.

Existing systems typically set it globally or adapt it according to predictive uncertainty, context, or learned decoding objectives, which implicitly treat decoding primarily as a property of the model's predictive state (Dhuliawala et al., 2024; Wang et al., 2020). But socially situated language generation exposes a different source of variation: the interaction itself. A prompt conveys not only semantics but also implies a communicative setting. For example, the conversation could be either an academic discussion or a friendly chitchat, whose desired responses are either rigorous or open-ended, formal or casual. The optimal temperature is then circumstantial, varying across scenarios.

Figure

Figure 1: AgentSense goal-outcome flip rate (top) and goal completion score (bottom) by changing temperature.

In our controlled experiment, we decode 245 AgentSense (Mou et al., 2025) social interactions with four fixed temperatures. We found that first, changing temperature substantially alters interaction quality, moving between mid-range temperatures flips 16 to 17% of individual goal outcomes; second, globally strongest temperature setting does not dominate across interactions.

∗^{*}Equal contribution.

†^{\dagger}Corresponding author.

Such results show a major limitation of viewing temperature as a globally fixed hyperparameter, which motivates us to propose a way to control scenario-aware interaction and language generation. In this work, we propose Scenario-Actor, a framework for scenario-adaptive temperature selection. Scenario-Actor focuses on social interactions and open-ended instruction following, where the prompt provides enough evidence to infer a communicative scenario. We introduce a structured representation of the communicative setting extracted from context - the scenario embedding 1^{1}, whose span defines the scenario space, and use it to derive the sampling temperature. Specifically, our method maps a representation from the r-th layer of the Transformer to an m-dimensional scenario space, where each prompt is represented by a scenario embedding. An Actout function then maps the geometry of this vector to a prompt-level sampling.

Prior work in social psychology provides us with a theoretical support by introducing DIAMONDS (Rauthmann et al., 2014), a working model of situation characteristics showing that human behavior varies with situation characteristics. We construct scenario axes from nine pre-defined scenario labels. At the end, five scenario axes are constructed, corresponding to five of the eight DIAMONDS - Duty, Intellect, Adversity, Negativity, and Sociality (Rauthmann et al., 2014). Evaluations across fixed and random temperature policies, nucleus sampling (Holtzman et al., 2020), and EDT (Zhang et al., 2024) baselines indicate Scenario-Actor's competitive performance on interactive social scenarios, open-ended instruction following, and multi-turn dialogue compared to most decoding strategies.