A bank prepares a new model to classify incoming customer requests. Its engineering team wants to examine the model’s performance on live requests without changing the responses customers currently receive.
A shadow deployment is a testing approach in which a team sends copies of production requests to a new model or application version, records and compares its behavior against the current version, and prevents the new version’s outputs from reaching users or affecting the active business workflow.
How does a shadow deployment work?
The production system continues to process requests and return responses through the current version. A shadow version, deployed alongside the current version, receives copies of selected requests and processes them.
The engineering team records the candidate version’s outputs and compares them with production results. Users continue to interact with the existing service while the team examines how the proposed change behaves under actual traffic conditions. CUBIG’s guide on how to compare LLM models explains which parts of a test setup to hold fixed during that comparison.
The Amazon SageMaker documentation on shadow tests describes how teams can evaluate changes to a production variant, including its model, container or instance, using copies of live inference requests without returning the candidate version’s responses to the calling application.
For enterprise AI teams, shadow testing shows how the candidate handles requests that developers may not have anticipated when preparing offline tests.
What should teams evaluate during a shadow deployment?
Teams should compare both operational performance and the quality of outputs. A candidate model may respond faster than the current model while producing less accurate classifications or overlooking business requirements.
Useful areas of comparison include:
- Output accuracy: Whether the candidate version produces correct results for the intended task.
- Response differences: Where and how the candidate’s outputs diverge from production results.
- Operational behavior: Whether processing times, errors and resource consumption remain acceptable.
- Unexpected inputs: How the candidate handles incomplete records, unfamiliar requests or unusual formats.
Teams should maintain an evaluation set with expected outcomes alongside shadow testing. Agreement with the current model does not establish correctness if the existing model also makes mistakes.
Live traffic can also show where incoming data has moved away from the data behind earlier evaluations, a common cause of model drift.
What are the limitations of a shadow deployment?
Shadow testing cannot establish how users will react to the candidate version because users never receive its responses. Teams cannot directly observe whether customers accept a recommendation, follow an instruction or complete a subsequent business action.
Copying production requests may also introduce additional data handling obligations. Teams should apply appropriate access restrictions, retention rules and protections for sensitive information to the shadow version and its logs. Agents that can modify external systems require safeguards against unintended actions during shadow execution.
A canary deployment can follow shadow testing when teams need evidence from actual user interactions. Neither approach replaces the need to evaluate whether the underlying data supports the intended AI task.