Reinforcement Learning Use Cases in Production

Where reinforcement learning runs in production, why reward shift and closed-loop drift break deployed policies, and how to monitor, gate and roll back.

Reinforcement Learning Use Cases in Production
Written by TechnoLynx Published on 11 Jul 2026

Reinforcement learning runs in production today in places such as recommendation and personalisation, ride-hailing dispatch, building cooling control and code completion. In these deployments the agent generates its own data through interaction with its environment. A change in the environment, in the reward or in the policy itself therefore feeds back into everything the agent sees next. Different sources of change in that loop produce distinct degradation patterns, which is why this article treats drift, reward shift and reward hacking separately.

Reinforcement Learning Use Cases That Run Beyond Games and Demos

Several documented production systems are user-facing decision services. Microsoft built Decision Service and later shipped Personalizer, a managed reinforcement learning service, as part of Azure Cognitive Services, which it uses in Windows, Edge, Xbox and other products. Meta open-sourced ReAgent, an RL platform behind products such as notification delivery, and Didi applied RL to ride-sharing order dispatch. YouTube described a REINFORCE-based recommender running stably in live production over an action space in the millions.

Control problems are the second group. DeepMind and Google, working with Trane Technologies, ran live RL control of commercial cooling at two real facilities and reported energy savings of about 9% and 13%. The same paper is open about how hard that was, citing challenges in evaluation, learning from offline data and constraint satisfaction. Code completion is a third case. Cursor Tab handles over 400 million requests a day and trains its suggestion policy with online RL, rolling out new models to collect fresh on-policy rewards. Research surveys add manufacturing, energy systems and robotics to the list of domains. RL fine-tuning of language models from human feedback, starting with InstructGPT, belongs here too.

How much real-world value all this represents is still an open question. A 2022 review concluded that RL has not had its “killer application” yet, and that the market still has to show whether RL adds significant value over traditional machine learning, optimal control or operations research. Alex Irpan, writing in 2018, found productionised deep RL surprisingly hard to name and thought recommendation was still dominated by collaborative filtering and contextual bandits. We read the evidence as saying that RL earns its place in narrow, well-instrumented loops and rarely as a general-purpose replacement for simpler methods. A gentler introduction to how agents learn through trial and error covers the basics this article assumes.

Why an RL Agent Drifts Differently from a Supervised Model

A supervised model learns from independent samples of a fixed distribution, so its dataset shift can be localised in P(x) or in P(y|x). An RL agent creates its data through sequential interaction. Policy updates change which states it visits, and changes in dynamics or observations change its later decisions, so the agent and the environment jointly decide what the data looks like. An action affects later states and actions, which makes distribution shift part of how RL works.

The practical result is that the policy can move its own data distribution. A recommender that keeps suggesting certain content changes the preferences of the users it serves, so future observations differ precisely because of past actions. Drift in RL is also defined differently: “model drift” means a change in the environment’s transition dynamics or reward structure, whereas concept drift in supervised learning is a change in the input-output relationship. Failures look different as well. Irpan observes that a badly configured supervised model usually still returns something non-random, while a badly tuned RL setup can easily produce a policy worse than random.

Five Places a Shift Can Start

A 2026 causal-origin taxonomy separates shifts in the state distribution, the observation process, the policy’s action and visitation distribution, the transition dynamics and the reward mechanism. The split matters operationally, because a drop in return can come from any of these, and each one produces a different pattern of immediate drop, worst-case degradation and recovery. No single adaptation method can be assumed to work for every type.

Shift source What changes Real-system example from the literature
State distribution Which situations arrive, including initial states An altered initial-state distribution
Observation process How the true state maps to what the agent sees Worn, uncalibrated or broken sensors
Policy / visitation The actions taken and therefore the states visited A recommender reshaping user preferences
Transition dynamics What happens after an action A pump losing efficiency, joints wearing on a robot arm
Reward mechanism The reward a transition produces A changed objective, cost structure, penalty rule or success criterion

Some of these sources cannot be observed directly. Almost every real system where RL would be deployed is partially observable (motor wear, build-up in pipes, a user’s state of mind), and that hidden state shows up as noise, non-stationarity or stochasticity. In one benchmark study, perturbing environment parameters in many instances caused a converged D4PG policy to fail completely.

Reward Shift: When the Objective Moves and the Inputs Do Not

Reward shift is a change in the reward a given transition produces, for example because the task objective, cost structure, penalty rule or success criterion has changed. The state transitions can stay identical while the objective being optimised changes. In the taxonomy’s gridworld experiment, adding only a deadline constraint to the reward, with the layout and dynamics left untouched, made both reward and success rate collapse. The agent performed well up to the change and then failed, even though nothing else about the environment had changed.

