A Comparative Study of Arabic Embedding Models in RAG-Based Fatwa Retrieval
摘要
The application of artificial intelligence to domain-specific textual analysis has opened new possibilities in natural language processing, particularly in the context of fatwas—authoritative Islamic legal opinions. This study presents a comparative evaluation of three language embedding models—Sentence Transformers, AraBERTv2, and MARBERT—within a Retrieval-Augmented Generation (RAG) framework powered by the Gemini Pro 1.5 model. A curated corpus of 285 texts, comprising fatwas, Qur’anic exegesis, and related jurisprudential writings, serves as the basis for evaluating semantic comprehension, retrieval accuracy, and generative performance. The findings demonstrate the superior performance of Arabic-specific models, with MARBERT and AraBERTv2 notably outperforming the multilingual Sentence Transformers in capturing the nuanced language and legal reasoning typical of fatwas. These results highlight the significance of culturally and linguistically specialized models in processing religious legal discourse. This study contributes to the growing field of Islamic legal informatics by illustrating both the capabilities and current limitations of AI-driven approaches in accessing and interpreting fatwa literature.