Integrating sentiment analysis derived from online consumer reviews via few-shot large language models into commercial sales forecasting frameworks significantly reduces prediction errors across diverse retail categories, according to an empirical investigation conducted by Xueting Ren, Mingxing Li, Wanshan Li, and Ting Qu published in the journal Digital Engineering. The research team developed an analytical architecture that extracts both coarse-grained binary sentiment polarity and fine-grained continuous sentiment ratings from unstructured customer feedback, subsequently fusing these qualitative indicators with historical sales, promotional pricing, and advertising expenditures. By systematically benchmarking five heterogeneous predictive paradigms across six distinct consumer products sold on the Amazon e-commerce platform, the authors demonstrated that natural language processing can transform volatile qualitative consumer feedback into reliable leading demand indicators. Their findings confirm that while binary sentiment indices deliver consistent forecasting enhancements across statistical, machine learning, and neural network models, continuous sentiment scores provide specialized performance advantages that are heavily contingent upon downstream model architecture.
Accurate demand projection represents an essential operational requirement for cross-border e-commerce enterprises seeking to balance replenishment cycles, reduce warehouse overhead, and prevent stockouts within volatile digital marketplaces. Traditional sales forecasting methodologies have historically depended upon structured numerical inputs, encompassing past order volumes, seasonal cycles, and macroeconomic indicators, while largely omitting the unstructured textual data generated daily by consumers. This systemic omission introduces substantial predictive delays and estimation biases, particularly when abrupt shifts in consumer word-of-mouth sentiment drive sudden demand surges or sharp sales declines. Online customer reviews provide direct appraisals of product build quality, functional performance, and delivery fulfillment, yet incorporating these textual signals into numerical time series has historically posed severe technical hurdles. Conventional sentiment quantification models relied predominantly on domain-dependent lexical dictionaries or traditional supervised classifiers, which struggle to parse semantic nuance, figurative language, and evolving retail terminology without extensive, expensive manual annotation efforts across distinct product catalogues.
The advent of pre-trained large language models equipped with extensive context windows and contextual reasoning capabilities offers an automated alternative to labor-intensive sentiment labeling pipelines. Prior studies evaluated by the researchers demonstrated that transformer-based architectures such as BERT and RoBERTa improved representation learning over support vector machines and naive Bayes baselines, but still required dedicated task fine-tuning on labeled domain corpora. To establish an efficient extraction mechanism, the authors implemented an in-context few-shot prompting strategy utilizing the DeepSeek-V3.2 foundation model accessed through its official application programming interface endpoint. Operating without domain-specific parameter fine-tuning, the language model was tasked with reading raw customer review texts alongside structured instructions and demonstrative examples. The system maintained fixed API hyperparameters throughout inference, setting temperature to zero to ensure deterministic generation, nucleus sampling top_p to 1.0, and both frequency and presence penalties to zero, thereby securing strictly reproducible text categorization across thousands of customer evaluations.
To validate the prompting framework prior to deploying it across operational sales data, the investigators conducted a comparative benchmark using an independent, publicly available e-commerce review dataset comprising five thousand annotated samples. The collection was partitioned into a four-thousand-sample training pool to supply few-shot demonstration candidates and a one-thousand-sample test partition to measure classification accuracy, precision, recall, and F1-score across zero-shot, two-shot, four-shot, six-shot, and eight-shot prompt variations. In baseline evaluations, a tuned support vector machine achieved an F1-score of 0.8310, while a fine-tuned RoBERTa-base classifier reached 0.9480. In contrast, DeepSeek-V3.2 attained an F1-score of 0.9549 in a zero-shot configuration without exposure to labeled exemplars. Performance peaked under a four-shot prompt design, yielding an accuracy of 0.9660, a precision of 0.9675, a recall of 0.9657, and an F1-score of 0.9660. The authors observed that expanding demonstrative examples to six-shot and eight-shot prompts induced minor performance degradation, identifying four-shot prompting as the optimal configuration balancing contextual guidance against cognitive distraction.
The researchers established two distinct operational sentiment formulations to evaluate the influence of sentiment granularity on time series models. In the binary classification scheme, the language model assigned each review a discrete Positive or Negative label accompanied by an explanatory rationale. In the continuous scoring scheme, the model evaluated each review on a continuous numerical scale spanning 0 to 5 alongside an explanatory justification limited to ten words, mapping scores between 0 and 2 to negative sentiment, 2 to 3 to neutral attitudes, and 4 to 5 to positive perceptions. To align these irregular textual records with daily sales figures, the authors defined a normalized daily binary sentiment index St that subtracts negative review counts from positive review counts and divides the difference by total reviews plus an epsilon smoothing parameter of 10^-6 to avoid division by zero on days without feedback. Additionally, the team constructed a daily average continuous sentiment score Ct alongside a daily review volume metric Lt, generating structured numerical regressors bounded between minus one and positive one for binary polarity and zero to five for continuous intensity.
The operational dataset for downstream forecasting was acquired through a formal research collaboration with a commercial cross-border retailer operating on Amazon, tracking six product lines between July 1, 2024, and July 31, 2025. The selected products encompassed Clothing 1, which recorded an average of 123 daily sales and 975 total reviews; Grocery, exhibiting 113 daily sales and 607 reviews; Toys, averaging 59 daily sales and 467 reviews; Beauty, generating 108 daily sales and 855 reviews; Clothing 2, registering 132 daily sales and 1,045 reviews; and Electronics, logging 121 daily sales and 959 reviews. The apparel categories exhibited pronounced seasonal surges and contractions, whereas grocery, toys, beauty, and electronics demonstrated baseline demand stability punctuated by holiday sales spikes. Preprocessing procedures applied linear interpolation to bridge sequence breaks caused by temporary stockouts, three-sigma filtering paired with seven-day moving averages to smooth anomalous outlier spikes caused by technical glitches, and simple moving average smoothing to eliminate high-frequency recording noise.
To rigorously isolate the marginal contribution of review sentiment, the investigators structured a controlled experimental matrix evaluating three distinct input configurations across identical training horizons and evaluation splits. The baseline configuration, designated F0, incorporated only structured numerical regressors, including historical sales volume, product pricing, and advertising investment. The binary sentiment configuration, designated F1, augmented the baseline variables with the normalized daily binary sentiment index St and the daily review volume feature Lt. The continuous sentiment configuration, designated F2, combined the baseline variables with the fine-grained continuous sentiment score Ct and daily review volume Lt. These three feature sets were systematically supplied to five established forecasting paradigms: classical autoregressive integrated moving average with explanatory variables (SARIMAX), additive modular regression via Prophet, long short-term memory recurrent neural networks (LSTM), and two gradient-boosted decision tree algorithms, XGBoost and LightGBM. Models were trained on data spanning July 1, 2024, to July 1, 2025, and tested on a thirty-day operational forecast window throughout July 2025.
Quantitative performance evaluations using mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) demonstrated that incorporating sentiment features delivered substantial error reductions, with gradient-boosted decision trees consistently outperforming competing paradigms. On Product 1, baseline XGBoost recorded an MAE of 12.00, which decreased to 5.77 under F1 and 5.03 under F2, while LightGBM dropped from a baseline MAE of 12.27 to 5.73 under F1 and 4.67 under F2. For Product 2, XGBoost MAE declined from 3.90 under F0 to 1.47 under F1 and 1.30 under F2. In Product 4, LightGBM reduced MAE from 5.30 under F0 to 1.30 under F1 and 1.27 under F2. Conversely, statistical and recurrent models exhibited heightened vulnerability to feature complexity; on Product 1, SARIMAX registered an MAE of 68.57 under F0, improving to 29.50 under F1 but deteriorating to 33.73 under F2, while Prophet recorded an MAE of 80.93 under F0, 36.37 under F1, and 34.23 under F2. Similarly, LSTM on Product 1 shifted from an MAE of 14.57 under F0 to 12.63 under F1, but deteriorated to 18.47 under continuous feature set F2.
To evaluate whether the observed accuracy improvements achieved statistical significance, the authors performed two-tailed Diebold-Mariano tests using mean absolute error as the loss function. The statistical tests confirmed that introducing the binary sentiment index produced widespread, statistically significant forecasting enhancements across the majority of model-product pairings, with XGBoost and SARIMAX achieving uniform significance across all six commercial products. However, the continuous sentiment score Ct elicited highly heterogeneous responses across model architectures. While XGBoost maintained statistically significant predictive gains across all six products under the F2 configuration and LightGBM demonstrated significant gains on three products, LSTM and Prophet exhibited performance degradation. Specifically, the LSTM network experienced statistically significant accuracy deterioration on Products 1 and 3 under F2, while Prophet displayed significant performance declines on Products 2, 3, 4, and 6. The authors noted that while decision trees isolate nonlinear feature splits, recurrent and semi-parametric models risk overfitting and noise amplification when tracking continuous sentiment signals during periods of low daily review density.
The study provides actionable guidance for retail supply chain managers and enterprise forecasting teams, demonstrating that large language models enable fully automated, scalable transformation of raw customer feedback into predictive demand variables without manual data labeling. The authors recommend deploying gradient-boosted tree architectures like XGBoost or LightGBM alongside binary sentiment indices as a reliable, computationally efficient operational standard, reserving continuous sentiment scoring for high-volume retail categories where dense customer feedback prevents sparse signal noise. Concurrently, the researchers highlighted several technical boundaries governing their conclusions: the experimental dataset was restricted to thirteen months of transactions across six products on Amazon, review analysis was limited exclusively to English text, and sentiment extraction relied solely on DeepSeek-V3.2 without comparing alternate architectures such as GPT-4 or LLaMA. Furthermore, the framework evaluated global document sentiment rather than aspect-level attributions addressing shipping speed, packaging durability, or customer service, establishing clear avenues for future research in multi-platform, multilingual, and aspect-aware retail demand forecasting.
Subject of Research: Integration of large language model review sentiment analysis into e-commerce sales forecasting
Article Title: LLM sentiment analysis-integrated sales forecasting for E-commerce—a case study on Amazon
Article References: Ren, X., Li, M., Li, W., & Qu, T. (2027). LLM sentiment analysis-integrated sales forecasting for E-commerce—a case study on Amazon. Digital Engineering, 12, Article 100134. https://doi.org/10.1016/j.dte.2026.100134
Image Credits: AI Generated
DOI: 10.1016/j.dte.2026.100134
Keywords: sales forecasting, large language models, sentiment analysis, e-commerce analytics, Amazon case study, XGBoost, LightGBM, LSTM networks, SARIMAX, Prophet, DeepSeek-V3.2, few-shot learning, Diebold-Mariano test, consumer reviews, demand planning, time series analysis, feature engineering, inventory optimization
News Source: Denise Maddox. (November 26, 2026). Large Language Model Review Sentiment Improves Amazon Product Sales Forecasting Accuracy. Scienmag.



