AI for DMS and Supply Chain Systems: Separating Numerical Inventory Forecasting from LLMs
An architectural analysis for applying AI practically in DMS and WMS platforms: using time-series models for quantitative demand forecasting while reserving LLMs for natural-language querying, anomaly digests, and order exception triage.
Large language models (LLMs) should not calculate replenishment quantities or forecast time series; quantitative planning belongs to statistical and tabular ML models.
LLMs deliver practical value in semantic operations: natural-language reporting across depots, daily anomaly digests, and order exception triage.
Safe production integration locks safety-stock math inside deterministic code and routes replenishment or override actions through human approval queues.
Distribution and retail teams evaluating AI for a Distribution Management System (DMS) or Warehouse Management System (WMS) often expect a single conversational assistant to read sales exports and immediately state how many cases of each SKU to reorder next week. Feeding raw sales spreadsheets into a large language model (LLM) produces confident-sounding prose, yet the suggested quantities routinely miss seasonal cycles, ignore supplier lead-time variance, and violate safety-stock constraints.
This failure stems from how the two model classes compute. LLMs predict token sequences conditioned on text context rather than calibrated probability distributions over multivariate time series. Building dependable AI inside supply chain software requires separating quantitative demand forecasting from the semantic operations layer.
Separating the Workloads: Time-Series Forecasting vs. Semantic Operations
Company blog
Read next
Within DMS and WMS platforms, demand forecasting is strictly a time-series and tabular modeling problem. Inputs consist of daily sell-out or dispatch history per SKU-location pair, promotion calendars, supplier lead-time distributions, holiday flags, and, critically, stockout censoring indicators. If a distributor ran out of stock for four days and logged zero units sold, the pipeline must treat those zeros as censored demand rather than genuine lack of buyer interest.
Classical statistical methods such as ETS, ARIMA, or Croston/SBA for intermittent demand, alongside gradient-boosted trees like LightGBM, handle this workload far more reliably than an LLM. Crucially, they emit not just a single median point forecast (P50) but quantile bounds (such as P80 or P95) that feed directly into deterministic reorder-point (ROP) and safety-stock calculations.
By contrast, LLMs solve unstructured operational bottlenecks where rigid DMS screens fall short:
Natural-language querying for regional managers (for example, asking why beverage sell-through across a distributor cluster fell sharply over the past ten days).
Morning anomaly digests summarizing thousands of inventory variance logs, purchase-price discrepancies, and late-delivery flags across warehouses.
First-pass order exception triage covering duplicate purchase orders, driver short-shipment notes, and damaged-goods return claims.
Engineering Dimension
Quantitative Forecasting Engine
LLM Semantic Operations Layer
Primary objective
Estimate future SKU-depot demand and uncertainty intervals
Interpret queries, summarize anomalies, and classify exceptions
Order notes, incident logs, pre-aggregated warehouse metrics
Suitable model families
ETS, ARIMA, Croston/SBA, LightGBM, XGBoost
LLMs paired with typed tool calling and strict JSON schemas
Output contract
Point forecast (P50) and risk quantiles (P80, P95)
Cited narrative digests and structured exception labels
Verification method
WAPE, forecast bias, and pinball loss via rolling backtests
Source record ID matching and read-only SQL validation
Misuse risk
Letting an LLM guess stock numbers causes overstock or stockouts
Applying tabular models to free-text notes misses field context
Hybrid Architecture Across Production DMS and WMS
As outlined in Anthropic Engineering's *Building effective agents*, engineering teams gain higher reliability by composing simple, predictable workflows before introducing autonomous multi-step agents. This discipline matters directly in enterprise systems, where inventory transfers and purchase orders carry immediate working-capital impact.
Instead of allowing an LLM to perform arithmetic in prose or write directly to inventory tables, a production architecture should enforce four sequential boundaries:
01Normalize daily movement logs across depots and distributors, flag out-of-stock intervals separately from zero-demand days, and run scheduled batch training for the time-series forecasting models.
02Feed forecast quantiles into deterministic business-rule code that computes reorder points, applies supplier minimum order quantities (MOQ), and checks distributor credit limits.
03Expose strictly read-only, parameterized tools to the LLM over pre-aggregated views and exception queues, requiring every summary to cite exact order IDs, SKU codes, and timestamps.
04Route all recommended replenishment orders, transfer adjustments, and credit overrides through a human planner review queue before committing transactions to the ERP or DMS core.
Keeping these layers separate ensures every replenishment figure remains reproducible and auditable, while managers still gain fast conversational access without writing SQL.
Risk Governance and Operational Drift Control
Running both AI subsystems in production calls for structured oversight aligned with the four core functions of the NIST *AI Risk Management Framework*: Govern, Map, Measure, and Manage.
For quantitative forecasting, accuracy tracking should follow SKU segmentation (such as an ABC-XYZ matrix based on revenue share and demand volatility). High-volume, steady items require weekly tracking of WAPE and directional forecast bias. When upstream feeds break or error spikes beyond defined thresholds, the pipeline should fall back automatically to a transparent baseline such as a weighted moving average.
For the LLM layer, primary operational risks include fabricated root causes when warehouse logs are incomplete and unintended state mutations. Engineering controls must prohibit the model from executing write queries, enforce schema validation on tool arguments, and retain full prompt-to-record audit trails for operations leads.
Reference Scope and Practical Deployment Caveats
The workflow composition principles referenced here draw on Anthropic Engineering's *Building effective agents* (specifically favoring bounded, composable workflows and strict tool interfaces over open-ended autonomy), while governance practices align with the NIST *AI Risk Management Framework* (Govern, Map, Measure, Manage). The dual-layer DMS/WMS architecture and operational trade-offs reflect ToanKhonTech's engineering assessment.
Three practical constraints govern real-world rollouts. First, forecasting accuracy depends heavily on field data hygiene: if sales representatives bunch orders at month-end to meet quotas or delay mobile DMS receipts, models learn distorted consumption patterns. Second, cold-start SKUs and sudden macro or weather disruptions lack historical signatures and still require manual category-planner overrides. Third, pointing conversational LLMs directly at high-volume transactional tables degrades database performance and inflates token costs unless queries target pre-aggregated reporting views.
References
Sources used to check this article. Any ToanKhonTech test results are identified separately in the text.