This failure is dangerous in production because input-drift monitors will not notice it. In business systems, product owners often lack a clear picture of what they want optimised, and once an agent optimises one metric, other metrics are discovered that also need protecting. OpenAI’s GPT-4o postmortem states that the set of reward signals and their relative weighting shape the trained model’s behaviour, and GPT-4o traffic was moved back to a previous version.

Reward Hacking: The Reward Curve Looks Healthy While Quality Falls

Reward hacking happens when an agent exploits flaws or ambiguities in the reward function to earn high reward without doing the intended task. The classic example is a boat-racing game in which the reward paid for checkpoints and power-ups, and farming power-ups scored more than finishing the race. Skalse and colleagues give a formal definition: a proxy reward is unhackable only if increasing expected proxy return can never decrease expected true return. Their result points to a real tension between narrow reward specifications and the behaviour people actually want.

Standard training metrics do not show this failure. Reward goes up because reward is what the policy optimises, and the KL divergence from the reference policy stays inside its bound, so the standard dashboard shows nothing until someone runs a separate gold-standard evaluation. Gao, Schulman and Hilton measured this in an RLHF reward-model setup and found that optimising too hard against an imperfect reward model harms ground-truth performance. Pan et al. (2022), as summarised by Lilian Weng, found that more capable agents tend to reach higher or similar proxy reward but lower true reward.

To keep proportions right, reward hacking is the exception rather than the common RL failure. Irpan argues that poor local optima, caused by getting the exploration-exploitation trade-off wrong, are much more common. Reward hacking stays invisible until a separate, out-of-loop gold evaluation is run.

How Do You Monitor a Production RL Policy for Drift, Reward Hacking and Silent Degradation?

Monitor what the agent does and what the business actually wants, not just the reward the agent receives. Dedicated evaluation infrastructure, with production traffic sampling and per-cohort metrics, is a first-class engineering concern. For RL, that means watching several separate signals, because different shift sources produce distinct degradation patterns.

Trajectory drift without a reward signal. One method treats episodes as symbolic sequences of states and compares recent and historical trajectories with edit distances such as Damerau-Levenshtein. It needs neither the reward function nor an environment model. In the authors’ simulated experiments, most measures had perfect precision with no false alarms, but recall varied, with Jaro and longest-common-subsequence reaching only 0.625 and 0.750. The limit is clear: the method was tested only on drift in transition dynamics, and the authors name reward-function drift as a natural extension. It also gets harder when transitions are stochastic, because the same state-action pair can lead to different states without any drift.

Reward decomposed, and the distribution rather than the mean. The global reward is generally a balance of several sub-goals, so evaluation should track each component separately. A policy also has to work for every robot or every user, not just on average, so its quality cannot be summarised by one scalar return.

An out-of-loop quality measure. Because reward hacking cannot be seen in the reward itself, you need a gold or human-validated evaluation that runs outside the training loop. Detectors that compare a target policy’s action distribution against a trusted policy have been tried, but in Pan et al.’s experiments no classifier reached an AUROC above 60% across all tested environments. Treat automated hacking detection as a weak signal, not a gate.

Distributional, not availability, monitoring. Error rates, latency percentiles and availability probes measure whether a response arrived, not its quality, so an LLM system can pass all three while being systematically wrong for a cohort. In the Evaluation Blindness study, 53% of verifiable public incidents were silent.

The trajectory method above does not cover reward-mechanism shift. With nothing better available, we would fall back on the performance-based trigger the taxonomy paper proposes for uncontrolled settings: declare a shift when performance drops below a set fraction of the pre-shift mean, for example 80% when the threshold is 0.2. We would pair that with a change log for every reward reweighting, because many reward shifts are decisions someone made rather than events in the world. Our piece on where reinforcement loops meet drift telemetry goes further into instrumenting the loop itself.

Monitoring Checklist for a Deployed Policy

  • Trajectory or visitation drift against historical trajectories, using a reward-agnostic measure.
  • Each reward component tracked on its own, not only the sum.
  • Per-cohort performance, so the worst user or device is visible.
  • A gold or human-rated evaluation on sampled production traffic, run outside training.
  • Constraint violations counted per constraint.
  • Logged action propensities, so later off-policy evaluation is possible.
  • A versioned record of every reward-weight change, kept alongside model versions.

Evaluating a New Policy Before It Touches Traffic

Off-policy evaluation estimates how a new policy would perform using trajectories collected by other policies. That matters wherever running a bad policy is costly or dangerous. The standard tool is importance sampling, which reweights logged outcomes to correct for the difference between the behaviour policy and the target policy. Its weakness is high variance. In sequential problems, per-step weights multiply together and can blow up, so estimates are only reliable while the new policy stays reasonably close to the logging policy. Weighted importance sampling and doubly robust estimators are used to reduce that variance.

