arXiv:2611.07534cs.SENov 2026

Manuscript Offprint

arXiv:2611.07534

Route Before Response: Fail-Closed Routing for LLM-Enabled Customer-Service Software

Yuchen Cao, Zhenyu Mao, Jacky Wai Keung, Yifei Wang, Guancheng Lin, Jingyu Zhang

Yuchen Cao¹, Zhenyu Mao¹, Jacky Wai Keung¹, Yifei Wang¹, Guancheng Lin¹, Jingyu Zhang²,*

¹City University of Hong Kong, Hong Kong

{cynthcao2-c, zhenyumao2-c, ywang4748-c, guanchlin4-c}@my.cityu.edu.hk, Jacky.Keung@cityu.edu.hk

²Hong Kong Metropolitan University, Hong Kong

*Corresponding author: fzhang@hkmu.edu.hk

Abstract—LLM-enabled customer-service software in financial institutions must choose a downstream service before responding. Classifiers and LLM routers can identify a relevant label or destination, but a composed application must still verify dispatch permission and entity registration. We study this integration problem as boundary-aware pre-response routing. We present RouteBR, a controller in which one model call proposes a primary service action and registered object, then deterministic code checks identifiers and versioned rules before dispatch or a specified non-dispatch outcome. Lower-ranked candidates cannot replace a blocked primary route. We construct 600 privacy-preserving scenarios from recurring confidential-request patterns at a real financial institution; three engineers jointly reviewed the scenarios and labels. On the 200-case CONFIRM MAIN split, RouteBR reaches 97.5% final-path exact match. A matched one-call baseline given the same rules reaches 95.5%, whereas a diagnostic baseline without the rule program obtains 94.0% action accuracy but only 41.0% final-path exact match. Across 166 non-dispatch MAIN and FLIP cases, RouteBR produces no false dispatch. The artifact pairs all 1,960 prediction rows with raw receipts while excluding gold and reviewer fields from model requests. These results support separating model proposals from code-owned, replayable execution. Our implementation is available at https://github.com/YgcCoder/RouteBR.

Index Terms—large language models, LLM-enabled software, customer service, financial software, service routing

I. INTRODUCTION

LLM-enabled customer-service software in financial institutions increasingly connects one conversational entry point to information lookup, account analysis, advisory services, support workflows, and protected operations. Tool-augmented language models can interpret open-ended requests and construct calls to external services [1]–[4]. These destinations expose distinct interfaces, identifiers, and runtime preconditions. Together, they make the entry point a software integration boundary that passes requests, identifiers, and responsibility to downstream components.

Yet a service that matches the request is not necessarily allowed by the current software state and policy, and a referenced entity may not map to a valid system identifier [5]–[8]. Figure 1 fixes the request, history, and referenced object while changing only one permission value. One record dispatches the protected operation; the otherwise identical record ends in rejection. The correct downstream route therefore depends on runtime information that is absent from the request text.

A routing error at this boundary changes executable software behavior. For this study, a route has three fields: an action, an object, and an outcome. The action is one of five service operations: advisory, information lookup, account analysis, support, or a protected operation. When required, the object is a registered identifier used by the service; in our benchmark, it is usually a canonical ETF identifier. The outcome is either DISPATCH or one of four non-dispatch results: CLARIFY, DEFER, HANDOFF, or REJECT. Together, these fields define the final route. A false dispatch sends a request that should stop; a false block stops one that should be dispatched. Even valid JSON may name an unknown object or request an operation forbidden by the current state.

These failures define boundary-aware pre-response routing. Its input combines a request and history with a service catalog, registered objects, runtime state, and versioned rules. Its software-visible output is either an allowed action-object dispatch or a specified non-dispatch outcome. Unlike destination selection alone, this task requires the semantic action, referenced object, current state, and final outcome to agree before execution. The objective is to preserve flexible language interpretation while ensuring that the selected service is permitted, every required object is registered, and the decision can be replayed from recorded software inputs. The acceptance object is therefore a complete executable route rather than an isolated label.

Prior work covers individual stages. Intent and out-of-scope methods return labels or abstain, LLM routers choose destinations, and tool-use methods produce calls and arguments [9]–[12]. Entity linking maps mentions to registered identifiers, and runtime controls constrain later transitions [5]–[8]. Without a separate pre-dispatch verification layer, these outputs do not establish a complete route in our setting. Three conditions remain: the service matches the request, state and policy permit it, and any required object resolves to a registered identifier. A local result can appear correct while the composed system dispatches a forbidden service or invalid object [13]–[16]; evidence from source-code tasks likewise cautions against relying on an LLM's own verification of flawed outputs [17].

We present RouteBR, which stands for Route Before Response, as a pre-response controller for this boundary. One model call proposes a primary service action and registered object. The controller keeps that primary choice, so a lower-

Figure

Fig. 1. Motivating state-conditioned route. The request and object are fixed; changing only permission from true to false changes the result from protected-operation dispatch to rejection. Matching the request to a service does not by itself determine an executable route.

ranked alternative cannot replace it after a rule blocks dispatch. Deterministic code applies the recorded state and policy, and the object check verifies the registered identifier before the controller emits either a typed dispatch or a specified non-dispatch outcome. Alternatives are recorded for inspection only and cannot be dispatched. In this way, the model interprets the request while ordinary code owns the final software transition. Our contributions are:

  • We formulate boundary-aware pre-response routing as a software decision over a service action, registered object, runtime state, and final routing outcome.
  • We design RouteBR, which separates model proposals from code-owned state checks, closed-list object validation, controlled repair, and replayable decision traces.
  • We construct a privacy-preserving benchmark of 600 synthetic reconstructions from recurring confidential-request patterns, jointly reviewed by three engineers from the institution and organized into MAIN, FLIP, and ENTITY cases.
  • We evaluate complete-path correctness, state-conditioned execution, the closed-list object contract, and backend portability through matched one-call controls, two controlled mechanism checks, and six hosted model backends.

References (34)