DETECTION OF PURCHASE AND SERVICE INTENTIONS USING ARTIFICIAL INTELLIGENCE TECHNIQUES

Authors

  • Bruno da Silva Sousa Author
  • Dario Brito Calçada Author

DOI:

https://doi.org/10.56238/ERR01v10n4-031

Keywords:

Semantic Search, Natural Language Processing (Nlp), Query Classification, Recommendation Systems, Transformers

Abstract

Introduction: The increasing complexity of interactions on e-commerce platforms poses significant challenges to the precise retrieval of products and services, particularly for short and noisy queries in Brazilian Portuguese. In this context, monolingual models based on Transformer architectures emerge as promising solutions to capture local linguistic nuances, aiming to reduce reformulations and search abandonment, which are critical elements for user experience and conversion rates. Objective: The main objective of this work was to develop and evaluate a classifier for purchase and service intention detection in e-commerce queries, employing the transfer learning technique with BERT models specifically pre-trained for Brazilian Portuguese. Materials and Methods: To this end, a corpus of queries obtained from the Parnaíba region was manually collected and annotated, categorized into 92 distinct intentions. Pre-processing included cleaning, anonymization, textual normalization, and the application of balancing and data augmentation techniques to mitigate class imbalance. Fine-tuning of the neuralmind/bert-large-portuguese-cased (BERTimbau) model was performed using the Hugging Face and PyTorch libraries, with tokenization configured for max_length = 128. Data splitting was stratified (test_size = 0.10), complemented by stratified cross-validation, and training incorporated regularization and early stopping strategies. Performance evaluation was based on metrics such as accuracy, precision, recall, and F1-score, with seed fixing and checkpoint saving to ensure reproducibility. Result: On the validation set, comprising 2,940 samples, the model achieved a global accuracy of 96.43% and a weighted average F1-score of approximately 0.96. Confusion matrices exhibited a predominantly diagonal pattern, indicating high precision, although greater confusion was observed between semantically similar categories and slightly lower performance in classes with low support. Training demonstrated efficient convergence within 3–5 epochs, with the best checkpoint selected based on accuracy. Conclusion: The findings demonstrate that transfer learning with BERT models in Portuguese constitutes a viable and highly effective solution for intention detection in e-commerce queries. This work resulted in the delivery of a high-quality labeled dataset and a functional model, which can be integrated to enhance user experience and optimize recommendation systems. For future production implementations, the integration of contextual signals (such as user history and product attributes), as well as the exploration of oversampling and category hierarchization, is recommended to refine performance in more challenging classes.

Downloads

Download data is not yet available.

References

BORGES, Hilda Biazatti. IMPLEMENTAÇÃO DE BUSCA SEMÂNTICA EM E-COMMERCES COMO APOIO A PESQUISAS INTELIGENTES. Cachoeiro de Itapemirim: INSTITUTO FEDERAL DE EDUCAÇÃO, CIÊNCIA E TECNOLOGIA DO ESPÍRITO SANTO, 2024.

CASELI, Helena; FREITAS, Cláudia; VIOLA, Roberta. Processamento de Linguagem Natural. In: SILVA, Ticiana et al. (Orgs.). Minicursos do SBBD 2022. 1. ed. [S.l.]: SBC, 2022. p. 1–25.

DEVLIN, Jacob et al. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv, , 24 maio 2019. Disponível em: <http://arxiv.org/abs/1810.04805>. Acesso em: 14 set. 2025

HAMMES, Luiz Otávio Alves; FREITAS, Larissa Astrogildo De. Utilizando BERTimbau para a Classificação de Emoções em Português. In: SIMPÓSIO BRASILEIRO DE TECNOLOGIA DA INFORMAÇÃO E DA LINGUAGEM HUMANA. Anais do XIII Simpósio Brasileiro de Tecnologia da Informação e da Linguagem Humana (STIL 2021). Brasil: Sociedade Brasileira de Computação, 29 nov. 2021. Disponível em: <https://sol.sbc.org.br/index.php/stil/article/view/17784>. Acesso em: 14 set. 2025

KHURANA, Diksha et al. Natural language processing: state of the art, current trends and challenges. Multimedia Tools and Applications, v. 82, n. 3, p. 3713–3744, jan. 2023.

KIM, Hiun et al. Intent-based Product Collections for E-commerce using Pretrained Language Models. arXiv, , 15 out. 2021. Disponível em: <http://arxiv.org/abs/2110.08241>. Acesso em: 14 set. 2025

LECUN, Yann; BENGIO, Yoshua; HINTON, Geoffrey. Deep learning. Nature, v. 521, n. 7553, p. 436–444, 28 maio 2015.

PAN, Sinno Jialin; YANG, Qiang. A Survey on Transfer Learning. IEEE Transactions on Knowledge and Data Engineering, v. 22, n. 10, p. 1345–1359, out. 2010.

PEETERS, Ralph; BIZER, Christian. Supervised Contrastive Learning for Product Matching. In: WWW ’22: THE ACM WEB CONFERENCE 2022. Companion Proceedings of the Web Conference 2022. Virtual Event, Lyon France: ACM, 25 abr. 2022. Disponível em: <https://dl.acm.org/doi/10.1145/3487553.3524254>. Acesso em: 14 set. 2025

SCHMIDHUBER, Juergen. Deep Learning in Neural Networks: An Overview. Neural Networks, v. 61, p. 85–117, jan. 2015.

SPECIA, Lucia; RINO, Lucia Helena Machado. O desenvolvimento de um léxico para a geração de estruturas conceituais UNL. [S.l.: S.n.].

VASWANI, Ashish et al. Attention Is All You Need. arXiv, , 2 ago. 2023. Disponível em: <http://arxiv.org/abs/1706.03762>. Acesso em: 14 set. 2025

XIE, Yubo et al. Natural Language Processing with Commonsense Knowledge: A Survey. arXiv, , 13 set. 2024. Disponível em: <http://arxiv.org/abs/2108.04674>. Acesso em: 14 set. 2025

YULIANTON, Heribertus; CANDRA NOOR SANTI, Rina. Product Matching using Sentence-BERT: A Deep Learning Approach to E-Commerce Product Deduplication. Engineering and Technology Journal, v. 09, n. 12, 31 dez. 2024.

ZHANG, Han et al. Towards Personalized and Semantic Retrieval: An End-to-End Solution for E-commerce Search via Embedding Learning. arXiv, , 5 jun. 2020. Disponível em: <http://arxiv.org/abs/2006.02282>. Acesso em: 14 set. 2025

Published

2025-09-22

Issue

Section

Articles

How to Cite

DETECTION OF PURCHASE AND SERVICE INTENTIONS USING ARTIFICIAL INTELLIGENCE TECHNIQUES. (2025). ERR01, 10(4), e8325. https://doi.org/10.56238/ERR01v10n4-031