October 09, 2026
Automated insights from data
Automated Insights from Data
Luiz Fernandes Carvalho; Edilson José Rodrigues
DOI: 10.22167/2675-6528-202603194
Article derived from a Course Conclusion Work (TCC), with content based on the student’s original work and adapted to the editorial format of the E&S Magazine with the support of the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege for textual synthesis and organization.
Summary
The contemporary business scenario is characterized by the exponential volume of data and the growing need for strategic communication accessible to non-technical users. A technological artifact was developed and evaluated for the automation of analytical narratives from structured e-commerce data, employing large language models (LLMs). The public dataset Amazon India (Kaggle) was used, containing 1,462 pre-processed products, distributed across nine main categories. After initial experimentation with local fine-tuning that produced severe hallucinations, the Llama 3.3 70B model was adopted via the Groq API, configured with a temperature of 0.4 and a prompt structured in four sections. The evaluation was conducted in a hybrid manner, combining automatic natural language processing metrics (ROUGE, BLEU, and BERTScore) and structured qualitative evaluation by two specialists, based on a five-criterion rubric. The results obtained demonstrated a ROUGE-1 Recall of 0.70 and a BERTScore F1 of 0.70, indicating good content coverage and high semantic similarity with the reference. The qualitative evaluation obtained an average of 4.0 on a five-point scale. It was concluded that the developed pipeline enables the democratization of access to Data Storytelling, allowing sellers without advanced technical training to extract actionable insights from their databases in an automated and reliable manner.
Keywords: automation; Data Science; Data Storytelling; e-commerce; Large Language Models.
1. Introduction
The contemporary business scenario is marked by the exponential production of data, a phenomenon consolidated under the concept of Big Data (Davenport and Patil, 2012). In this panorama, the discipline of Data Science and Analytics has become a central pillar for the conversion of large volumes of information into actionable insights, fundamental for supporting strategic decision-making (Kambatla et al., 2014). The ability to extract value from complex datasets is crucial for organizational competitiveness.
However, the mere construction of tables and graphs, while essential, does not ensure strategic success. The critical challenge lies in the effective communication of this data, specifically in translating analytical findings into clear and accessible narratives for non-technical audiences (Gupta, 2023; Schröder et al., 2023). This gap between technical analysis and executive understanding hinders the democratization of access to valuable information, limiting the potential impact of the data.
Recently, the rise of Large Language Models (LLMs) has represented a paradigm shift in information processing. These models demonstrate advanced capability in synthesizing contextual texts, positioning themselves as promising tools for the automation of analytical narratives (Open Data Science, 2023). The literature on Natural Language Generation from Data (NLG) documents significant advances in the translation of tabular data into natural language (Gatt and Krahmer, 2018; Puduppully et al., 2019).
Despite the progress, the quality of strategic communication and the minimization of hallucinations remain open challenges in the field of NLG (Ji et al., 2023). The generation of accurate, coherent, and contextually relevant narratives from structured data, especially in specific domains like e-commerce, requires solutions that ensure the fidelity and usefulness of insights for users without advanced technical training. The need to transform raw data into understandable and actionable stories is a growing demand in the business environment.
Given this context, the present research is justified by the search for solutions that enable the democratization of access to Data Storytelling, allowing salespeople and other professionals without advanced technical training to extract actionable insights from their databases in an automated and reliable way. Thus, the present work investigated the technical feasibility and effectiveness of an LLM-based pipeline to convert structured e-commerce data into cohesive executive narratives, with a hybrid evaluation — quantitative (ROUGE, BLEU, and BERTScore) and qualitative (expert evaluation).
2. Material and Methods
This research was characterized as a technological development and evaluation study, with a hybrid methodological approach, combining quantitative and qualitative methods. The central objective was to investigate the technical feasibility and effectiveness of a pipeline based on large language models (LLMs) to convert structured e-commerce data into cohesive executive narratives, aiming at democratizing access to Data Storytelling for non-technical users.
The unit of empirical analysis consisted of e-commerce data. The public dataset “Amazon Sales Dataset” (Karkavelraja, 2023) was used, which initially contained 1,465 product records from the Amazon India platform. The main variables included product identifiers, names, categories, prices with and without discount, discount percentage, ratings, and rating counts.
Data preprocessing was performed in a Python environment, using the Pandas library. This step included the cleaning of monetary symbols and numeric separators, the conversion of data types to appropriate formats, and the handling of missing values by dropping records (dropna). Additionally, the main category was extracted from the original hierarchical field.
After preprocessing, the final database totaled 1,462 products, distributed across nine main categories. The data were then aggregated by category, generating portfolio metrics such as average price, average discount, average rating, and total reviews. These metrics were serialized in JavaScript Object Notation (JSON) format to serve as input to the LLM pipeline.
In the LLM pipeline architecture, local fine-tuning of the DistilGPT-2 model was initially experimented with. However, this approach demonstrated significant limitations, including severe hallucinations and instabilities in the attention mask, which compromised the reliability of the generated insights. Given these observations, the adoption of the Llama 3.3 70B model (Grattafiori et al., 2024) was chosen.
The Llama 3.3 70B model was operated via the Groq API, selected for its parameter scale suitable for contextual reasoning on structured JSON data, its average response latency below 500 ms, and the elimination of the need for local graphics processing unit (GPU) infrastructure. The temperature, a parameter that controls randomness in text generation, was set to 0.4 to maximize factual fidelity.
The “system prompt” used to guide text generation was structured into four mandatory response sections: Overview, Discount Highlights, Satisfaction Analysis, and Strategic Recommendations. The pipeline was implemented in Python, using the official Groq library, and the data were transmitted to the model as serialized JSON.
The validation of the artifact’s effectiveness was conducted through a hybrid evaluation, which combined automatic natural language processing (NLP) metrics and a qualitative evaluation structured by experts. From a quantitative standpoint, three groups of complementary automatic metrics were employed to assess the quality of the generated narratives.
ROUGE (Recall-Oriented Understudy for Gisting Evaluation; Lin, 2004) metrics were used in the variants ROUGE-1 (unigrams), ROUGE-2 (bigrams), and ROUGE-L (longest common subsequence). These metrics measure the n-gram overlap between the generated text and a human reference, being recall-oriented and suitable for summarizing structured data, where the retention of numerical entities and category names is crucial.
The BLEU metric (Bilingual Evaluation Understudy; Papineni et al., 2002) was included as cross-validation, operating from the perspective of n-gram precision. Developed for machine translation, BLEU evaluates the fluency and fidelity of the generated text. BERTScore (Zhang et al., 2020) replaced n-gram counting with contextual representations from the BERT model, capturing semantic similarity and being robust to size asymmetry between the generated text and the reference.
The human reference used for the automatic metrics was drafted by the author, based on a direct reading of the abstract by category, in the form of a single synthesis paragraph containing the main findings expected by an analyst. The ratio between recall and precision of ROUGE-1 was used to estimate the difference in length between the generated report and this reference.
From a qualitative point of view, the report generated by the LLM was independently evaluated by two experts: the author and the supervising professor. The evaluation was carried out using a structured rubric with five criteria: Factual Accuracy, Logical Coherence, Relevance of Conclusions, Textual Fluency, and Absence of Hallucinations. Each criterion was scored on a scale of one to five points.
3. Results and Discussion
The developed pipeline demonstrated its capability to process the complete dataset of 1,462 e-commerce products, representing a significant expansion compared to preliminary tests. The Llama 3.3 model, configured with a temperature of 0.4 to maximize factual fidelity, generated an executive report structured into four main sections: Overview, Discount Highlights, Satisfaction Analysis, and Strategic Recommendations. This process occurred without the need for human intervention for intermediate calculations, evidencing the complete automation of narrative generation from structured data, a crucial step towards the democratization of Data Storytelling.
During execution, the system automatically identified the product categories with the highest volume in the dataset, highlighting “Electronics” with 526 products and “Computers & Accessories” with 451 products, which represent the most significant segments. Additionally, the pipeline flagged products with critical ratings, specifically those with a rating below 3.8, as a priority for monitoring. This functionality of highlighting actionable insights directly from raw data underscores the artifact’s utility for non-technical users, who can quickly identify areas of attention or opportunities for improvement without the need for complex analysis.
The validation of the artifact’s effectiveness was conducted through a hybrid evaluation, which combined automatic natural language processing (NLP) metrics with a qualitative evaluation structured by experts. From a quantitative standpoint, three groups of complementary metrics were employed: ROUGE (Recall-Oriented Understudy for Gisting Evaluation), BLEU (Bilingual Evaluation Understudy), and BERTScore. These metrics were used to compare the text generated by the language model with a standard reference manually crafted by an analyst, providing an objective basis for validating the pipeline’s performance.
The results of the ROUGE metrics revealed a ROUGE-1 Recall of 0.70, indicating that the model covered 70% of the unigrams present in the manual reference. This value demonstrates good coverage of essential content, which is particularly relevant for structured data summarization, where the retention of numerical entities and category names is crucial. However, the ROUGE-1 precision of 0.1854 suggests that the generated report was substantially longer than the reference, estimated at approximately 3.8 times, a pattern expected in open Natural Language Generation (NLG) tasks from Data (Gatt and Krahmer, 2018).
The ROUGE-1 F1-Score of 0.2932, while numerically low, is a direct mathematical consequence of the asymmetry between recall and precision, rather than an indication of intrinsically low textual quality. For larger n-grams, ROUGE-2 achieved a Recall of 0.2605 and ROUGE-L a Recall of 0.4250, reflecting reasonable preservation of bigrams and the logical order and cohesion of sentences, respectively. These values are lower, as expected for larger n-grams, but still contribute to understanding the model’s ability to maintain information structure and flow, even when expanding the narrative content.
The BLEU metrics, originally developed for machine translation, were included as cross-validation and reinforced the interpretation that the model did not literally reproduce the reference, but reformulated it in narrative language. BLEU-1 of 0.1384 and BLEU-4 of 0.0238 confirm this characteristic. Low BLEU values are widely documented in the literature for open NLG tasks, as the metric was designed for scenarios where the generated text and the reference have similar size and restricted vocabulary (Papineni et al., 2002). Narrative reformulation is a desirable behavior for executive communication, aiming for clarity and accessibility for non-technical audiences.
The BERTScore F1 of 0.7035 emerged as the most robust indicator among the set of metrics, effectively capturing the actual quality of the generated report. Unlike n-gram-based metrics, BERTScore utilizes contextual “embeddings” from the BERT model to compare texts, making it insensitive to the size difference between the generated text and the reference, and capable of capturing semantic similarity even when there are vocabulary differences (Zhang et al., 2020). The value of 0.70 is consistent with the ROUGE-1 Recall, confirming that despite its greater length, the LLM’s report preserved the informational content and meaning of the human reference, which is crucial for the reliability of the insights.
Together, the results of the quantitative metrics built a coherent picture of the pipeline’s performance. ROUGE Recall and BERTScore pointed to high semantic quality and content coverage, while ROUGE F1 and BLEU reflected the length difference between the generated text and the reference, rather than a deficiency in quality. The observed discrepancy between high recall and low precision constitutes a relevant methodological finding, as it demonstrates that the LLM can generate richer narratives than a human analyst might anticipate in a fixed-size reference. This underscores the imperative need for qualitative expert evaluation as an indispensable component in validating open-ended NLG systems.
The structured qualitative assessment was conducted independently by two experts, the author and the supervising professor, using a rubric with five criteria. The criteria included Factual Accuracy, Logical Coherence, Relevance of Conclusions, Textual Fluency, and Absence of Hallucinations, each scored on a scale of one to five, where one represented “Unsatisfactory” and five “Excellent”. This approach aimed to complement automatic metrics, providing a human perspective on the quality and usefulness of the generated narratives, especially regarding their applicability to users without advanced technical training.
The results of the qualitative evaluation revealed an overall average of 4.00 on a five-point scale, indicating a satisfactory perceived quality for an artifact in the initial validation stage. The Textual Fluency criterion obtained the highest average score, with 4.5, reflecting the remarkable ability of the Llama 3.3 model to produce text in formal and cohesive language, with high agreement among evaluators. On the other hand, the Absence of Hallucinations criterion obtained the lowest average score, with 3.5, a result that aligns with the findings of the empirical audit and the limitations subsequently identified. The high agreement among evaluators across all criteria (maximum difference of one point) reinforces the reliability of the evaluation instrument.
During the development and testing of the artifact, several limitations were identified, which are crucial for understanding the scope and future improvements of the pipeline. These limitations were categorized and empirically investigated through a detailed audit, which cross-referenced each statement generated by the model with the actual dataset data. This thorough analysis allowed not only the identification of failures but also their causes and implications, as well as the proposal of mitigation strategies for each of them, ensuring the robustness and reliability of the system in production environments.
The first category of failure identified was classic factual hallucination, characterized by the generation of information that was not present in the input data. One observed example was the citation of a specific product name as holding the largest discount, even though the JSON sent to the model only contained the `product_largest_discount` field calculated by the pipeline, without individual names. This traceability failure, where unauditable entities are cited, represents a risk equivalent to pure hallucination for the end-user. To mitigate this risk, the model’s temperature was set to 0.4, fields not present in the reference were omitted from the JSON, and subsequent human validation was recommended.
The second limitation refers to numerical errors caused by internal inconsistencies in the preprocessing pipeline. The model, for example, stated that the portfolio contained 1,348 products, when the correct value was 1,462. The most likely hypothesis for this divergence is that the pipeline used `df[‘product_id’].nunique()` to calculate the total number of products, while the aggregation by category employed `count()`. In the presence of duplicate `product_ids` in the original dataset, these operations result in distinct values. This finding highlights that the error was already present in the JSON before being processed by the LLM, demonstrating that the quality of automated insight is directly limited by the quality of preprocessing, and that validation should occur in earlier stages of the pipeline, not just at the model’s final output.
The third category of failure, conceptually distinct from the previous ones, was methodological opacity. In this case, the model reproduced a numerically correct value but omitted crucial information about the calculation method, which could lead to misinterpretations by the non-technical reader. For example, the model stated that the general discount average was 47.67%, a value present in the JSON and corresponding to the weighted average by the number of products. However, a simple calculation of averages by category would result in 39.53%, a difference of eight percentage points. This failure is not detected by automatic metrics such as ROUGE or BERTScore, nor by the Absence of Hallucinations rubric, as no data was invented, but the lack of methodological context can lead to misguided strategic decisions, making it a particularly relevant limitation for users without advanced technical training.
A high operational impact limitation identified was the dependency on the Groq API. Service interruptions or changes in request limits can completely disable the pipeline’s operation. To mitigate this risk in production environments, implementing a “fallback” mechanism for smaller local models, such as Llama 3.2 1B, is recommended. This strategy aims to ensure service continuity even in the face of external instabilities, increasing the robustness and availability of the technological artifact for users, which is essential for maintaining an automated Data Storytelling system.
In summary, the results obtained confirm the technical viability and effectiveness of the developed artifact for automating analytical narratives in e-commerce. The transition from the initial local fine-tuning strategy, which presented instabilities and hallucinations, to the architecture based on Llama 3.3 70B via Groq API, proved fundamental to ensure the reliability of the generated insights. The hybrid evaluation, combining quantitative and qualitative metrics, validated that the artifact adequately covers the informational content and produces reports with factual accuracy, coherence, and fluency appropriate for the target audience.
The ROUGE-1 Recall metrics of 0.70 and BERTScore F1 of 0.70, along with the qualitative average of 4.0, demonstrate the system’s ability to generate rich and semantically faithful narratives. The identified limitations, such as factual hallucination and methodological opacity, highlight the importance of human validation and rigorous preprocessing to ensure the reliability of insights. The developed pipeline, therefore, represents a significant advancement in democratizing access to Data Storytelling, allowing professionals without advanced technical training to extract actionable information from their databases in an automated and reliable manner, responding to the study’s main objective.
4. Conclusion
This study investigated the technical feasibility and effectiveness of a pipeline based on large language models (LLMs) to convert structured e-commerce data into cohesive executive narratives. It was found that the developed artifact demonstrated the ability to process a dataset of 1,462 products, generating structured executive reports that automatically identified high-volume categories and products with critical reviews. The hybrid evaluation, which combined automatic and qualitative metrics, confirmed the system’s robustness. A ROUGE-1 Recall of 0.70 and a BERTScore F1 of 0.70 were observed, indicating good content coverage and high semantic similarity with the reference. The qualitative evaluation, conducted by experts, achieved an average score of 4.0 on a five-point scale, attesting to the factual accuracy, coherence, and fluency of the narratives for the target audience. The main contribution of this work lies in democratizing access to Data Storytelling, enabling professionals without advanced technical training to extract actionable insights from their databases in an automated and reliable manner.
However, important limitations were identified, such as the occurrence of factual hallucinations, numerical errors resulting from inconsistencies in pipeline preprocessing, and methodological opacity, where correct values were presented without the proper calculation context. The dependency on the Groq API also proved to be a relevant operational limitation. For future studies, it is suggested to conduct evaluations with real users to measure perceived utility, extend the pipeline to domains beyond e-commerce, investigate more efficient fine-tuning approaches to optimize computational consumption, and implement automated auditing routines to verify consistency between input data and generated narratives before delivery to the user.
Bibliographic References
Davenport, T.H.; Patil, D. 2012. Data Scientist: The Sexiest Job of the 21st Century. Harvard Business Review 90(10): 70-76.
Gatt, A.; Krahmer, E. 2018. Survey of the State of the Art in Natural Language Generation: Core Tasks, Applications and Evaluation. Journal of Artificial Intelligence Research 61: 65-170.
Grattafiori, A. et al. 2024. The Llama 3 Herd of Models. arXiv. Disponível em: https://arxiv.org/abs/2407.21783. Acesso em: 2 nov. 2025.
Gupta, N. 2023. Data-driven storytelling: How to use data to tell compelling stories and drive business outcomes. World Journal of Advanced Engineering Technology and Sciences 8(1): 65-72.
Ji, Z.; Lee, N.; Frieske, R.; Yu, T.; Su, D.; Xu, Y.; Ishii, E.; Bang, Y.J.; Madotto, A.; Fung, P. 2023. Survey of Hallucination in Natural Language Generation. ACM Computing Surveys 55(12): Article 248, 38 pages. https://doi.org/10.1145/3571730.
Kambatla, K.; Kollias, G.; Kumar, V.; Grama, A. 2014. Trends in Big Data Analytics. Journal of Parallel and Distributed Computing 74(7): 2561-2573.
Karkavelraja, J. 2023. Amazon Sales Dataset. Kaggle. Disponível em: https://www.kaggle.com/datasets/karkavelrajaj/amazon-sales-dataset. Acesso em: 2 nov. 2025.
Lin, C.Y. 2004. ROUGE: A Package for Automatic Evaluation of Summaries. In: Text Summarization Branches Out, Barcelona. Proceedings… Barcelona: Association for Computational Linguistics. p.74-81.
Open Data Science. 2023. 2023 Was the Year of Large Language Models: Then and Now. Disponível em: https://opendatascience.com/2023-was-the-year-of-large-language-models-then-and-now/. Acesso em: 2 nov. 2025.
Papineni, K.; Roukos, S.; Ward, T.; Zhu, W.J. 2002. BLEU: a Method for Automatic Evaluation of Machine Translation. In: Annual Meeting of the Association for Computational Linguistics, 40., Philadelphia. Proceedings… Philadelphia: ACL. p.311-318.
Puduppully, R.; Dong, L.; Lapata, M. 2019. Data-to-Text Generation with Content Selection and Planning. In: AAAI Conference on Artificial Intelligence, 33. Proceedings… Palo Alto: AAAI Press. p.6908-6915.
Schröder, K.; Eberhardt, W.; Belavadi, P.; Ajdadilish, B.; van Haften, N.; Overes, E.; Brouns, T.; Calero Valdez, A. 2023. Telling stories with data – A systematic review. arXiv. Disponível em: https://arxiv.org/abs/2312.01164. Acesso em: 2 nov. 2025.
Zhang, T.; Kishore, V.; Wu, F.; Weinberger, K.Q.; Artzi, Y. 2020. BERTScore: Evaluating Text Generation with BERT. In: International Conference on Learning Representations, 8. Proceedings… OpenReview.net.
Article originating from the Final Course Project of the Specialization in Data Science and Analytics of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform