Sistema de Perguntas e Respostas (QA System) com LLM e RAG: Estudo de Caso Aplicado à Educação Financeira
Resumo
A educação financeira é fundamental para a proteção e o crescimento patrimonial, mas a complexidade de seus conceitos frequentemente afasta o público iniciante. Levando isso em consideração, este trabalho propõe o desenvolvimento de um sistema de Perguntas e Respostas (QA) focado na democratização do conhecimento financeiro, utilizando Modelos de Linguagem de Grande Escala (LLMs) integrados a uma arquitetura de Geração Aumentada por Recuperação (RAG). A infraestrutura foi construída inteiramente com ferramentas de código aberto, apoiada por processos rigorosos de extração e preparação de dados (ETL). A validação quantitativa da proposta foi conduzida via framework automatizado RAGAS. Os resultados demonstraram a eficácia do sistema em mitigar alucinações, alcançando alta precisão na recuperação da informação (com métrica Context Recall superior a 0,99 para todos os modelos) e garantindo que as respostas geradas fossem estritamente fiéis às fontes confiáveis.
Referências
Abonizio, H., Almeida, T. S., Laitz, T., Junior, R. M., Bonás, G. K., Nogueira, R., and Pires, R. (2024). Sabi\’a-3 technical report. arXiv preprint arXiv:2410.12049.
Barbosa, L. S. (2024). Um chatbot especializado para o contexto da universidade federal de ouro preto.
Chaudhary, D., Vadlamani, S. L., Thomas, D., Nejati, S., and Sabetzadeh, M. (2024). Developing a llama-based chatbot for ci/cd question answering: A case study at ericsson.
deepset (2025). Haystack: The production-ready open source ai framework. [link]. Accessed on: 2025-06-18.
Es, S., James, J., Anke, L. E., and Schockaert, S. (2024). Ragas: Automated evaluation of retrieval augmented generation. In Proceedings of the 18th conference of the european chapter of the association for computational linguistics: system demonstrations, pages 150–158.
Guo, D., Yang, D., Zhang, H., Song, J., Wang, P., Zhu, Q., Xu, R., Zhang, R., Ma, S., Bi, X., et al. (2025). Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948.
Hilgert, M. A., Hogarth, J. M., and Beverly, S. G. (2003). Household financial management: The connection between knowledge and behavior. Fed. Res. Bull., 89:309.
infCapital (2023). infcapital/investopedia terms en · datasets at hugging face huggingface.co. [link]. [Accessed 10-03-2026].
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W.-t., Rocktäschel, T., et al. (2020). Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33:9459–9474.
Luintel, K. B. and Paudyal, K. (2006). Are common stocks a hedge against inflation? Journal of Financial Research, 29(1):1–19.
Lusardi, A. and Mitchell, O. S. (2007). Financial literacy and retirement planning: New evidence from the rand american life panel. Technical report, CFS working paper.
Ollama (2025). Ollama: Get up and running with large language models. [link]. Accessed on: 2025-06-18.
Ramjattan, R., Hosein, P., and Henry, N. (2021). Using chatbot technologies to help individuals make sound personalized financial decisions. In 2021 IEEE International Humanitarian Technology Conference (IHTC), pages 1–4.
Sam, K. (2024). Llama 3.1: An in-depth analysis of the next-generation large language model. Available at SSRN 6139407.
Streamlit (2026). Streamlit - a faster way to build and share data apps. [link]. [Accessed 28-03-2026].
Wang, J., Yi, X., Guo, R., Jin, H., Xu, P., Li, S., Wang, X., Guo, X., Li, C., Xu, X., et al. (2021). Milvus: A purpose-built vector data management system. In Proceedings of the 2021 international conference on management of data, pages 2614–2627.
Wang, W., Wei, F., Dong, L., Bao, H., Yang, N., and Zhou, M. (2020). Minilm: Deep self-attention distillation for task-agnostic compression of pre-trained transformers. Advances in neural information processing systems, 33:5776–5788.
Xiao, S., Liu, Z., Zhang, P., and Muennighoff, N. (2023). C-pack: Packaged resources to advance general chinese embedding.
Yang, A., Li, A., Yang, B., Zhang, B., Hui, B., Zheng, B., Yu, B., Gao, C., Huang, C., Lv, C., et al. (2025). Qwen3 technical report. arXiv preprint arXiv:2505.09388.
