Dr Waleed Kadous is a Muslim artificial intelligence engineer based in California, USA. He is a leading expert on Islam and AI and currently works for the graphic design platform Canva. His career includes work at tech companies like Anyscale, Uber and Google. MAHMOOD SANGLAY reports on a pioneering paper presented by Dr Kadous at a recent AI conference.
On August 3 Dr Kadous presented a groundbreaking paper at the virtual Quran and AI Conference. The International Quran Research Association (IQRA) hosted the conference, themed ‘Artificial Intelligence and the Quran: Challenges and Opportunities’.
Dr Kadous’s presentation delved into the practical applications and implications of AI technologies in Islamic scholarship, with a focus on his project Ansari.chat, an Islamic assistant based on cutting-edge AI.
Dr Kadous began his presentation by highlighting the real-world applicability of Quranic AI technologies, contrasting theoretical discussions with tangible advancements. His project, Ansari.chat, is accessible on the web and aims to build an Islamic assistant leveraging the latest AI technologies.
Practical applications of AI in Islamic scholarship
Dr Kadous emphasised that AI is no longer a theoretical prospect but a practical reality. He demonstrated Ansari.chat’s capabilities, showcasing its ability to answer complex questions on Islam, provide tafsir of the Quran and assist with Arabic morphology. The system, despite its high operational costs, is accessible as an open source platform and can significantly aid in Islamic learning and scholarship.
He provided a live demonstration of Ansari.chat, showing its simple interface and conversational capabilities. Users can ask questions such as ‘What are the five pillars of Islam?’ or ‘How many times is coral mentioned in the Quran?’ and receive accurate responses. Ansari.chat can distinguish between different contexts, such as literal and metaphorical uses of words, demonstrating its nuanced understanding of the Quran.
Advanced linguistic capabilities
One of Ansari.chat’s remarkable features is its proficiency in Arabic morphology. Dr Kadous illustrated this by dissecting complex words like ‘atastabdiluna,’ (in sura Al Baqara, 2:61) explaining its root word ‘badala’ and its morphological structure. This ability to break down and analyse linguistic elements is crucial for deep Quranic study.
Moreover, Ansari.chat excels in providing multiple tafsir (interpretations) from classical and contemporary scholars. Users can inquire about specific verses and receive comprehensive insights from sources like Ibn Kathir, Tabari, Qurtubi and more contemporary scholars of the Quran. This feature democratises access to Islamic knowledge, making it easier for Muslims worldwide to understand the Quran.
Translation and multilinguality
Dr Kadous highlighted the AI’ model’s translation and multilingual capabilities. Ansari.chat can translate Quranic verses into multiple languages while preserving the nuances of the original text. For example, it explains the exclusivity implied in ‘iyya kana’budu wa iyyaka nasta’in’ of sura Al Fatiha by detailing the grammatical structure of the verse.
Ansari.chat can also adapt its responses for different age groups, making graded Quranic education more accessible. Dr Kadous demonstrated how the AI model could simplify sura Yusuf for a seven-year-old or create a poem based on the sura to enhance readability. This adaptability is a testament to its educational potential.
Addressing controversial issues
While showcasing the Ansari.chat capabilities, Dr Kadous acknowledged the risks of controversial issues. He cited examples where it needed clarification on different narratives, such as the story of Yusuf’s coat in the Jewish tradition. By providing context and additional information, the Ansari.chat can clarify such matters, minimising misunderstandings.
Dr Kadous also pointed out the occasional mistakes the AI model can make. For instance, when asked about a du’a for travel, Ansari.chat initially missed a Quranic reference, but corrected itself when provided with a hint. This ability to refine its responses based on user input underscores the its potential for continuous improvement.
Risks and mitigations
Dr Kadous addressed the challenges of bias, hallucination and deliberate misinformation in AI systems. He presented an example of an early AI model from Databricks that made erroneous statements about Islam, illustrating the risks of bias. He also discussed how AIs could hallucinate or generate false information, posing significant risks to Islamic scholarship.
To mitigate these risks, Dr Kadous emphasised the importance of defining the AI’s character and constraining its responses to authentic sources. Ansari.chat, being an open-source project, allows contributions from the community to enhance its accuracy and reliability. The AI’s architecture includes multiple tools for searching Quranic and Hadith sources, reducing errors and biases.
Opportunities and challenges
Dr Kadous concluded by highlighting the immense opportunities AI presents for Quranic studies. From enhancing understanding and facilitating translations to providing accessible education, the potential benefits are vast. However, he stressed the need to balance these opportunities with the challenges of bias and misinformation.
The creation of AIs with a defined Islamic identity that adhere to authentic sources is crucial. Dr Kadous called for the application of Islamic principles, such as Umoom Al Balwa[1], to navigate the ethical complexities of AI in Islamic scholarship.
In a rapidly evolving digital landscape, Dr Kadous’s presentation at the Quran and AI Conference underscored the transformative potential of AI in understanding and disseminating Quranic knowledge. As Muslims worldwide increasingly interact with AI technologies, initiatives like Ansari.chat offer a promising glimpse into the future of Islamic scholarship.
Further information on Dr Kadous’s presentation may be obtained from the IQRA website at https://iqra.study/ai-and-the-quran-conference-2024/.
[1] According Ansari.chat Umoom Al Balwa means:
Umoom Al-Balwa (عموم البلوى) is an Islamic jurisprudential concept that refers to a widespread affliction or a common difficulty that affects a large number of people, making it difficult to avoid. This concept is used by scholars to provide ease and facilitate the practice of Islam in situations where strict adherence to certain rules would cause undue hardship or be impractical due to the widespread nature of the issue.