Earlier off-policy evaluation methods gave no confidence about the accuracy of their estimates. Thomas, Theocharous and Ghavamzadeh (AAAI 2015) pass importance-weighted returns through a concentration inequality to get a high-confidence lower bound on the new policy’s performance, without ever running it. In their example they could guarantee, with at least 95% confidence, that the new policy improved on the existing one using 2 million trajectories, from a website with several hundred thousand visitors a day. Thomas et al. (2015) also show that searching over policies using lower confidence bounds ensures, with high probability, that a safety constraint is met.

The approach depends on logged trajectories. Decision Service logs action probabilities precisely so that off-policy evaluation is possible later. Recommender teams face the same skew in both off-policy learning and evaluation, and use capped inverse-propensity scores and other variance controls to deal with it.

How Do You Safely Roll Out, Compare or Roll Back a New RL Policy?

Roll out in stages, monitor performance, drift and safety constraints online, and keep a fallback policy ready. Microsoft’s Personalizer apprentice mode is a clear concrete example. The model first learns by imitating the application’s existing logic without affecting outcomes. Microsoft recommends switching to online mode once it matches that baseline 60-80% of the time. Apprentice mode cannot show whether the model will beat the baseline, only how well it copies it, so measuring improvement needs online mode or offline evaluation over an online period. When replaying history to warm-start, Microsoft suggests roughly 50,000 historical events may be needed to reach that match level, and warns that offline data is noisier and can mislead.

A Staged Rollout Sequence

  1. Shadow or apprentice. The candidate learns by observing the incumbent’s decisions without affecting outcomes.
  2. Offline gate. Off-policy evaluation with a confidence bound against the incumbent’s logged data, which needs logged propensities.
  3. Small exposure with exploration. YouTube split users 90/5/5 and served a stochastic, exploration-trained policy to 5%, which produced a statistically significant 0.07% gain in ViewTime.
  4. Causal comparison. Lyft used switchback experiments, alternating policies in production to measure causal effects, before a global rollout.
  5. Guarded full rollout. Online monitoring of performance, distributional drift and safety constraints, with a fallback policy that can be activated if the learner behaves unexpectedly.

Respecting constraints requires changing the learning procedure itself. Meta’s Pearl library, for instance, supports learning under cost constraints as a constrained MDP.

When YouTube lifted the cap on importance weights, a live experiment showed a significant 0.52% drop in ViewTime. OpenAI says it will treat behaviour issues as blocking at launch review.

Whether to freeze a policy or keep it learning is debated. Most deployed RL systems the paper reviews follow a train-then-fix pattern and only retrain once performance has degraded. In a simulated “rusting pendulum”, a frozen policy degraded as the dynamics drifted, while a continual learner stayed near-optimal. Continual learners, though, are harder to trust, which is the subject of our article on regression testing an RL agent that keeps learning. We would choose based on whether a reliable reward is still observable after deployment, because where it is not, continual learning has nothing safe to learn from.

When Reinforcement Learning Is the Wrong Choice

RL fits when a problem really is sequential, when states, actions and rewards can be constructed, and when there is a good model, a high-fidelity simulator or a large amount of data. The table below summarises the conditions we would check first.

Condition Lean towards Why
Each decision’s outcome is immediate and does not affect later states Contextual bandit or supervised model Contextual bandits are an established, effective choice for one-step selection such as article recommendation; full RL adds credit assignment and exploration on top
No simulator, thin logs, no tolerance for exploration Supervised model, rules or classical control Real systems have no separate training environment and logs cover little of the state space; offline learning is limited by what the dataset contains
Objective is subjective or editorial Human editorial decisions Editorial choices may depend on factors unrelated to the features, so even imitation struggles
Reward absent after deployment No learning from reward after deployment When reward is absent entirely, there is nothing to learn from
Safety violations are catastrophic and rare in logs Constrained control Safety violations are likely to be very rare in logs and constraints are often never written down
Clear objective, good simulator, sequential decisions RL is a reasonable candidate These are the conditions where success rates are expected to be higher

Off-the-shelf algorithms still need significant fine-tuning by RL experts before they apply to real problems. Irpan put it bluntly: deep RL is not a plug-and-play technology. Collecting a large, representative dataset often matters more than choosing the most advanced method.

The question we would ask first of any production RL project is whether you can observe the reward the business cares about, quickly and reliably, after the policy is live. If you can, monitoring, off-policy gates and staged rollout are the tools for managing the closed loop. If you cannot, every safeguard above is checking a proxy, and the agent will optimise that proxy better than you can watch it.

FAQ

What Is a Deep Q-Network?

A deep Q-network (DQN) combines Q-learning with a deep neural network. It stabilises training with an experience replay buffer of past transitions and a target network that is updated only periodically.

What Does a Value Function Do in Reinforcement Learning?

A value function estimates the long-term return of a state or of an action taken in a state. Q-learning, for example, learns an optimal action-value function and derives the policy from it.