Towards a Self-Explainable Recommender System using Large Language Models and Knowledge Graphs

Resumo


Este artigo propõe uma abordagem inovadora para aprimorar sistemas de recomendação por meio da integração de Grafos de Conhecimento (Knowledge Graphs – KGs) e Modelos de Linguagem de Grande Escala (Large Language Models – LLMs), utilizando triplas no formato Resource Description Framework (RDF) e engenharia de prompts. O sistema aproveita o conhecimento estruturado dos KGs para fundamentar as recomendações geradas pelos LLMs com explicações interpretáveis. Avaliamos o sistema em três cenários: geração de recomendações de produtos para usuários individuais, identificação de candidatos a descontos promocionais e seleção de combinações ideais de produtos. Os resultados demonstram que o método proposto gera sugestões contextualmente relevantes, acompanhadas de justificativas claras e compreensíveis para seres humanos. Também discutimos os principais desafios enfrentados durante o desenvolvimento e apresentamos estratégias eficazes para superá-los. De modo geral, nossos achados destacam o potencial dos recomendadores explicáveis baseados em LLMs para superar os sistemas tradicionais em termos de eficácia e transparência.
Palavras-chave: Recommender Systems, Large Language Models, Knowledge Graphs, Prompt Engineering

Referências

Aggarwal, C. C. et al. (2016). Recommender systems, volume 1. Springer. Balloccu, G., Boratto, L., Fenu, G., Malloci, F. M., and Marras, M. (2024). Explainable recommender systems with knowledge graphs and language models. In European Conference on Information Retrieval, pages 352–357. Springer.

Giray, L. (2023). Prompt engineering with chatgpt: a guide for academic writers. Annals of biomedical engineering, 51(12):2629–2633.

Hogan, A., Blomqvist, E., Cochez, M., d’Amato, C., Melo, G. D., Gutierrez, C., Kirrane, S., Gayo, J. E. L., Navigli, R., Neumaier, S., et al. (2021). Knowledge graphs. ACM Computing Surveys (Csur), 54(4):1–37.

Ji, S., Pan, S., Cambria, E., Marttinen, P., and Philip, S. Y. (2021). A survey on knowledge graphs: Representation, acquisition, and applications. IEEE transactions on neural networks and learning systems, 33(2):494–514.

Lops, P., De Gemmis, M., and Semeraro, G. (2011). Content-based recommender systems: State of the art and trends. Recommender systems handbook, pages 73–105.

Nickel, M., Murphy, K., Tresp, V., and Gabrilovich, E. (2015). A review of relational machine learning for knowledge graphs. Proceedings of the IEEE, 104(1):11–33.

Pan, S., Luo, L., Wang, Y., Chen, C., Wang, J., and Wu, X. (2024). Unifying large language models and knowledge graphs: A roadmap. IEEE Transactions on Knowledge and Data Engineering.

Pascanu, R., Mikolov, T., and Bengio, Y. (2013). On the difficulty of training recurrent neural networks. In International conference on machine learning, pages 1310–1318. Pmlr.

Schafer, J. B., Frankowski, D., Herlocker, J., and Sen, S. (2007). Collaborative filtering recommender systems. In The adaptive web: methods and strategies of web personalization, pages 291–324. Springer.

Seabra, A., Cavalcante, C., Nepomuceno, J., Lago, L., Ruberg, N., and Lifschitz, S. (2024). Contrato360: uma aplicação de perguntas e respostas usando modelos de linguagem, documentos e bancos de dados. In Simpósio Brasileiro de Banco de Dados (SBBD), pages 155–166. SBC.

Shen, W., Wang, J., and Han, J. (2014). Entity linking with a knowledge base: Issues, techniques, and solutions. IEEE Transactions on Knowledge and Data Engineering, 27(2):443–460.

Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. Advances in neural information processing systems, 30.

Wang, M., Wang, M., Xu, X., Yang, L., Cai, D., and Yin, M. (2023). Unleashing chatgpt’s power: A case study on optimizing information retrieval in flipped classrooms via prompt engineering. IEEE Transactions on Learning Technologies.

Wang, X., He, X., Wang, M., Feng, F., and Chua, T.-S. (2019). Neural graph collaborative filtering. In Proceedings of the 42nd international ACM SIGIR conference on Research and development in Information Retrieval, pages 165–174.

White, J., Fu, Q., Hays, S., Sandborn, M., Olea, C., Gilbert, H., Elnashar, A., Spencer-Smith, J., and Schmidt, D. C. (2023). A prompt pattern catalog to enhance prompt engineering with chatgpt. arXiv preprint arXiv:2302.11382.

Zhang, S., Yao, L., Sun, A., and Tay, Y. (2019). Deep learning based recommender system: A survey and new perspectives. ACM computing surveys (CSUR), 52(1):1–38.
Publicado
29/09/2025
SEABRA, Antony; CAVALCANTE, Claudio; LIFSCHITZ, Sergio. Towards a Self-Explainable Recommender System using Large Language Models and Knowledge Graphs. In: LLMS, ANÁLISE DE GRAFOS E ONTOLOGIAS (LAGO) - SIMPÓSIO BRASILEIRO DE BANCO DE DADOS (SBBD), 40. , 2025, Fortaleza/CE. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2025 . p. 479-489. DOI: https://doi.org/10.5753/sbbd_estendido.2025.247783.