Sensitivity Analysis of Retrieval and Routing Parameters in Educational RAG Systems
Resumo
Sistemas de Geração Aumentada por Recuperação (RAG) dependem de parâmetros de recuperação e roteamento, em particular o número de trechos recuperados (k) e o limiar de ambiguidade do roteador multi-coleção (τ), que afetam a cobertura de respostas, a latência e a confiabilidade em aplicações educacionais. Apesar da crescente adoção de tutores baseados em RAG, poucos estudos analisam sistematicamente a sensibilidade desses parâmetros em domínios técnicos como Circuitos Lógicos. Este trabalho apresenta uma busca em grade fatorial completa sobre k ∈ {1, 3, 5} e τ ∈ {0,0; 0,3; 0,5}, resultando em nove configurações avaliadas em um benchmark de 45 questões. Os experimentos foram executados em hardware de consumo (RTX 4060 8 GB) com Qwen 2.5 7B via Ollama. Os resultados demonstram que k é o parâmetro dominante: incrementar k de 1 para 5 reduz a taxa de recusa pela metade (de 13,33% para 6,67%, com τ = 0,0), ao custo de penalidade de até 60% na latência (≈ 0,6 s por unidade de k). O limiar τ exerce efeito secundário, reduzindo recusas em valores baixos de k, mas tornando-se irrelevante em k = 5. A análise de Pareto identifica k = 3 e τ = 0,5 como configuração recomendada para chat síncrono, equilibrando 8,89–11,11% de recusa com latência inferior a 6 s.
Referências
Chen, J., Xiao, S., Zhang, P., Luo, K., Lian, D., and Liu, Z. (2024). BGE M3-embedding: Multi-lingual, multi-functionality, multi-granularity text embeddings through self-knowledge distillation. arXiv preprint arXiv:2402.03216.
Chroma AI (2024). ChromaDB: The AI-native open-source embedding database. [link]. Acesso em: 1 jun. 2026.
Conway, A., Dey, D., Hackmann, S., Hausknecht, M., Schmidt, M., Steadman, M., and Volynets, N. (2025). syftr: Pareto-optimal generative ai. International Conference on Automated Machine Learning (AutoML) / arXiv preprint arXiv:2505.20266.
Dong, C., Yuan, Y., Chen, K., Cheng, S., and Wen, C. (2025). How to build an adaptive AI tutor for any course using knowledge graph-enhanced retrieval-augmented generation (KG-RAG). In Proceedings of the 2025 14th International Conference on Educational and Information Technology (ICEIT), pages 152–157. IEEE.
Es, S., James, J., Espinosa-Anke, L., 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 (EACL) — System Demonstrations, pages 150–158.
Finardi, P., Avila, L., Castaldoni, R., Gengo, P., Larcher, C., Piau, M., Costa, P., and Caridá, V. (2024). The chronicles of RAG: The retriever, the chunk and the generator. arXiv preprint arXiv:2401.07883.
Gao, Y., Xiong, Y., Gao, X., Jia, K., Pan, J., Bi, Y., Dai, Y., Sun, J., Wang, M., and Wang, H. (2023). Retrieval-augmented generation for large language models: A survey. arXiv preprint arXiv:2312.10997.
Jain, M., Bhatt, T., Pitts, G., Pandya, A., Brusilovsky, P., Norouzi, N., Hellas, A., Leinonen, J., and Akram, B. (2026). Retrieval-augmented tutoring for algorithm tracing and problem-solving in AI education. arXiv preprint arXiv:2605.12988.
Levonian, Z., Li, C., Zhu, W., Gade, A., Henkel, O., Postle, M.-E., and Xing, W. (2023). Retrieval-augmented generation to improve math question-answering: Trade-offs between groundedness and human preference. arXiv preprint arXiv:2310.03184.
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., tau Yih, W., Rocktäschel, T., Riedel, S., and Kiela, D. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems (NeurIPS), volume 33, pages 9459–9474.
Lian, Y. (2025). Machine assistant with reliable knowledge: Enhancing student learning via RAG-based retrieval. arXiv preprint arXiv:2506.23026.
Lu, J. and Li, J. (2025). A novel framework for educational Q&A: Leveraging RAG and code interpreters for knowledge retrieval and logical computation. PLOS ONE, 20(12):e0337361.
Modran, H., Bogdan, I. C., Ursuţiu, D., Samoila, C., and Modran, P. L. (2024). LLM intelligent agent tutoring in higher education courses using a RAG approach. Preprints.
Nielsen, J. (1993). Usability Engineering. Academic Press.
Ollama Team (2024). Ollama: Get up and running with large language models. [link]. Acesso em: 1 jun. 2026.
Qwen Team (2025). Qwen2.5 technical report. Technical report, Alibaba Group.
Shi, W., Min, S., Yasunaga, M., Seo, M., James, R., Lewis, M., Zettlemoyer, L., and Yih, W.-t. (2024). REPLUG: Retrieval-augmented black-box language models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics (NAACL).
Taschetto, L. d. C. and Fileto, R. (2024). Using retrieval-augmented generation to improve performance of large language models on the brazilian university admission exam. In Anais do XXXIX Simpósio Brasileiro de Banco de Dados (SBBD), pages 799–805, Porto Alegre, RS, Brasil. Sociedade Brasileira de Computação.
Zhong, X., Jin, B., Ouyang, S., Shen, Y., Jin, Q., Fang, Y., Lu, Z., and Han, J. (2025). Benchmarking retrieval-augmented generation for chemistry. Proceedings of the Conference on Language Modeling (COLM) / arXiv preprint arXiv:2505.07671.
