Avaliação do Impacto de Diferentes Padrões Arquiteturais RAG em Domínios Jurídicos
Resumo
Este estudo avalia o impacto de diferentes arquiteturas de Retrieval-Augmented Generation (RAG) no contexto jurídico, com foco na precisão e relevância das respostas em sistemas de perguntas e respostas (Q&A). Foram investigadas variações em estratégias de manipulação de consultas, recuperação de documentos e verificações de relevância, analisando como essas influenciam a qualidade das respostas para consultas jurídicas. Diversas arquiteturas RAG foram implementadas, junto a um módulo sintetizador e um módulo avaliador para comparar a eficiência dos padrões. Os resultados indicam que o desempenho das arquiteturas RAG varia significativamente de acordo com o tipo de consulta jurídica e a compreensão dessas dinâmicas é essencial para otimizações em sistemas de Q&A no domínio jurídico.
Palavras-chave:
RAG, arquiteturas, domínio jurídico, sistemas Q&A, recuperação de informação
Referências
Asai, A., Wu, Z., Wang, Y., Sil, A., and Hajishirzi, H. (2023). Self-rag: Learning to retrieve, generate, and critique through self-reflection. arXiv.
Es, S., James, J., Espinosa-Anke, L., and Schockaert, S. (2023). Ragas: Automated evaluation of retrieval augmented generation. arXiv.
Fan, Wenqi, Ding, Yujuan, Ning, Liangbo, Wang, Shijie, Li, Hengyun, Yin, Dawei, Chua, Tat-Seng, Li, and Qing (2024). A survey on rag meeting llms: Towards retrieval-augmented large language models. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 6491–6501.
Gao, L., Ma, X., Lin, J., and Callan, J. (2022). Hprecise zero-shot dense retrieval without relevance labels. arXiv.
Jagerman, R., Zhuang, H., Qin, Z., Wang, X., and Bendersky, M. (2023). Query expansion by prompting large language models. arXiv.
Krasadakis, Panteleimon, Sakkopoulos, Evangelos, Verykios, and S, V. (2024). A survey on challenges and advances in natural language processing with a focus on legal informatics and low-resource languages. Electronics, 13(3):648.
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. arXiv.
Ma, X., Gong, Y., He, P., Zhao, H., and Duan, N. (2023). Query rewriting for retrieval-augmented large language models. arXiv.
Rackauckas, Z. (2024). Rag-fusion: a new take on retrieval-augmented generation. arXiv.
Saad-Falcon, Jon, Khattab, Omar, Potts, Christopher, Zaharia, and Matei (2023). ARES: An automated evaluation framework for retrieval-augmented generation systems. arXiv preprint arXiv:2311.09476.
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q., and Zhou, D. (2022). Chain-of-thought prompting elicits reasoning in large language models. arXiv.
Wiratunga, Nirmalie, Abeyratne, Ramitha, Jayawardena, Lasal, Martin, Kyle, Massie, Stewart, Nkisi-Orji, Ikechukwu, Weerasinghe, Ruvan, Liret, Anne, Fleisch, and Bruno (2024). Cbr-rag: Case-based reasoning for retrieval augmented generation in llms for legal question answering. In International Conference on Case-Based Reasoning, pages 445–460. Springer.
Yan, S.-Q., Gu, J.-C., Zhu, Y., and Ling, Z.-H. (2024). Corrective retrieval augmented generation. arXiv.
Zhou, P., Pujara, J., Ren, X., Chen, X., Cheng, H.-T., Le, Q. V., Chi, E. H., Zhou, D., Mishra, S., and Zheng, H. S. (2024). Self-discover: Large language models self-compose reasoning structures. arXiv preprint arXiv:2402.03620.
Es, S., James, J., Espinosa-Anke, L., and Schockaert, S. (2023). Ragas: Automated evaluation of retrieval augmented generation. arXiv.
Fan, Wenqi, Ding, Yujuan, Ning, Liangbo, Wang, Shijie, Li, Hengyun, Yin, Dawei, Chua, Tat-Seng, Li, and Qing (2024). A survey on rag meeting llms: Towards retrieval-augmented large language models. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 6491–6501.
Gao, L., Ma, X., Lin, J., and Callan, J. (2022). Hprecise zero-shot dense retrieval without relevance labels. arXiv.
Jagerman, R., Zhuang, H., Qin, Z., Wang, X., and Bendersky, M. (2023). Query expansion by prompting large language models. arXiv.
Krasadakis, Panteleimon, Sakkopoulos, Evangelos, Verykios, and S, V. (2024). A survey on challenges and advances in natural language processing with a focus on legal informatics and low-resource languages. Electronics, 13(3):648.
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. arXiv.
Ma, X., Gong, Y., He, P., Zhao, H., and Duan, N. (2023). Query rewriting for retrieval-augmented large language models. arXiv.
Rackauckas, Z. (2024). Rag-fusion: a new take on retrieval-augmented generation. arXiv.
Saad-Falcon, Jon, Khattab, Omar, Potts, Christopher, Zaharia, and Matei (2023). ARES: An automated evaluation framework for retrieval-augmented generation systems. arXiv preprint arXiv:2311.09476.
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q., and Zhou, D. (2022). Chain-of-thought prompting elicits reasoning in large language models. arXiv.
Wiratunga, Nirmalie, Abeyratne, Ramitha, Jayawardena, Lasal, Martin, Kyle, Massie, Stewart, Nkisi-Orji, Ikechukwu, Weerasinghe, Ruvan, Liret, Anne, Fleisch, and Bruno (2024). Cbr-rag: Case-based reasoning for retrieval augmented generation in llms for legal question answering. In International Conference on Case-Based Reasoning, pages 445–460. Springer.
Yan, S.-Q., Gu, J.-C., Zhu, Y., and Ling, Z.-H. (2024). Corrective retrieval augmented generation. arXiv.
Zhou, P., Pujara, J., Ren, X., Chen, X., Cheng, H.-T., Le, Q. V., Chi, E. H., Zhou, D., Mishra, S., and Zheng, H. S. (2024). Self-discover: Large language models self-compose reasoning structures. arXiv preprint arXiv:2402.03620.
Publicado
05/12/2024
Como Citar
PARANHOS, Salvador Ludovico; TOMAZINI, Jonatas Novais; CAMILO JUNIOR, Celso Goncalves; TELES DE OLIVEIRA, Savio Salvarino.
Avaliação do Impacto de Diferentes Padrões Arquiteturais RAG em Domínios Jurídicos. In: ESCOLA REGIONAL DE INFORMÁTICA DE GOIÁS (ERI-GO), 12. , 2024, Ceres/GO.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2024
.
p. 99-108.
DOI: https://doi.org/10.5753/erigo.2024.4846.