Client Exits - A Way to Increase LLM Transparency on the Client Side

Marc JansenarXiv 2026 · arXiv

TL;DR

This paper introduces Client Exits, a lightweight architectural pattern that allows Large Language Models (LLMs) to signal where a response should be enriched with non-textual content (like graphs or tables) without the model needing to know how to render them. By inserting machine-interpretable markers into its output, the LLM separates semantic intent from presentation, enabling more transparent, interactive, and modality-aware user interfaces.

What Problem Does This Paper Address?

While LLMs are excellent at generating natural language recommendations, a wall of text is often a poor way to communicate complex decisions involving multiple trade-offs. If you ask for a holiday recommendation, a textual list of pros and cons is harder to parse than a comparison chart or a decision graph.

Current solutions usually involve the model generating brittle UI code (like Markdown tables or HTML) or the client forcing a rigid, pre-defined layout. This creates a "presentation boundary" problem: how can an LLM indicate that a specific visualization would be helpful at a specific point in its reasoning without prescribing exactly how that visualization should look? This is especially critical for accessibility; a "graph" marker might be rendered as an SVG on a desktop but as a spoken summary on a voice assistant.

Methods

The author proposes an inversion of the "User Exit" concept from classic software engineering. In a Client Exit, the producer (the LLM) exposes a semantic extension point, and the consumer (the client) decides how to realize it.

The architecture follows a clear pipeline:

  1. Generation: The LLM generates text containing special XML-style markers (e.g., <client exit="qoc.GraphOverview" />).
  2. Interpretation: The client identifies these markers before the user sees them.
  3. Realization: The client-side handler fetches or computes the necessary data and renders the enrichment (e.g., a React component for a graph).
Fig. 1. Client-exit architecture: the LLM inserts markers into its response, and the client interprets these markers to integrate supplementary information and adapt the presentation of the response.

To test this, the author fine-tuned a Qwen3.8-27B model using the Question–Option–Criteria (QOC) framework. This framework structures decision-making by explicitly linking a question to various options and the criteria used to evaluate them. The prototype modified the open-source LibreChat client to recognize three specific QOC markers and render them as interactive visualizations.

Datasets

The study utilized:

  • Fine-tuning Datasets: Two variants of a dataset based on QOC examples. One variant was "plain" text, while the other was enriched with Client Exit markers at appropriate semantic junctions.
  • Evaluation Set: A test dataset of 100 questions specifically designed to require multi-criteria analysis (e.g., "Where should we spend our next summer holiday?").

Key Insights and Ideas

  • MVC for LLMs: The approach is conceptually similar to the Model-View-Controller (MVC) pattern. The LLM provides the "Model" (data and markers), the client acts as the "Controller" (interpreting markers), and the final UI is the "View."
  • Semantic Intent vs. UI Layout: Instead of the LLM saying "Draw a bar chart here," it says "Provide a comparison of similar options here." This allows for high portability across different devices and modalities.
  • Transparency through Structure: By using the QOC framework, the Client Exits expose the structure of the model's analysis (how it weighted criteria vs. options) rather than just its final answer. This makes the rationale inspectable and potentially challengeable by the user.
Fig. 2. Graph overview integrated into the LibreChat response through the qoc.GraphOverview client exit.

Key Results

  • Reliability: The fine-tuned model achieved a 100% marker-inclusion rate across the 100 test cases, successfully learning to place all three required markers in every response.
  • Preference: In an "LLM-as-a-Judge" evaluation, the judge preferred the responses from the Client-Exit-enabled model in 66% of comparisons.
  • Functional Transparency: The prototype successfully rendered complex data, such as "Criteria Influence" (ranking criteria by how much they actually differentiated the options), providing a level of detail that would be overwhelming in pure text.
Fig. 3. Criteria influence displayed through the qoc.CriteriaInfluence client exit, ranking criteria by their support spread multiplied by their importance.

Limitations and Future Work

The author notes several areas for further exploration:

  • Context-Sensitive Triggering: In this study, the model was trained to always emit all three markers. Future work needs to determine if models can learn to selectively use markers only when they add value.
  • Human-in-the-loop Evaluation: While the LLM judge preferred the enriched responses, a controlled user study is needed to see if these visualizations actually improve human decision-making or reduce cognitive load.
  • Formalizing the Contract: There is a need for a more robust "data contract" between the model and the client to ensure that the data required for a visualization (like scores and weights) is always present and correctly formatted within the response context.
  • Capability Negotiation: Ideally, a client should be able to tell the LLM which "exits" it supports before the generation begins.

Summary updated

Abstract

Textual recommendations generated by large language models (LLMs) can be difficult to inspect. This paper introduces \emph{Client Exits}, a lightweight mechanism for enriching LLM responses while separating semantic intent from client-specific presentation. The model inserts predefined, machine-interpretable markers into its output, and the receiving client decides whether and how to realize the corresponding enrichments. This allows supplementary information to be presented as graphics, text, speech, or other modalities without prescribing a concrete interface. We implement a prototype combining a finetuned Qwen model with a modified LibreChat client. Using the Question--Option--Criteria (QOC) approach including three XML-based client exits. We evaluate two QOC-oriented model variants trained on essentially the same examples, with client-exit annotations added for one variant. Across 100 test questions, the client-exit model includes all three markers in every response. An LLM judge, informed about the mechanism without being instructed to favor it, prefers this model's answers in 66\% of the comparisons. These results demonstrate successful marker generation on the evaluated test set and support the feasibility of client-controlled enrichment.
BibTeX
@misc{jansen2026client,
  author = {Marc Jansen},
  title = {{Client Exits - A Way to Increase LLM Transparency on the Client Side}},
  year = {2026},
  eprint = {2611.26309},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.26309},
}
Figure