Paper deep dive
Beyond Thresholds: A Quality-Aware Decision Intelligence Framework for Cold Chain IoT Systems
Aashna Sofat, Balwinder Sodhi
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 91%
Last extracted: 8/18/2026, 5:23:54 AM
Summary
The paper introduces the Quality-Aware Decision Intelligence (QADI) framework for cold chain IoT systems, addressing the gap between reactive monitoring and proactive decision-making. QADI utilizes a structured quality state representation (S_q) comprising remaining shelf life, degradation rate, uncertainty, and operational risk. It employs a hybrid modeling layer combining physics-based microbial kinetics with data-driven corrections and an LLM-based reasoning layer (Microsoft Phi-4 with RAG) to generate optimal logistics decisions. The framework significantly outperforms baselines in shelf-life prediction accuracy and decision optimality, particularly when the LLM component is included.
Entities (8)
Relation Signals (7)
QADI → outperforms → physics-only
confidence 95% · mean absolute shelf-life error of 7.2 hours (versus 30.9 hours, physics-only; p<0.001)
QADI → uses → Microsoft Phi-4
confidence 95% · reasoning layer built on Microsoft Phi-4
QADI → uses → S_q
confidence 92% · structured quality state representation, S_q = [L, Q, U, R]
Microsoft Phi-4 → contributesto → decision_quality
confidence 90% · Removing the LLM reasoning component drops optimality to 45.5%
QADI → evaluatedon → Pasteurised Milk
confidence 90% · using pasteurised milk as the primary case
QADI → uses → RAG
confidence 90% · retrieval-augmented generation over a structured domain knowledge base
QADI → evaluatedon → Broccoli
confidence 85% · Across milk and broccoli scenarios
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Cold chain logistics has advanced technologically, yet most deployed systems remain reactive monitors, not decision-making agents: thresholds trigger alerts, but nothing relates violations to cumulative product degradation or converts degradation signals into logistics decisions. We address this gap with a Quality-Aware Decision Intelligence (QADI) framework combining three capabilities: a structured quality state representation, $S_q = [L, Q, U, R]$ -- remaining shelf life, degradation rate, estimation uncertainty, and operational risk, all derived and computable from the framework equations; a hybrid quality modeling layer combining physics-based microbial kinetics with a data-driven correction term; and a reasoning layer built on Microsoft Phi-4~\cite{Phi4} with retrieval-augmented generation over a structured domain knowledge base. We benchmark against five baselines -- threshold monitoring, physics-only, physics-plus-noise, optimisation-based decisions, and a rule-based expert system -- across eight cold chain scenarios, using pasteurised milk as the primary case, with ground truth shelf-life drawn from published dairy studies~\cite{Singh1994, Smigic2015} independent of our model. Comparisons use Wilcoxon signed-rank tests with Holm correction. Across milk and broccoli scenarios, the framework attains mean absolute shelf-life error of 7.2 hours (versus 30.9 hours, physics-only; $p<0.001$), spoilage rate of 14.5% (versus 16.6%, physics-only and rule-based; p=0.08), and oracle-optimal decisions in 99.5% of scenarios. Removing the LLM reasoning component drops optimality to 45.5% ($p<0.001$). Expert-rated explanation quality reaches 83% ($\kappa = 0.71$). Ablations show hybrid modeling and LLM reasoning contribute distinct gains, while RAG retrieval mainly drives explanation quality. Code: this https URL.
Tags
Links
- Source: https://arxiv.org/abs/2608.15082v1
- Canonical: https://arxiv.org/abs/2608.15082v1
Trouble viewing inline? Open PDF directly →
Full Text
74,740 characters extracted from source content.
Expand or collapse full text
Beyond Thresholds: A Quality-Aware Decision Intelligence Framework for Cold Chain IoT Systems Aashna Sofat11 1 sofataashna@gmail.com, Independent Researcher and Balwinder Sodhi22 2 sodhi@iitrpr.ac.in, Dept. of Computer Science and Engineering, IIT Ropar Cold chain logistics systems have undergone considerable technological advancement, yet a persistent structural limitation remains: most deployed systems are reactive monitors rather than decision-making agents. Temperature thresholds trigger alerts, but no mechanism exists to reason about the physical meaning of those violations, relate them to cumulative product degradation, or translate degradation signals into actionable logistical decisions. This paper addresses that gap directly. We propose a Quality-Aware Decision Intelligence (QADI) framework that integrates three capabilities into a unified architecture. First, we introduce a structured quality state representation, q=[L,Q˙,U,R]S_q=[L,\, Q,\,U,\,R], that captures remaining shelf life, instantaneous degradation rate, estimation uncertainty, and operational risk – all four components formally derived and fully computable from the framework equations. Second, we develop a hybrid quality modeling layer combining physics-based microbial kinetics with a data-driven correction term. Third, we incorporate a reasoning layer based on Microsoft Phi-4 [1] with retrieval-augmented generation over a structured domain knowledge base. We evaluate the framework against five baselines: threshold monitoring, physics-only modeling, physics-plus-noise prediction, optimisation-based decision systems, and a rule-based expert system. They span across eight parameterised cold chain scenarios using pasteurised milk as the primary case. Ground truth shelf-life references are drawn from published empirical dairy studies [22, 23] rather than the estimation model itself, ensuring evaluation independence. All pairwise comparisons are tested with the Wilcoxon signed-rank test under Holm correction. Across milk and broccoli scenarios our system achieves mean absolute shelf-life prediction error of 7.2 hours (versus 30.9 hours for the physics-only baseline; p<0.001p<0.001), a spoilage rate of 14.5% (versus 16.6% for physics-only and rule-based baselines; p=0.08p=0.08), and oracle-optimal decision selection in 99.5% of routing scenarios. The LLM reasoning component is the decisive differentiator in decision quality: removing it reduces optimality from 99.5% to 45.5% (p<0.001p<0.001). Expert-rated explanation quality is 83% with inter-rater κ=0.71κ=0.71. Ablation results confirm that the hybrid modeling and LLM reasoning components each make distinct, non-redundant contributions; the RAG retrieval component contributes primarily to explanation quality (21 p reduction without it). To enable independent verification of our results, we have shared our relevant source code artifacts at https://bit.ly/4d6t44C Keywords: cold chain monitoring; IoT decision intelligence; quality state representation; hybrid physics-ML modeling; large language models; retrieval-augmented generation; shelf-life prediction; food logistics. 1 Introduction 1.1 Background and Motivation Global cold chain infrastructure handles an estimated $300 billion [16] worth of perishable goods annually, spanning fresh produce, dairy, meat, pharmaceuticals, and biologics. Product losses attributable to cold chain failures remain persistently high. The Food and Agriculture Organization estimates that roughly one-third of all food produced for human consumption is lost or wasted, a substantial fraction of which occurs during distribution [18]. In pharmaceutical supply chains the stakes are higher still: a single temperature excursion can render an entire vaccine shipment non-viable [6]. The proliferation of Internet of Things (IoT) devices has created the technical precondition for continuous, fine-grained environmental monitoring throughout the cold chain [8, 17]. Contemporary platforms routinely collect temperature, humidity, and GPS telemetry at sub-minute resolution across thousands of simultaneous shipments. Yet the dominant paradigm for acting on this data has not advanced commensurate with collection capability: systems still alert when a scalar threshold is crossed, and the interpretive and decision-making burden falls on human operators. 1.2 Limitations of Current Systems Three structural limitations characterise the state of the art in deployed cold chain systems. Threshold fixation. The standard operational model compares a temperature reading against a fixed threshold and raises an alert upon violation [18]. This approach conflates instantaneous temperature with actual product quality. Critically, a product stored continuously at 6.5 °C, a commercially common condition, will never trigger a threshold set at 8 °C, yet its shelf life is reduced by approximately 40% relative to ideal cold storage[15, 2]. The threshold system raises no alert and prescribes no action while genuine spoilage accumulates silently. More generally, cumulative microbial growth driven by the integrated time-temperature history is entirely invisible to threshold logic; no recalibration of the threshold value can address this structural deficiency. Prediction without action. Research on shelf-life prediction has advanced, with physics-based kinetic models [27, 3] and machine learning approaches [11] achieving reasonable estimation accuracy. However, these systems produce predictions without prescribing actions. The operational question such as what should be done right now, given the current quality trajectory and logistical state?, remains unanswered. Fragmented reasoning layers. Physical, logistical, and business-layer signals are processed in separate systems with no formal integration. A delay at a distribution checkpoint, an increase in ambient temperature, a degraded quality estimate, and a tight delivery window are causally related events; no current system reasons across them jointly to produce an integrated response [21, 19]. 1.3 Research Gap The gap we address is neither a prediction problem nor a sensor problem. It is a reasoning and decision problem. Existing literature has produced capable models for estimating quality, but the architecture for translating quality estimates into real-time, explainable decisions, particularly under uncertainty, does not exist as a unified system. Recent work on LLM-based reasoning over IoT data [13] has demonstrated that language models improve task performance when properly grounded in domain knowledge, but no application-level system has been demonstrated for cold chain decision intelligence. 1.4 Contributions C1. Quality state representation. We define q=[L,Q˙,U,R]S_q=[L,\, Q,\,U,\,R] with all four components formally derived (Eqs. 4–7) and computable from the model. This provides the minimal abstraction layer required to bridge physics-based quality modeling and LLM-based reasoning. C2. Hybrid quality modeling with independent evaluation. We combine microbial kinetics with a data-driven correction trained on a held-out profile family, evaluated against published empirical shelf-life references [22, 23] rather than model-derived ground truth. C3. Specified LLM reasoning with described knowledge base. We integrate Microsoft Phi-4 [1] with RAG over a 143-document structured knowledge base whose construction and retrieval strategy are fully described. A RAG ablation isolates its contribution from the LLM’s native reasoning. C4. Statistically rigorous evaluation. We evaluate across eight primary scenarios (eleven total configurations) against five baselines with 150 runs per scenario (Wilcoxon signed-rank tests under Holm correction), inter-rater reliability for explanation quality (κ=0.71κ=0.71), and architectural ablations with clean separation of prediction and decision contributions. 1.5 Paper Organisation Section 2 reviews related work. Section 3 formalises the problem. Section 4 describes the proposed framework. Section 5 details implementation. Section 6 presents experimental evaluation. Section 7 discusses findings and limitations. Section 8 concludes. 2 Related Work 2.1 IoT-Based Cold Chain Monitoring Gillespie et al. [8] present an architecture for real-time anomaly detection in refrigerated transport, demonstrating that sensor fusion enables earlier detection of excursion events than single-sensor approaches. Müller et al. [17] confirm in a comprehensive review that current systems are largely characterised by reactive, threshold-driven alert logic, and that the transition toward prescriptive capabilities represents the central open challenge. Duman and Aydogan [6] address data integrity through Hyperledger Fabric integration, but their system does not extend to quality reasoning or decision support. The consistent finding across this literature is that sensing infrastructure is adequate and that the bottleneck has shifted to interpretation and decision-making. 2.2 Shelf-Life and Quality Modelling Physics-based models for food quality degradation are well established. Microbial spoilage kinetics are typically modelled using the modified Gompertz equation [27] or its Baranyi–Roberts reformulation [3]. Temperature dependence of growth rates follows the Arrhenius relation, from which simpler exponential approximations are derived for engineering applications [24]. Empirical shelf-life datasets for pasteurised dairy products (measured rather than model-derived) have been systematically compiled by Singh et al. [22] and Smigić et al. [23], providing independent benchmarks we use as evaluation references. Machine learning approaches have entered this space to address model rigidity. CNN-based architectures applied to temperature time-series have demonstrated shelf-life prediction capabilities [11]. Jedermann et al. [12] note that neither physics-based nor data-driven models in isolation are sufficient for robust real-world deployment. 2.3 Decision Support in Cold Chain Logistics Optimisation-based approaches have focused primarily on inventory routing [21] and temperature control policy design. These systems operate offline, assume idealised quality models, and do not incorporate uncertainty or context-dependent reasoning. Roa-Henríquez et al. [19] introduce causal machine learning for supply chain management, demonstrating that causal reasoning improves intervention effectiveness over associative prediction alone. This is a finding that motivates our reasoning-layer design. 2.4 LLM Integration in IoT and Industrial Systems Kök et al. [13] survey LLM-IoT integration and identify domain grounding as the principal technical challenge: naive LLM deployment on sensor data produces hallucinated or physically incoherent responses, while structured intermediate representations significantly improve performance. Garcia et al. [7] demonstrate that language models produce actionable manufacturing recommendations when given structured process state descriptions. González-Potes et al. [9] confirm the viability of structured-state-to- reasoning pipelines in industrial batch process control. 2.5 Research Gap Summary Table 1 summarises coverage across the five dimensions our framework addresses. No existing system spans all five simultaneously. Table 1: Coverage of key system dimensions across existing approaches. ✓ = addressed; ∼ = partially addressed; × = not addressed. Approach Example work Real-time Quality Uncertainty Decision Explain. IoT monitoring [8, 17] ✓ × × × × Physics models [27, 24] × ✓ ∼ × ✓ ML prediction [11] ∼ ✓ × × × Optimisation [21] × ∼ × ✓ × LLM-IoT [13, 7] ∼ × × ∼ ✓ This work – ✓ ✓ ✓ ✓ ✓ 3 Problem Formulation 3.1 The Cold Chain as a Dynamic System We model a cold chain as a stochastic dynamical system with continuous-time environmental state (t)∈ℝdE(t) ^d, where d encompasses temperature, humidity, and other ambient variables. The state evolves under the influence of logistics events ℒ=(ei,ti)L=\(e_i,t_i)\ (e.g., door openings, checkpoint delays, route deviations, equipment failures) that are partially observable and irregularly timed. 3.2 Quality Degradation Dynamics Product quality Q(t)∈[0,1]Q(t)∈[0,1] is a continuous, monotonically decreasing function of time whose rate depends on the temperature history: Q(t)=Q0⋅exp(−∫0tk(T(τ))dτ)Q(t)=Q_0· \! (- _0^tk(T(τ))\,dτ ) (1) where k(T)k(T) follows an Arrhenius-type relation. Quality loss is path-dependent: two shipments with identical current temperature but different thermal histories may have fundamentally different remaining shelf lives. 3.3 Limitations of Scalar Shelf-Life Most systems reduce quality to remaining shelf life L, estimated as the time until Q(t)Q(t) crosses a spoilage threshold. Three deficiencies follow. First, L does not communicate the current rate of deterioration. Two products with identical L may be on very different trajectories. Second, L carries no uncertainty quantification, yet its inputs (initial microbial load, temperature trace, sensor calibration) are all noisy. Third, L does not map to operational risk: a product with L=24L=24 hours destined for a centre 6 hours away is in a very different risk posture than one destined for an outlet 20 hours away. 3.4 The Decision Problem Let A denote the operator’s action space. We seek a policy π such that: at∗=π(0:t,ℒ0:t,θp)=argmaxa∈[V(Q(t+Δt∣a),a)−C(a)]a_t^*=π\! (E_0:t,\;L_0:t,\; _p )= _a [V\! (Q(t+ t a),\,a )-C(a) ] (2) where at∗a_t^* is the single best action to take right now at time t. 0:tE_0:t is the full environmental history (temperature, humidity, etc.) from start up to now. ℒ0:tL_0:t is the logistics event history (door openings, checkpoint delays, route changes) up to now, and θp _p is the product parameter vector (e.g., microbial kinetics constants for milk vs. broccoli vs. vaccines). Together these encode everything the system knows about the current situation. The policy makes its choice by exhaustive evaluation over all available actions a∈a (maintain route, reroute, reprioritise, adjust setpoint, initiate discount sale): argmaxa∈[V(Q(t+Δt∣a),a)⏟future product value−C(a)⏟action cost] _a [ V (Q(t+ t a),a )_ subarraycfuture product value subarray- C(a)_ subarraycaction cost subarray ] • Q(t+Δt∣a)Q(t+ t a) is the projected quality at a future time Δt t ahead, conditional on taking action a (e.g., rerouting changes the transit time and therefore changes how much bacterial growth occurs) • V(⋅)V(·) is the value of the product at that future quality state, given the chosen action (a batch arriving with 80% quality remaining has different value than one arriving at 50%) • C(a)C(a) is the cost of the action itself (rerouting is expensive; doing nothing is free) The system picks whichever action a maximises net value (future product value minus the cost of intervention). Handling this decision problem is hard in practice for three reasons: 1. Q(t+Δt∣a)Q(t+ t a) is uncertain (noisy sensors, unknown initial microbial load). Hence the U(t)U(t) component in Equation 3. 2. ℒL is partially observable (you don’t know future logistics events). Hence the risk score R(t)R(t) in Equation 3. 3. The physical-to-value mapping V(⋅)V(·) is context-dependent (the same quality level has different urgency depending on how far the destination is). Hence the LLM reasoning layer in Equation 3. 4 Proposed Framework 4.1 System Overview The QADI framework is organised as a five-stage pipeline (Figure 1). IoT telemetry enters a feature extraction stage. The hybrid modeling layer estimates the quality state vector qS_q. The LLM reasoning layer receives qS_q alongside logistics context and domain knowledge, and produces explanations and ranked action candidates. The decision layer enforces constraints and selects the action. The LLM layer operates exclusively downstream of qS_q and does not modify quality state estimates; its contribution is confined to decision selection and explanation generation. IoTTelemetryFeatureExtractionHybridModelingQuality StateqS_qLLMReasoningDecisionLayerLogisticsContext CtC_tDomainKnowledge Figure 1: The QADI pipeline. The LLM reasoning layer receives the quality state vector and logistics context as inputs; it does not modify upstream quality estimates. Its contribution is strictly in decision quality (M3, M4) and explanation generation (M6). 4.2 Quality State Representation We define: q(t)=[L(t),Q˙(t),U(t),R(t)]S_q(t)= [\,L(t),\;\; Q(t),\;\;U(t),\;\;R(t)\, ] (3) All four components are formally derived below and computable from the model’s equations. Remaining shelf life L(t)L(t) (hours): the predicted time until Q(t)Q(t) crosses QcritQ_crit, projected forward from the current state. Beyond the observation window we assume temperature holds at the current segment value until journey end, then reverts to 4 °C 33 3 This threshold is configurable and chosen based on existing studies, e.g.,[15, 2]. This assumption is applied identically to all methods: L(t)=infτ>0:Q(t+τ)≤QcritL(t)= \τ>0:Q(t+τ)≤ Q_crit \ (4) It basically states that: “starting from right now (i.e., t), look forward in time and find the earliest moment τ at which quality Q drops to or below the spoilage threshold QcritQ_crit.” That earliest moment is the remaining shelf life. For example, if it’s currently hour 20 of a journey and QcritQ_crit will be crossed at hour 68, then L(20)=48L(20)=48 hours. Instantaneous degradation rate Q˙(t) Q(t): Q˙(t)=−μ(T(t))⋅(Nmax−N(t))Ncrit−N0 Q(t)=- μ(T(t))·(N_ -N(t))N_crit-N_0 (5) The derivation proceeds from the linear quality-to-count mapping Q(t)=1−(N(t)−N0)/(Ncrit−N0)Q(t)=1-(N(t)-N_0)/(N_crit-N_0), which rescales microbial count to the unit interval: Q=1Q=1 at initial load N0N_0 and Q=0Q=0 at the spoilage threshold NcritN_crit. Differentiating with respect to time and substituting the continuous-time form of Eq.(10) yields Eq.(5). Three structural properties follow directly. First, Q˙≤0 Q≤ 0 always: μ(T)>0μ(T)>0 and Nmax>N(t)N_ >N(t) by assumption, so quality is strictly non-increasing. Second, the rate is temperature-amplified: because μ(T)=a⋅ebTμ(T)=a· e^bT, a temperature excursion multiplies |Q˙|| Q| exponentially rather than incrementing it additively. Third, the rate is load-dependent: the factor (Nmax−N(t))(N_ -N(t)) shrinks as the bacterial count approaches saturation, capturing the characteristic deceleration of spoilage in its late stage. The operational significance is that Q˙ Q and L are not redundant. Two batches with identical remaining shelf life L(t)L(t) may have substantially different instantaneous degradation rates: one held at 4,°C in stable storage with Q˙≈0 Q≈ 0, another mid-excursion at 12,°C with steeply negative Q˙ Q. The former requires no immediate intervention; the latter requires action before the shelf-life margin is consumed. Including Q˙ Q as an independent component of qS_q ensures the reasoning layer receives this distinction explicitly, rather than requiring it to infer trajectory from L alone. Estimation uncertainty U(t)U(t): computed via Monte Carlo sampling (M=500M=500 samples, chosen by pilot analysis as sufficient for standard error below 1% of the mean) over the distribution of initial microbial load and sensor noise: U(t)=Std[L^(t)]L¯(t),N0∼(3.0, 0.52),Tobs(t)∼Ttrue(t)+(0, 0.52)U(t)= Std[ L(t)] L(t), N_0 (3.0,\;0.5^2), T_obs(t) T_true(t)+N(0,\;0.5^2) (6) The prior N0∼(3.0, 0.52)N_0 (3.0,\,0.5^2) reflects empirical post-pasteurisation bacterial loads in commercially processed fluid milk, where initial counts centre near 10310^3 CFU/mL and batch-to-batch variability spans approximately ±0.5± 0.5 log10 _10 CFU/mL [14, 20]. Sensor noise of σT=0.5∘ _T=0.5\, C matches the accuracy specification of NIST-traceable cold-chain data loggers and is consistent with measurement uncertainties reported in cold-chain IoT deployments [4]. Operational risk R(t)∈[0,1]R(t)∈[0,1]: a sigmoid-normalised ratio of estimated remaining transit time to remaining shelf life: R(t)=σ(α⋅τtransit(t)L(t)+ϵ−β),σ(x)=11+e−xR(t)=σ\! (α· _transit(t)L(t)+ε-β ), σ(x)= 11+e^-x (7) where τtransit(t) _transit(t) is the estimated remaining transit time under current routing, ϵ=0.1ε=0.1 h prevents division by zero, and calibration constants α=10α=10, β=1β=1 are set so that R>0.6R>0.6 when remaining transit exceeds approximately 14% of estimated shelf life (solving σ(10⋅τ/L−1)=0.6σ(10·τ/L-1)=0.6 gives τ/L≈0.14τ/L≈ 0.14). With corrected-physics shelf lives of 100–160 h and transit windows of 36–52 h (τ/L≈0.25τ/L≈ 0.25–0.350.35), this ensures the reasoning layer is triggered in all scenarios with meaningful intervention risk. R→1R→ 1 indicates near-certain spoilage before delivery; R→0R→ 0 indicates ample safety margin. Justification. We considered four alternatives: (i) scalar [L][L], lacking dynamics and uncertainty; (i) binary categorical state, discarding all gradation; (i) full physics variable vector, expressive but not actionable; and (iv) latent ML embedding, compact but uninterpretable. The four-component qS_q is the minimal sufficient extension of scalar shelf life that supports proactive, uncertainty-aware, context-sensitive decision-making and remains interpretable to the LLM reasoning layer [13]. 4.3 Hybrid Quality Modeling Layer The hybrid layer estimates q(t)S_q(t) by combining a physics-based degradation model with a learned residual correction: Q^hybrid(t)=Q^physics(t)+fML((t)) Q_hybrid(t)= Q_physics(t)+f_ML\! (X(t) ) (8) 4.3.1 Physics-based component For pasteurised milk, spoilage is governed by psychrotrophic microbial growth. We adopt the logistic growth model with a temperature-dependent growth rate [27]: μ(T(t)) μ(T(t)) =a⋅ebT(t) =a· e^\,b\,T(t) (9) Nt+1 N_t+1 =Nt+μ(T(t))⋅(Nmax−Nt)⋅Δt =N_t+μ(T(t))·(N_ -N_t)· t (10) where N(t)N(t) is the log microbial count (log10 _10 CFU/mL). Parameters are drawn from microbial kinetics literature (Table 2). Table 2: Model parameters for pasteurised milk (psychrotrophic bacteria). Parameter Symbol Value Source Initial microbial load N0N_0 3.0 log10 _10 CFU/mL [27] Spoilage threshold NcritN_crit 7.0 log10 _10 CFU/mL [3] Saturation limit NmaxN_ 9.0 log10 _10 CFU/mL [27] Growth rate coefficient a 0.005 h-1 [11] Temperature sensitivity b 0.10 °C-1 [11] Time step Δt t 1 hour – These parameters produce qualitatively correct behaviour consistent with empirically reported ranges for commercially pasteurised milk [22, 23, 18]: approximately 160 h at 4 °C; 96 h at 6.5 °C; and 80 h at 10 °C. 4.3.2 ML correction component The correction fML((t))f_ML(X(t)) is a two-layer LSTM (64 hidden units, dense output) trained to predict the residual between physics model output and reference shelf-life midpoints from [22, 23]. The input feature vector (t)X(t) includes a 24-hour sliding temperature window, time since last logistics event, elapsed journey time, and product age at origin. In the simulated evaluation environment the last two scalar features (time since logistics event, product age) are drawn from (0,4)U(0,4) and (0,8)U(0,8) respectively, reflecting typical operational ranges in the absence of explicit logistics event modelling; in a deployment these would be real provenance records from the WMS. Only the temperature window and elapsed journey time are scenario-conditioned. To assess out-of-distribution generalisation, the LSTM is trained exclusively on profile families P1–P4 (see Table 3); Profile P5 (multi-disturbance) is held out entirely from training and used as a separate test family. 4.3.3 Uncertainty estimation U(t)U(t) is computed via Monte Carlo with M=500M=500 samples per time step (Eq. 6). The 500-sample budget was selected by pilot analysis: the standard error of U(t)U(t) estimates stabilised below 1% of the mean at M≥400M≥ 400. 4.4 Reasoning Layer 4.4.1 Model The reasoning layer uses Microsoft Phi-4 [1], a publicly available 14-billion-parameter instruction-tuned model served locally via Ollama, without cold-chain-specific fine-tuning. This is a deliberate conservative choice that provides a lower bound on achievable performance. Inference temperature is 0.2; maximum generation is 2,048 tokens. The RAG context injected per call is capped at 4,000 characters (≈ 1,100 tokens), leaving ample headroom within the model’s context window for the fixed system prompt and quality-state description. 4.4.2 Knowledge base The knowledge base comprises 143 structured documents in four categories as follows. (i) Product profiles (38 documents): product-specific spoilage thresholds, packaging information, and regulatory temperature requirements drawn from FDA guidelines, EU Regulation 853/2004, and Codex Alimentarius; (i) Kinetics summaries (42 documents): tabulated growth rate parameters for common spoilage organisms at discrete temperature points, derived from [27, 3, 11]; (i) Logistics constraint templates (31 documents): route feasibility criteria, SLA definitions, and re-routing cost tables for a representative logistics network; (iv) Decision precedents (32 documents): expert-annotated case studies of past cold chain intervention decisions with outcomes, constructed by the research team and reviewed by two logistics engineers. Retrieval uses cosine similarity over a FAISS index of dense sentence embeddings. The top-3 documents by similarity are injected into the system context at each inference call. 4.4.3 Prompt structure Each LLM call contains three parts: (1) a system context with retrieved domain documents, constraint definitions, and the action space description; (2) a state description serialising q(t)S_q(t) and Ct=[route,delays,destinationETA,productvalue]C_t=[route,\,delays,\,destination\ ETA,\,product\ value] in structured natural language; and (3) a query instructing the model to return a JSON object with three fields: a causal explanation string, a ranked action list with expected impact on L and R, and a recommendation confidence score. 4.4.4 Architectural role boundary The LLM layer receives q(t)S_q(t) as input and produces recommendations and explanations as output. It does not modify the quality state vector, does not feed back into the hybrid modeling layer, and has no role in shelf-life prediction. This separation is enforced architecturally: the modeling service and reasoning service are independent microservices with a strictly one-directional interface. The LLM’s contribution to system performance is therefore confined to decision quality (M3), time-to-action (M4), and explanation quality (M6) (not to prediction accuracy (M1)). 4.5 Decision Layer The decision layer implements the policy from Eq. (2) subject to hard logistical constraints (vehicle routing feasibility, contractual delivery obligations, storage capacity). The action space is: • a1a_1: Maintain current route (no intervention; baseline). • a2a_2: Reroute to nearer distribution node (reduces transit time at routing cost). • a3a_3: Reprioritise delivery (accelerates this shipment). • a4a_4: Adjust storage setpoint (reduces Q˙ Q; energy cost). • a5a_5: Initiate inventory discount or advance sale (recovers value before spoilage). The highest-ranked feasible action from the LLM’s JSON output is selected after constraint filtering. This modular design allows the reasoning component to be replaced without altering constraint enforcement. 4.6 System Architecture The framework is implemented as four loosely coupled microservices: an ingestion service that consumes IoT telemetry via a Kafka-compatible message broker; a modeling service that maintains per-product q(t)S_q(t) and updates it on every telemetry event; a reasoning service that hosts Phi-4 and the FAISS retrieval system, invoked when R(t)R(t) exceeds a configurable threshold (Rthresh=0.6R_thresh=0.6) or on 4-hour scheduled intervals; and an orchestration service that receives recommendations, applies constraint filtering, and dispatches to logistics APIs. The edge-cloud boundary falls between the ingestion and modeling services, allowing physics-model inference on edge hardware while LLM inference runs in the cloud. 5 Implementation To allow easy setup and experimentation, the implementation provided with this paper is a modular monolith version of the design presented §4.6. All code, scenario configurations, and other relevant artifacts presented in this section for our experiments are available at: https://bit.ly/4d6t44C. 5.1 Scenario Generator All experimental scenarios are produced by a deterministic generator G(seed,)G(seed, ψ) where ψ specifies temperature profile, noise level, logistics events, and product type. Temperature profiles are piecewise-constant segments with additive Gaussian noise ε∼(0,σ2) (0,σ^2), σ=0.5σ=0.5 °C. Seeds 42,123,999\42,123,999\ are used; each scenario runs 150 times (50 per seed) and results are reported as mean ± standard deviation. Transit times for excursion and high-risk scenarios (S2–S4, S6, S8) are set to 44–52 h to ensure at-risk batches (initial load drawn from the upper half of the N0N_0 distribution) can accumulate sufficient growth to reach NcritN_crit under the maintain-route policy while remaining protectable under corrective actions (rerouting, setpoint adjustment). 5.2 Temperature Profiles Table 3 defines five canonical profiles over a 48-hour transport window. Table 3: Temperature profiles used in experiments. Values shown are segment centroids; all profiles include Gaussian noise (σ=0.5σ=0.5 °C). Times in hours from shipment origin. Profile Label Segments (time h: temp °C) P1 Ideal transport 0–48: 4 P2 Mild abuse 0–48: 6.5 P3 Excursion event 0–10: 4; 10–16: 12; 16–48: 4 P4 Checkpoint delay 0–12: 4; 12–24: 10; 24–48: 5 P5 Multi-disturbance 0–8: 4; 8–12: 15; 12–24: 8; 24–30: 12; 30–48: 5 Figure 2: Temperature profiles (upper panel) and resulting microbial growth trajectories under the physics model (lower panel). The dashed line marks the B1 alert threshold (8 °C). Profile P2 (6.5 °C) never crosses the threshold yet drives non-negligible bacterial growth throughout the 48-hour window – the structural limitation of threshold-based monitoring. 5.3 Ground Truth Shelf-Life References A critical requirement for valid evaluation is that ground truth must be independent of the estimation model. We therefore derive shelf-life references from two published experimental studies of pasteurised whole milk stored at controlled temperatures [22, 23]. These studies report measured time to sensory or microbiological rejection, providing benchmarks not derived from the logistic growth model. For profiles spanning multiple temperatures (P3, P4, P5), we compute a weighted effective temperature T¯=∑iTi⋅Δti/ttotal T= _iT_i· t_i/t_total and interpolate linearly between the two nearest empirical conditions. The same reference midpoint is used by all methods. Table 4 reports empirical reference intervals alongside physics-model predictions, confirming adequate model calibration. Table 4: Empirical shelf-life reference intervals [22, 23] alongside physics-model predictions. All MAE calculations use the midpoint of the reference interval. Profile Empirical ref. (h) Physics pred. (h) Midpoint (h) P1 – Ideal 144–168 160 156 P2 – Mild abuse 84–108 96 96 P3 – Excursion 60–84 72 72 P4 – Delay 72–96 80 84 P5 – Multi-dist. 36–60 48 48 A note of particular operational significance: for Profile P2 (sustained 6.5 °C), Baseline B1 (configured at an 8 °C threshold) never triggers an alert throughout the entire 48-hour journey, despite the product losing approximately 40% of its shelf life relative to ideal conditions (Figure 2). This failure is not correctable by threshold recalibration; it is structural. The product temperature lies below any threshold that would avoid false positives under normal refrigeration, yet the spoilage mechanism operates throughout. 5.4 Model Training and Configuration The LSTM correction component is trained on 10,000 synthetic scenarios from profile families P1–P4 (80/20 train/validation split, MSE loss, Adam optimiser, learning rate 10−310^-3, 100 epochs, early stopping with patience 10). Profile P5 is held out entirely from training to allow genuine out-of-distribution testing. 5.5 Multi-Product Parameterisation (Scenario S7) To evaluate generalisability, Scenario S7 extends the framework to two additional product classes under Profile P3, via re-parameterisation of θp _p: • Fresh broccoli: N0=3.5N_0=3.5, Ncrit=6.5N_crit=6.5, a=0.008a=0.008, b=0.09b=0.09 (moderate sensitivity; higher initial load than milk). • Vaccines (temperature-sensitive biologics): quality modelled as a linear degradation function Q(t)=1−kV⋅tQ(t)=1-k_V· t, where kVk_V doubles every 5 °C above 2 °C (simplified Vaccine Vial Monitor model per WHO guidelines[26]); Qcrit=0.80Q_crit=0.80. The qS_q representation and QADI pipeline operate identically across product types; only the degradation model and parameters change, demonstrating framework generalisability. 6 Evaluation 6.1 Experimental Scenarios Table 5 lists the eight primary scenarios (eleven total configurations including the intermediate-noise variant S5b and three S7 product sub-scenarios). S1–S6 and S8 use pasteurised milk with empirical ground truth from [22, 23]. S7 uses per-product parameters from Section 5.5. S8 adds economic value assignment to assess decision quality in business-value terms. For controlled comparison, each run is evaluated at a single fixed decision point (t=24t=24 h), the midpoint of the 48 h temperature trace, where all methods have identical observation history and half the transit window remains. This tests single-shot decision capability; the Section 4 architecture describes continuous deployment operation where the reasoning service is invoked at R-threshold crossings or on scheduled intervals. Table 5: Experimental scenarios. Each isolates a specific capability or failure mode. ID Name Description Profile S1 Baseline Ideal conditions; sanity check for quality model correctness P1 S2 Excursion 6 h spike at 12 °C; threshold vs quality-aware P3 S3 Mild degradation Sustained 6.5 °C; B1 never alerts, 40% shelf-life loss P2 S4 Logistics disruption Checkpoint delay + ambient exposure; cross-layer reasoning P4 S5 Sensor noise (high) σ=1.5σ=1.5 °C; robustness and uncertainty handling P1+noise S5b Sensor noise (med.) σ=1.0σ=1.0 °C; intermediate noise for robustness analysis P1+noise S6 Routing decision P3 excursion profile; action optimality under active excursion P3 S7 Multi-product Milk, broccoli, vaccine under P3; framework generalisability P3 S8 Economic impact P5 multi-disturbance + product value ($4.20/L, 2,000 L batch) + spoilage penalties P5 6.2 Baselines and Ablations Five baselines are evaluated: • B1 – Threshold monitoring: alert if temperature >8>8 °C; no quality model; no action recommendation. It represents the current industry standard. • B2 – Physics-only: microbial growth model without ML correction or reasoning. • B3 – Physics plus noise: the physics-only model (B2) with additive Gaussian estimation noise (σ=8σ=8 h), representing the higher variance of a data-driven predictor that lacks physics regularisation. This is a proxy for an unconstrained ML-only model; the noise level is calibrated to the expected residual of an unregularised regressor on this feature set. We can think of it as a decision heuristic identical to B2. • B4 – Optimisation-based: maximises expected product survival fraction minus action cost by exhaustive enumeration over the action space, using the physics model for shelf-life projection under each action; no LLM reasoning. • B5 – Rule-based expert system: hard-coded rules triggered by temperature and delay thresholds (e.g., if delay >>4 h and temperature >>8 °C, reroute; otherwise maintain route). It uses a fixed quality-state proxy; no real-time quality estimation. It is a direct competitor to the reasoning layer. Three ablations complement the baselines: V1 removes both the LLM and the LSTM correction (physics-only model with heuristic decision rules); V2 removes uncertainty estimation (U≡0U≡ 0); and V3 removes RAG (Phi-4 with fixed system prompt only, no retrieved context). 6.3 Evaluation Metrics • M1: Shelf-life MAE (h) against empirical reference midpoints [22, 23]. B1 and B5 produce no shelf-life estimates and are excluded from M1. • M2: Spoilage rate taken as % of simulated batches reaching the consumer with Q<QcritQ<Q_crit. • M3: Decision optimality taken as % of scenarios where the system selects the oracle-optimal action. The oracle is defined as the action that maximises V−CV-C by exhaustive enumeration over A, using exact physics parameters applied to the shared batch state at the decision evaluation point (t=24t=24 h). All methods and the oracle operate on the same physics-simulated microbial count from the shared temperature trace, ensuring the comparison is causal (action differences, not input differences), independently of all methods under test. • M4: Time-to-action (h) is the elapsed time from event onset to first corrective action. • M5: Robustness is the MAE degradation (hours) under elevated noise (σ=1.5σ=1.5 °C, Scenario S5) relative to baseline noise (σ=0.5σ=0.5 °C, Scenario S1). • M6: Explanation quality taken as % of LLM outputs rated causally correct by domain expert review (described in Section 6.5.6). • M7: Economic value preserved taken as % of initial product value retained versus no-intervention (Scenario S8). 6.4 Statistical Analysis All pairwise comparisons between the proposed system and each baseline use the Wilcoxon signed-rank test [25], which makes no distributional assumptions. Multiple comparisons are corrected by the Holm step-down procedure [10]. We report Holm-corrected p-values and rank-biserial correlation r as the effect size. Significance threshold is α=0.05α=0.05. 6.5 Results 6.5.1 Shelf-Life Prediction Accuracy (M1) Table 6 reports MAE against independent empirical reference midpoints for milk and broccoli scenarios (S1–S6, S7-milk, S7-broccoli, S8). The S7-vaccine sub-scenario is excluded from this comparison: the VVM linear degradation model is architecturally incompatible with the logistic growth model underlying the LSTM, so cross-model MAE is not meaningful; B2 and B3 (which also applies milk physics to vaccine) is similarly excluded. The proposed system achieves 7.2 h mean MAE (excluding the S7-vaccine sub-scenario; see caption), versus 30.9 h for physics-only (B2) and 31.7 h for physics-plus-noise (B3); both differences are statistically significant (p<0.001p<0.001, r=0.74r=0.74). On disturbance scenarios (S2–S5) QADI achieves 13.1 h vs. 27.1 h for B2. On the held-out S8 scenario (P5 multi-disturbance profile) B2 achieves lower MAE (3.9 h) than QADI (6.2 h), as the LSTM correction marginally overshoots for a temperature profile outside its training distribution; the corresponding per-run uncertainty U(t)U(t) is elevated in S8, correctly flagging the higher estimation risk. The per-scenario S4 (logistics disruption, P4 profile) shows the largest single-scenario MAE for QADI (36.0 h) reflecting LSTM overcorrection on the P4 multi-step profile; this is the primary driver of the aggregate S2–S5 disturbance MAE (Figure 3). The V1 ablation (no LLM, physics model only) shows +23.7+23.7 h higher MAE than the full system (p<0.001p<0.001, r=0.74r=0.74), confirming that the LSTM correction – not the LLM – is the primary contributor to prediction accuracy. As stated in Section 4.4, the LLM operates entirely downstream of q(t)S_q(t) and has no role in shelf-life estimation. Table 6: Shelf-life prediction MAE (hours, lower is better) against empirical reference midpoints [22, 23]. Results are mean ± std over 150 runs per scenario (50 per seed), aggregated across all milk and broccoli scenarios (S1–S8, S5b, S7-milk, S7-broccoli; S7-vaccine excluded). B1, B4, and B5 are omitted (no prediction capability). The S7-vaccine sub-scenario is excluded: the VVM degradation model is fundamentally different from the logistic growth model used by the LSTM, making cross-model MAE comparison uninformative; B2/B3 (milk-parameterised physics) also produce invalid predictions for vaccine. Significance vs proposed system (Wilcoxon signed-rank, Holm-corrected): ∗p<0.05^*p<0.05, p∗∗<0.01^**p<0.01, ∗p<0.001^***p<0.001. r = rank-biserial correlation (small values reflect cross-scenario heterogeneity in paired comparisons; the significance is driven by consistent directional advantage across the majority of scenarios). MAE (disturb.) = scenarios S2–S5 only. MAE (S8) = held-out P5-profile scenario (multi-disturbance, out-of-distribution for LSTM). Method MAE (all) MAE (disturb.) MAE (S8) p r B2 – Physics-only 30.9 ± 14.8 27.1 3.9 <0.001∗<0.001^*** 0.74 B3 – Physics+noise 31.7 ± 15.6 27.9 7.2 <0.001∗<0.001^*** 0.76 V2 – No uncertainty 7.2 ± 10.4 13.1 6.2 n.s. 0.048 V1 – No LLM 30.9 ± 14.8 27.0 3.9 <0.001∗<0.001^*** 0.74 Ours (full) 7.2 ± 10.4 13.1 6.2 – – Figure 3: Shelf-life prediction MAE by scenario (M1) for prediction-capable methods. QADI achieves substantially lower MAE than B2, B3, and V1 across S1–S3, S5–S6, but is outperformed in S4 (logistics disruption, P4 profile) where the LSTM correction overshoots the multi-step temperature profile. Error bars show ± 1 std over 150 runs. 6.5.2 Spoilage Rate and Economic Impact (M2, M7) Table 7 reports spoilage rates and value preservation across all methods and scenarios. QADI achieves 14.5% spoilage, lower than the physics-only (B2), physics-plus-noise (B3), and rule-based (B5) baselines (all 16.6%) and comparable to the threshold-based B1 (14.3%). No spoilage comparison reaches statistical significance (p≥0.08p≥ 0.08); all effect sizes are r≈0.000r≈ 0.000, reflecting the binary nature of spoilage outcomes with heavy within-pair ties across the 150-run paired structure. The directional trend (QADI and B1 below the physics-only baselines) is consistent and driven primarily by S8, where QADI’s LLM correctly prescribes a4a_4 to reduce the effective spoilage. The V2 ablation (no uncertainty) is not distinguishable from the full system on this metric (identical outcomes), indicating that the spoilage rate advantage over physics-only baselines derives entirely from the LSTM correction and LLM action layers. The value preservation of QADI (84.9%) exceeds B2/B3 (83.4%) and B1 (77.3%), though B4 (83.8%) is comparable (Figure 4). V1 (no LLM, physics model only) shows spoilage of 14.9% – marginally higher than QADI (14.5%), a difference that is not statistically significant (p=0.73p=0.73). V1’s heuristic a3a_3 action in S8 fails to adequately protect the batch, producing 30.7% spoilage versus 21.3% for QADI. QADI’s value preservation (84.9% vs. 79.7% for V1) confirms that the LLM’s contextual action selection preserves substantially more total value. Table 7: Spoilage rate (M2) and product value preservation (M7). Mean ± std over 150 runs per scenario across all 11 scenario configurations (including S5b). High std reflects the binary nature of spoilage outcomes. Lower spoilage and higher value preservation are better. Significance vs proposed system (Wilcoxon, Holm-corrected). r values are near zero for all methods due to the binary-outcome Wilcoxon test on heavily-tied paired observations at large n; reported for completeness. No spoilage comparison reaches statistical significance at α=0.05α=0.05; the trending difference for B2/B3/B5 (p=0.08p=0.08) reflects 2.1 p lower spoilage for QADI in S8, where the LLM’s correct a4a_4 action prevents unnecessary spoilage. ‡ : V2 outcomes are identical to the full system on this metric (no effect of removing uncertainty quantification on spoilage). Method Spoilage (%) Value pres. (%) p r B1 – Threshold 14.3 ± 35.0 77.3 ± 32.3 n.s. 0.000 B2 – Physics-only 16.6 ± 37.2 83.4 ± 37.2 n.s. (0.08) 0.000 B3 – Physics+noise 16.6 ± 37.2 83.4 ± 37.2 n.s. (0.08) 0.000 B4 – Optimisation 15.6 ± 36.3 83.8 ± 36.1 n.s. 0.000 B5 – Rule-based 16.6 ± 37.2 83.4 ± 37.2 n.s. (0.08) 0.000 V1 – No LLM 14.9 ± 35.7 79.7 ± 34.0 n.s. 0.000 V2 – No uncertainty‡ 14.5 ± 35.2 84.9 ± 35.0 identical – Ours (full) 14.5 ± 35.2 84.9 ± 35.1 – – Figure 4: Spoilage rate (M2, left) and product value preserved (M7, right) across all methods and scenarios. Spoilage differences are small and not statistically significant (p≥0.08p≥ 0.08); value preservation differences are larger, with B1 (threshold monitoring) preserving 77.3% versus 84.9% for QADI, driven by B1’s sub-optimal rerouting decisions. Error bars show ± 1 std. 6.5.3 Decision Quality (M3) Table 8 reports decision optimality. The full system achieves oracle-optimal action selection in 99.5% of scenarios, significantly outperforming B1 (34.2%, p<0.001p<0.001) and V1 without LLM (45.5%, p<0.001p<0.001) (Figure 5). B2, B3, and B5 achieve only 90.9% optimality, significantly lower than QADI (p<0.001p<0.001): these methods default to a1a_1 (maintain route) in Scenario S8 where the oracle prescribes a4a_4 (setpoint adjustment), producing 0% optimality in that scenario. V2 (no uncertainty, 99.0%) and V3 (no RAG, 99.9%) are not significantly different from QADI (p>0.69p>0.69), confirming that uncertainty quantification and RAG retrieval have no effect on action selection. B4 (optimisation-based exhaustive search) achieves 100%, not significantly above QADI (p=0.66p=0.66, n.s.), as both methods correctly prescribe a4a_4 in S8. B1 fails across scenarios S2, S4, S6, and S8 where its threshold-triggered rerouting does not match the oracle action; it also spuriously reroutes in baseline scenarios where no intervention is warranted. The residual 0.5% suboptimality in QADI arises from occasional spurious a4a_4 recommendations in scenarios S2 (0.7% error rate), S3 (3.3%), S4 (0.7%), and S6 (1.3%), where the oracle-optimal action is a1a_1 (no intervention) and the LLM very rarely over-intervenes. V1 applies heuristic rules (a3a_3 reprioritise) that produce incorrect actions in all scenarios requiring context-sensitive intervention decisions (S2–S6, S8), reducing its optimality to 45.5%. A note on B5: the combined joint condition (delay >4>4 h and temperature >8>8 °C) was not simultaneously met in any tested scenario – checkpoint delays are set to 2 h for S4 and zero otherwise, so the delay threshold is never crossed. As a result, B5 selects a1a_1 unconditionally across all runs, reducing it to an always-maintain-route policy. This outcome is itself informative: rule-based systems with fixed joint threshold conditions degrade to no-ops when those thresholds are not jointly triggered – precisely the structural fragility QADI addresses through continuous quality-state reasoning. Note on M4 (time-to-action): since the oracle-optimal action was a1_maintain_route (no intervention) for 7 of 10 scenario configurations, time-to-action is not a meaningful primary differentiator across methods and is not reported separately. Table 8: Decision optimality (M3). Higher optimality is better. Significance vs proposed system (Wilcoxon, Holm-corrected). B2, B3, B5 are significantly lower than the full system (p<0.001p<0.001), failing in S8 where the oracle prescribes a4a_4. B4 is not significantly different from the full system (p=0.66p=0.66, n.s.) since both handle S8 correctly. V2 and V3 are not significantly different from the full system (p>0.69p>0.69). r values are ≈0.000≈ 0.000 for binary Wilcoxon at large n; reported for completeness. Method Optimal (%) p r B1 – Threshold 34.2 <0.001∗<0.001^*** 0.000 B2 – Physics-only 90.9 <0.001∗<0.001^*** 0.000 B3 – Physics+noise 90.9 <0.001∗<0.001^*** 0.000 B4 – Optimisation 100.0 n.s. 0.000 B5 – Rule-based 90.9 <0.001∗<0.001^*** 0.000 V1 – No LLM 45.5 <0.001∗<0.001^*** 0.000 V2 – No uncertainty 99.0 n.s. 0.000 V3 – No RAG 99.9 n.s. 0.000 Ours (full) 99.5 – – Figure 5: Decision optimality (M3) for all methods. The LLM’s contribution is visible in the gap between V1 (no LLM, 45.5%) and the full system (99.5%). B2, B3, B5 achieve only 90.9%, failing in S8 where the oracle prescribes setpoint adjustment. B4 (exhaustive optimisation) and QADI both reach ≈ 100%, confirming the LLM reliably identifies the correct action type. 6.5.4 Robustness Under Noise (M5) Table 9 compares MAE at three noise levels: baseline S1 (σ=0.5σ=0.5 °C), intermediate S5b (σ=1.0σ=1.0 °C), and high S5 (σ=1.5σ=1.5 °C, all P1 profile). The physics-only model (B2) is most stable under noise (Δ S1→ 5 = +0.3+0.3 h), as its parameters are fixed and independent of temperature measurement variance. The physics-plus-noise model (B3) degrades by +0.3+0.3 h – essentially the same as B2, since the additive estimation noise in B3 is independent of the temperature measurement noise and therefore does not compound it. The full hybrid system degrades by +5.1+5.1 h (S1→ 5); removing uncertainty estimation (V2) produces identical degradation (+5.1+5.1 h), confirming that the Monte Carlo sampling has no net noise-amplification effect. Although QADI degrades more in absolute terms than B2/B3, it retains substantially lower absolute MAE at all noise levels (8.0 h vs. 32.9 h at S5; Figure 6). The intermediate S5b scenario (+1.3+1.3 h for QADI vs. +0.0+0.0 h for B2) reveals that the LSTM is more sensitive to measurement noise than physics-only methods: the transition from medium to high noise produces the majority of LSTM degradation, while physics parameters remain essentially unaffected. Spoilage rates do not differentiate methods under noise: all methods show ≈ 0 change in spoilage rate from S1 to S5 within the P1 profile family. Table 9: Robustness (M5): MAE (hours) under three sensor noise levels on the P1 (baseline) temperature profile. S1: σ=0.5σ=0.5 °C; S5b: σ=1.0σ=1.0 °C (intermediate); S5: σ=1.5σ=1.5 °C (high). ΔS1→S5b _S1→ S5b and ΔS1→S5 _S1→ S5 are MAE increases relative to low noise, computed from raw run data; positive values indicate degradation. B1, B4, B5 omitted (no shelf-life prediction). All results over 150 runs per scenario. Method MAE S1 MAE S5b MAE S5 ΔS1→S5b _S1→ S5b ΔS1→S5 _S1→ S5 B2 – Physics-only 32.6±2.532.6± 2.5 32.7±5.032.7± 5.0 32.9±7.432.9± 7.4 +0.0+0.0 +0.3+0.3 B3 – Physics+noise 31.6±7.631.6± 7.6 31.6±8.331.6± 8.3 31.9±9.631.9± 9.6 +0.0+0.0 +0.3+0.3 V1 – No LLM 32.6±2.532.6± 2.5 32.7±5.032.7± 5.0 32.9±7.432.9± 7.4 +0.0+0.0 +0.3+0.3 V2 – No uncertainty 2.9±2.12.9± 2.1 4.1±3.24.1± 3.2 8.0±8.88.0± 8.8 +1.3+1.3 +5.1+5.1 Ours (full) 2.9±2.12.9± 2.1 4.2±3.24.2± 3.2 8.0±9.08.0± 9.0 +1.3+1.3 +5.1+5.1 Figure 6: Robustness under sensor noise (M5). Left: mean MAE at three noise levels for each method. Physics-based methods (B2, B3, V1) are insensitive to noise; QADI and V2 degrade from 2.9 h to 8.0 h (S1→ 5) but remain substantially more accurate at all levels. Right: total MAE degradation (S1→ 5); QADI and V2 are equally affected (+5.1+5.1 h), confirming the uncertainty component adds no noise-amplification. Error bands show ± 1 std. 6.5.5 Ablation Study Table 10 summarises component contributions relative to the full system. The Δ . column reports the change in noise-induced MAE degradation (S1→ 5) relative to the full system; a negative value means the variant is more noise-robust in absolute degradation terms (though not necessarily better in absolute MAE), while a positive value means it is less robust. Removing the LLM (V1) increases MAE by +23.7+23.7 h (V1 reverts to a physics-only model, matching B2) and reduces decision optimality by −54.0-54.0 p – the largest effect of any single component (Figure 7). V1 also eliminates explanation quality (−83-83 p). V1 shows lower noise-induced MAE degradation (−4.8-4.8 h relative to QADI) because physics-only predictions are inherently insensitive to temperature noise; however, V1’s absolute MAE is 4× higher than QADI even at low noise (32.6 h vs. 2.9 h at S1). Removing uncertainty (V2) has negligible effect on MAE (0.0 h), decision optimality, or noise robustness (identical Δ . to QADI), confirming that the Monte Carlo sampling neither amplifies nor attenuates noise sensitivity. Removing RAG (V3) has no effect on MAE and decision optimality (V3 outcomes identical to QADI), but reduces explanation quality by −21-21 p, confirming that the knowledge base primarily contributes to explanation grounding rather than action selection. Table 10: Ablation study. Values are changes relative to the full system. Δ in hours (excluding S7-vaccine); Δ . and Δ . in p; Δ . is the change in noise-induced MAE degradation (ΔS1→S5 _S1→ S5, h) relative to full system – negative = more noise-robust than full system. Full system row shows absolute values for reference. Variant Δ (h) Δ . (p) Δ . (h) Δ . (p) V1 – No LLM +23.7+23.7 −54.0-54.0 −4.8-4.8 −83-83 V2 – No uncertainty 0.00.0 00 0.00.0 −3-3 V3 – No RAG 0.00.0 00 0.00.0 −21-21 Full system 7.2 99.5% +5.1+5.1 83% Figure 7: Ablation heatmap showing changes in each metric relative to the full system (green = degradation, red = improvement or no change; colour scale capped at ±30± 30). V1 (no LLM) produces the largest effects: +23.7+23.7 h MAE and −54-54 p optimality. V3 (no RAG) affects only explanation quality (−21-21 p). V2 (no uncertainty) shows no measurable effect on any metric, including noise robustness. Δ sourced from expert evaluation; all other columns from run data. 6.5.6 Explanation Quality (M6) Expert evaluation was conducted by five domain experts: two food microbiologists, two logistics engineers, and one food safety regulatory specialist. Each of the 200 randomly sampled LLM outputs (stratified across scenarios) was rated against a three-criterion rubric: (a) correct identification of the physical event responsible for quality deterioration; (b) correct causal mechanism linking that event to the shelf-life impact; and (c) appropriateness of the recommended action given the stated quality state. An output was rated “causally correct” if all three criteria were satisfied by majority vote. Inter-rater reliability was assessed on 40 outputs rated by all five experts simultaneously. Fleiss’ κ=0.71κ=0.71 (95% CI: 0.64–0.78), indicating substantial agreement [5]. Overall, 83% of outputs were rated causally correct. Common failure modes: over-attribution to a single event when multiple disturbances were present (12% of outputs) and underestimation of lag phase duration (5%). The V3 ablation (no RAG) achieved 62% causal correctness, confirming that retrieved kinetics summaries and decision precedents are responsible for a substantial fraction of the LLM’s domain-grounded reasoning. 6.5.7 Multi-Product Results (S7) and Economic Impact (S8) Under Scenario S7, the qS_q representation and QADI pipeline generalise across all three product classes without architectural modification. Decision optimality under Profile P3 was 100% for milk, 100% for broccoli, and 100% for QADI on the vaccine model (V1 achieves 0% for vaccine, confirming that the LLM is required to reason correctly about the VVM degradation model). Shelf-life MAE for the vaccine sub-scenario is not reported (see Table 6 caption). Under Scenario S8 (economic impact, P5 profile, 2,000-litre milk batch at $4.20/L), QADI correctly prescribes a4a_4 (setpoint adjustment) in 100% of runs, matching B4’s 100% optimality. QADI preserved 72.4% of product value versus 61.8% for B1, 68.0% for B2 (which defaults to maintain-route), and 72.4% for B4. The absolute values are lower than other scenarios because P5 (multi-disturbance profile) produces substantially higher spoilage for methods that do not intervene with setpoint adjustment (32% spoilage for B2 vs. 21.3% for QADI and B4). Per batch, QADI preserves approximately $890 more value than the threshold baseline (72.4% vs. 61.8% of $8,400), demonstrating that the LLM’s ability to identify the appropriate intervention type under severe multi-disturbance conditions produces measurable economic benefit. 7 Discussion 7.1 Core Findings The evaluation results support three robust claims and reveal one important limitation, all grounded in statistically significant comparisons against independent empirical ground truth. First, threshold-based monitoring is structurally, not merely parametrically, inadequate. Scenario S3 makes this concrete: B1 raises no alert throughout a 48-hour journey at 6.5 °C, the most commercially prevalent spoilage scenario, while the product loses 40% of its shelf life. No threshold calibration can address this failure without generating unacceptable false positive rates during normal refrigerated transport. B1 achieves only 34.2% decision optimality across all scenarios, primarily because it fires rerouting actions in excursion scenarios where the oracle correctly identifies no intervention is needed. Second, the LLM reasoning layer makes a specific and isolable contribution to decision quality and explanation generation. The 54.0 p decision optimality gap between V1 (no LLM, 45.5%) and the full system (99.5%) is attributable to contextual reasoning that the rule-based B5 achieves only partially. The +23.7+23.7 h MAE difference between V1 and the full system reflects the V1 ablation reverting to a physics-only model (matching B2), not any LLM contribution to prediction. These contributions are architecturally separated and analytically distinguished. B4 (exhaustive optimisation) achieves 100% optimality – not significantly above QADI (p=0.66p=0.66, n.s.) since both methods correctly handle all eleven scenario configurations including the severe multi-disturbance S8 profile. The QADI system’s 0.5% residual suboptimality arises from occasional spurious over-interventions in safe scenarios, not from any systematic action-type failure. Third, retrieved domain knowledge contributes independently from the LLM’s native reasoning. The 21 p gap on explanation quality between V3 (no RAG, 62% causal correctness) and the full system (83%) is attributable entirely to retrieved kinetics summaries and decision precedents. V3 matches QADI on optimality, confirming that the knowledge base primarily enables explanation grounding rather than action selection per se in the evaluated scenarios. Fourth, the uncertainty component U(t)U(t) does not show a measurable spoilage benefit at 150-run scale: V2 (no uncertainty) produces identical spoilage rates, decision outcomes, and noise robustness (Δ S1→ 5 = +5.1+5.1 h for both) to the full system. This confirms that MC sampling neither amplifies nor attenuates noise sensitivity. U(t)U(t) remains architecturally valuable as an input to the LLM’s confidence-aware prompting, but its direct spoilage-reduction role is not demonstrated by these experiments. 7.2 Interpretability and Operational Utility An 83% causal correctness rate with Fleiss’ κ=0.71κ=0.71 is a meaningful result for an untuned 8B-parameter model operating in a specialised domain. The primary failure modes (viz., over-attribution and lag phase underestimation) are tractable: both are addressable through targeted fine-tuning or additional precedent documents in the knowledge base. Operators consistently report that understanding why a quality event occurred is the prerequisite for confident action; a system producing both a recommendation and a causally grounded justification is meaningfully more deployable than one producing a ranked action list alone. 7.3 Trade-offs and Design Limitations Forward temperature assumption. Shelf-life prediction beyond the 48-hour observation window requires an assumption about future temperature. We hold the current segment value and then revert to 4 °C; this is applied uniformly and disclosed explicitly for all methods. Nonetheless, it introduces systematic bias in profiles where actual future temperatures diverge from this assumption. A Bayesian approach conditioning on historical route data would reduce this uncertainty in deployment. LLM grounding and failure rate. Seventeen percent of LLM outputs were rated causally incorrect (83% causal correctness). The residual 0.5% decision suboptimality arises from occasional over-interventions in safe scenarios (spurious a4a_4 in S2–S4, S6) rather than any systematic action-type failure. For pharmaceutical cold chains where incorrect decisions carry patient safety implications, the 17% explanation error rate is non-trivial. Three mitigations are available: (i) fine-tuning on cold chain-specific trajectory data, expected to reduce lag phase and multi-event attribution errors substantially; (i) a formal constraint-checking post-processor that rejects physically incoherent action recommendations; and (i) expanding the RAG knowledge base with precedents explicitly covering over-intervention risks in excursion scenarios. Physics model assumptions. N0N_0 is drawn from (3.0,0.52)N(3.0,0.5^2). In practice, initial bacterial load varies with supplier hygiene, packaging conditions, and pre-monitoring transport. The uncertainty component partially addresses this, but a fully Bayesian formulation would be preferable in high-stakes contexts. Product generality. Quantitative evaluation is deepest for pasteurised milk. The S7 results demonstrate framework generalisability, but empirical parameter validation for broccoli and vaccines is less thorough. Extension to products with non-microbial spoilage mechanisms (lipid oxidation, enzymatic browning) requires different degradation formulations. Evaluation scope. The five temperature profiles represent canonical disturbance patterns, not the full distribution of real supply chain trajectories. The out-of-distribution evaluation on P5 provides a partial robustness test, but field validation on real logistics data remains the necessary next step. 7.4 Threats to Validity Internal validity. Ground truth references are drawn from published experimental studies [22, 23], independent of the estimation model. The oracle for decision optimality is computed by exhaustive enumeration using exact physics parameters on the shared batch state at t=24t=24 h, independently of all methods under test. Both choices address the circularity risk inherent in purely simulation- based evaluation. Significance testing with Holm correction addresses multiple comparison inflation. External validity. All results use a single product class (dairy) as primary case. The absolute values of MAE, spoilage rate, and decision optimality may shift under different product kinetics, regulatory environments, or logistics network structures. The S7 multi-product results provide partial evidence of framework transferability. Construct validity. Expert-rated explanation quality with κ=0.71κ=0.71 provides a robust proxy for explanation appropriateness, but causal correctness as rated here does not guarantee that operators in real settings would act correctly on the explanation. A field deployment study with real operators is required to fully validate operational utility. 7.5 Acknowledgment During the preparation of this manuscript, the authors used an AI language assistant for editing and prose refinement. All technical content, experimental design, analysis, results, and conclusions are entirely the authors’ own work, and the authors take full responsibility for the integrity of the manuscript. 8 Conclusion This paper presented the Quality-Aware Decision Intelligence (QADI) framework, addressing a structural limitation in cold chain IoT systems: the absence of a reasoning and decision layer connecting physical quality state to operational action. The central contribution is a structured quality state representation q=[L,Q˙,U,R]S_q=[L, Q,U,R] (with all four components formally derived and fully computable from the framework’s equations) that bridges microbial kinetics modeling and LLM-based reasoning in a computationally tractable and operationally interpretable form. Experimental evaluation against five baselines across eight primary scenarios (150 runs per scenario), with published empirical dairy data [22, 23] as ground truth and Wilcoxon signed-rank tests under Holm correction for all comparisons, demonstrates that QADI achieves substantially lower shelf-life prediction error (7.2 h vs. 30.9 h for physics-only; p<0.001p<0.001, r=0.74r=0.74), comparable-to-lower spoilage (14.5% vs. 14.3–16.6% for baselines; directional trend, p=0.08p=0.08), and near-perfect decision optimality across all eleven scenario configurations (99.5% aggregate). The LLM reasoning component is the decisive differentiator over heuristic alternatives: removing it reduces decision optimality from 99.5% to 45.5% (p<0.001p<0.001). Ablation results confirm that the hybrid modeling layer (LSTM correction) and LLM reasoning make distinct, non-redundant contributions to prediction accuracy and decision quality respectively; the RAG knowledge retrieval contributes primarily to explanation quality. The most operationally significant finding is that threshold-based monitoring is structurally incapable of detecting the most commercially prevalent spoilage scenario (mild sustained temperature elevation below the threshold), and that addressing this gap requires reasoning about cumulative degradation dynamics – not better threshold calibration. Future directions: (i) fine-tuning Phi-4 on cold chain-specific trajectory data to reduce the 17% LLM explanation error rate, improve RAG-independent grounding, and reduce the residual over-intervention rate in excursion scenarios; (i) improving LSTM generalisation on held-out profile families (e.g. P4/S4, P5/S8), where the hybrid model underperforms the physics baseline on some multi-step profiles; (i) Bayesian formulation of the physics model to replace the fixed N0N_0 distribution with a posterior updated from sensor history; (iv) field deployment validation with real operators to assess explanation utility in practice; and (v) extension to multi-product, multi-leg routing scenarios where decisions across interacting shipments must be jointly optimised. References [1] M. Abdin et al. (2024) Phi-4 technical report. arXiv preprint arXiv:2412.08905. Cited by: item C3., §4.4.1, Abstract. [2] A. D. Andrus, B. Campbell, K. J. Boor, M. Wiedmann, and N. H. Martin (2015) Short communication: postpasteurization hold temperatures of 4 or 6°c, but not raw milk holding of 24 or 72 hours, affect bacterial outgrowth in pasteurized fluid milk. Journal of Dairy Science 98 (11), p. 7640–7643. External Links: ISSN 0022-0302, Document, Link Cited by: §1.2, footnote 3. [3] J. Baranyi and T. A. Roberts (1994) A dynamic approach to predicting bacterial growth in food. International Journal of Food Microbiology 23 (3–4), p. 277–294. External Links: Document Cited by: §1.2, §2.2, §4.4.2, Table 2. [4] M. J. Chojnacky, W. Miller, and G. Strouse (2013) Methods for accurate cold-chain temperature monitoring using digital data-logger thermometers. In AIP Conference Proceedings, Vol. 1552, p. 1014–1019. Cited by: §4.2. [5] J. Cohen (1960) A coefficient of agreement for nominal scales. Educational and Psychological Measurement 20 (1), p. 37–46. External Links: Document Cited by: §6.5.6. [6] E. Duman and E. Aydogan (2025) Enhancing traceability and reliability in cold chain logistics through hyperledger fabric and IoT. Applied Sciences 15 (22), p. 12149. External Links: Document Cited by: §1.1, §2.1. [7] C. I. Garcia, M. A. DiBattista, T. A. Letelier, H. D. Halloran, and J. A. Camelio (2024) Framework for LLM applications in manufacturing. Manufacturing Letters 41, p. 253–263. External Links: Document Cited by: §2.4, Table 1. [8] J. Gillespie, T. P. da Costa, X. Cama-Moncunill, T. Cadden, J. Condell, T. Cowderoy, E. Ramsey, F. Murphy, M. Kull, R. Gallagher, and R. Ramanathan (2023) Real-time anomaly detection in cold chain transportation using iot technology. Sustainability 15 (3), p. 2255. External Links: Document Cited by: §1.1, §2.1, Table 1. [9] A. González-Potes, F. S. Olave, E. R. Christensen, and N. G. Petersen (2024) Hybrid AI and LLM-enabled agent-based real-time decision support architecture for industrial batch processes: a clean-in-place case study. Preprints.org. Cited by: §2.4. [10] S. Holm (1979) A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics 6 (2), p. 65–70. Cited by: §6.4. [11] H. Hsiao et al. (2020) A predictive model for shelf life of chilled pork. Food Quality and Safety 4 (1), p. 19–26. External Links: Document Cited by: §1.2, §2.2, Table 1, §4.4.2, Table 2, Table 2. [12] R. Jedermann, M. Nicometo, I. Uysal, and W. Lang (2014) Reducing food losses by intelligent food logistics. Philosophical Transactions of the Royal Society A 372 (2017), p. 20130302. External Links: Document Cited by: §2.2. [13] İ. Kök, O. Demirci, and S. Özdemir (2024) When IoT meet LLMs: applications and challenges. arXiv preprint arXiv:2411.17722. Cited by: §1.3, §2.4, Table 1, §4.2. [14] S. Lau, A. Trmcic, N. Martin, M. Wiedmann, and S. Murphy (2022) Development of a monte carlo simulation model to predict pasteurized fluid milk spoilage due to post-pasteurization contamination with gram-negative bacteria. Journal of Dairy Science 105 (3), p. 1978–1998. Cited by: §4.2. [15] T.T. Lott, M. Wiedmann, and N.H. Martin (2023) Shelf-life storage temperature has a considerably larger effect than high-temperature, short-time pasteurization temperature on the growth of spore-forming bacteria in fluid milk. Journal of Dairy Science 106 (6), p. 3838–3855. External Links: ISSN 0022-0302, Document, Link Cited by: §1.2, footnote 3. [16] MarketReportsWorld.com (2026) Cold chain logistics market size, share, growth, and industry analysis, by type (airways,roadways,seaways), by application (food and beverages,healthcare,others), regional insights and forecast to 2034. Note: marketreportsworld.com articleAccessed 2026-04-11 External Links: Link Cited by: §1.1. [17] W. A. Müller, S. B. Ferreira, and S. B. da Silva (2026) Enhancing food safety in the cold chain through internet of things and artificial intelligence. Journal of Food Science 91 (2). External Links: Document Cited by: §1.1, §2.1, Table 1. [18] N. Ndraha, H. Hsiao, J. Vlajic, M. Yang, and H. V. Lin (2018) Time-temperature abuse in the food cold chain: review of issues, challenges, and recommendations. Food Control 89, p. 12–21. External Links: Document Cited by: §1.1, §1.2, §4.3.1. [19] A. Roa-Henríquez, J. Fung, R. Abudu, J. Helgeson, and D. Thomas (2026) Causal machine learning: an empirical approach to supply chain management. Technical report NIST. External Links: Document Cited by: §1.2, §2.3. [20] D. W. Schaffner, J. McEntire, S. Duffy, R. Montville, and S. Smith (2003) Monte carlo simulation of the shelf life of pasteurized milk as affected by temperature and initial concentration of spoilage organisms.. Cited by: §4.2. [21] Z. M. Shen and S. Lin (2026) AI empowers supply chain intelligence: a three-chain four-intelligence framework. Engineering. External Links: Document Cited by: §1.2, §2.3, Table 1. [22] H. Singh, E. A. Decker, and H. E. Swaisgood (1994) Shelf life of pasteurized milk stored at various temperatures. Journal of Dairy Science 77 (3), p. 699–710. External Links: Document Cited by: item C2., §2.2, §4.3.1, §4.3.2, §5.3, Table 4, Table 4, 1st item, §6.1, Table 6, Table 6, §7.4, §8, Abstract. [23] N. Smigić, D. B. Popović, A. Roig, and M. Radović (2015) Shelf life of pasteurized milk under different storage temperatures. Food Control 54, p. 129–135. External Links: Document Cited by: item C2., §2.2, §4.3.1, §4.3.2, §5.3, Table 4, Table 4, 1st item, §6.1, Table 6, Table 6, §7.4, §8, Abstract. [24] P. S. Taoukis and T. P. Labuza (1989) Applicability of time-temperature indicators as shelf life monitors of food products. Journal of Food Science 54 (4), p. 783–788. Cited by: §2.2, Table 1. [25] F. Wilcoxon (1945) Individual comparisons by ranking methods. Biometrics Bulletin 1 (6), p. 80–83. Cited by: §6.4. [26] World Health Organization (2020) PQS Performance Specification: Vaccine Vial Monitor (WHO/PQS/E006/IN05.4). Technical report World Health Organization. Note: Issue date: 19 October 2020; last revision: 15 May 2018 External Links: Link Cited by: 2nd item. [27] M. H. Zwietering, I. Jongenburger, F. M. Rombouts, and K. van’t Riet (1990) Modeling of the bacterial growth curve. Applied and Environmental Microbiology 56 (6), p. 1875–1881. Cited by: §1.2, §2.2, Table 1, §4.3.1, §4.4.2, Table 2, Table 2.