Technology Overview
The AI technology stack for commerce — foundational models, agentic AI, LLMs, privacy & security, investment costs, and what comes next — based on Book Part 5 of the AI Best Practices for Commerce reference.
Private & Embedded LLMs
Bringing AI inside your own infrastructure
Governance & MLOps
Operating private LLMs at scale requires adapting DevOps practices that work for traditional software to the unique challenges of machine learning systems. Models drift. Performance degrades. Updates need validation. And unlike code deployments, where you can test exact behavior, ML systems have probabilistic outputs that require different testing strategies.
CI/CD for models looks similar to traditional continuous integration but with ML-specific steps. When you update a model, through fine-tuning, updating the base model version, or adjusting quantization, you need automated validation before deployment. That means test suites with expected inputs and outputs, regression tests ensuring the new model performs at least as well as the previous version on key benchmarks, and staged rollouts where you deploy to a small percentage of traffic first. Tools like DVC (Data Version Control) and MLflow, which gained significant adoption in the 2020-2023 period, brought version control concepts to ML artifacts, making it possible to track which model version was deployed when, with what configuration, and with what training data.
Monitoring drift is harder than monitoring traditional software. Your application’s logic doesn’t change, but the world does. Customer language evolves. Product catalogs shift. Seasonal patterns emerge. A model trained on winter retail traffic might perform poorly in summer when queries shift toward different product categories. Statistical techniques like comparing input distributions or tracking confidence scores can detect when the model is seeing inputs that differ significantly from its training data. But the real challenge is defining what counts as drift severe enough to trigger retraining versus normal variation.
Rollback strategies need to account for the statefulness of ML systems. You can’t just revert to the previous container image. You need to consider: What if customers received different responses from different model versions? What if the new model’s outputs have already been cached? What if downstream systems adapted to the new model’s output format? A robust rollback strategy includes keeping multiple model versions deployed simultaneously, gradual traffic shifting between versions, and clear success metrics that trigger automatic rollback if degradation is detected.
Prompt governance emerges as a critical concern once LLMs move into production. The prompts you send to models, the system instructions, few-shot examples, and user input handling, determine behavior just as much as the model weights themselves. But prompts are code, and they need versioning, review, and testing. By 2024, platforms like LangSmith and Prompt Layer had emerged to treat prompts as managed artifacts, with version histories, A/B testing capabilities, and analytics on which prompts produced the best outcomes. For retailers, this means being able to say, “The prompt we used for customer service on December 15th was version 3.2, and here’s exactly what it contained.”
The operational model that successful retailers developed looked like this: Treat models as artifacts with clear versioning. Deploy using standard container orchestration, Kubernetes running TorchServe or vLLM for inference. Monitor both system metrics (latency, throughput, error rates) and ML-specific metrics (confidence distributions, output diversity, task success rates). Maintain a rollback-ready architecture where you can shift traffic between model versions in seconds. And document everything, which model, which prompt, which configuration, so that when something goes wrong, you can reconstruct exactly what happened.
The reality is that ML operations are harder than traditional software operations. They require combining software engineering discipline with statistical awareness. But by 2024, the tooling and practices had matured enough that retailers could run private LLMs in production with the same reliability they expected from their other critical systems. It required investment in infrastructure and expertise, but it was no longer an unsolved problem.

Last updated: March 12, 2026