Skip to main content
Advances in AI Assistants for Enhancing
Qur'anic Understanding
Dr M Waleed Kadous
Qur'anic Computing Seminar Series 2025
Today's Agenda
1. The Story So Far: ansari.chat history
2. Deep Dive: New features in Ansari v3
3. Usage Analysis: How people actually use Ansari
4. The Future: MCP integration & educational tools
5. Conclusion: Lessons learned
Part 1: The Story So Far
Ansari Project
Started June 2023
Initially focused on building Ansari Chat
Ansari Chat started revealing new opportunities + challenges
Evaluation
Translation
Ansari Project Mission
Explore and expand the cutting edge of applications of AI to Islam
Motivation
Muslims have a "first condemn, then embrace" history with tech. What if we
break the cycle?
Goal is not numbers (though you need some to learn). Goal is pushing the limit.
Open source development, enable others to use
ansari.chat 1
October '23
System prompt optimized to ensure accuracy + tone
Anonymous, ephemeral chat
Multi-lingual support
ansari.chat 2
October 2024
RAG over Islamic sources
Qur'an, Hadith, Fiqh
Fiqh Encyc: 18,000 pages
Accounts (incl Guest)
Saved conversations
Feedback + Sharing
Ansari v2 Architecture
Favorite uses
Islamize the story of the Boy who Cried Wolf
Write 10 trivia questions about Ramadan
Does swallowing spit void your fasting?
Write me a khutbah about sabr
Morphologically analyze ā€«Ų£ŲŖŲ³ŲŖŲØŲÆŁ„ŁˆŁ†ā€¬
I'm here at Marwa. What dua should I make?
Translate "Don't waste water" into ...
Insights and thoughts
To have a mature discussion about new technology and how we as Muslims
should interact with it, we need concrete examples of cutting edge Muslim apps
Feel that the openness of Ansari has helped:
No issues with trust
Everyone can read the source
Volunteers step up (sometimes amazing)
Part 2: Deep Dive into Ansari 3 Features
Demo
Multi-Platform Availability
Ansari v3: Available everywhere you need it
Web: ansari.chat
WhatsApp: +1 650 656 3971
Android: Google Play Store
iOS: Apple App Store
Chat history preserved when logged in (Web, iOS, Android)
Reduced Hallucinations
Claude 4 Sonnet + RAG system provides more accurate responses
Upgraded from GPT-4o to Claude 4 Sonnet
Enhanced RAG (Retrieval-Augmented Generation)
Added Encyclopedia of Tafseer bil mathoor to existing Quran, Hadith and Fiqh
Search
More grounded, reliable answers
Better integration with Islamic sources
Added Citations
Clear sources for verification
New citation system for all Islamic references
Provides exact Quran verse numbers
Includes complete Hadith source details
Links to original texts when available
65% of answers now include citations so you can check for yourself
Tafsir Encyclopedia Integration
Access to detailed Quranic interpretations
Collaboration with Usul.ai team
Comprehensive tafsir database
Enhanced Quranic commentary access
Deeper scriptural understanding
Mobile Apps Launched
Native mobile apps required major rewrite
Launched iOS and Android apps
React Native framework implementation
Considerable codebase restructuring
Unified experience across platforms
Sync conversations across devices
BATIK Validation Dataset
Broad Automated Test of Islamic Knowledge
100 multiple-choice questions from real user queries
Systematic testing across Islamic topics
Transparent, reproducible evaluation
Try it for yourself! https://walee.dk/batik
BATIK Results
G
P
T
-
3
.
5
G
P
T
-
4
A
n
s
a
r
i
v
2
A
n
s
a
r
i
v
3
model
0
10
20
30
40
50
60
70
80
90
100
a
c
c
u
r
a
c
y
BATIKAccuracyComparison(%)
Conversation Sharing
Share knowledge with the community
One-click sharing of beneficial conversations
Shareable links for social media & messaging apps
Share interesting answers with friends and family
Help others benefit from your questions
User Feedback System
New feedback mechanism for continuous improvement
Thumbs up/down buttons on every response
Optional comment field for detailed feedback
Already collected 885 responses for analysis
Technical Infrastructure
Behind-the-scenes improvements
MongoDB Implementation: Better complex messaging handling
Enhanced Search Tools: Tafsir Encyclopedia integration
Improved CI/CD Pipeline: Faster, more reliable releases
Containerized Infrastructure: Docker for consistent environments
Part 3: How Ansari is Used
Analysis Methodology
Comparing two data samples
Ansari 2 (July - November 2023)
Sample period: ~3.5 months
~900 total threads analyzed
Baseline performance metrics
Ansari 3 (May - August 2025)
Sample period: 3 months
22,081 threads analyzed
99.86% coverage rate
Usage Growth
A
n
s
a
r
i
2
A
n
s
a
r
i
3
version
0
20
40
60
80
100
120
140
160
180
200
220
240
260
d
a
i
l
y
_
t
h
r
e
a
d
s
DailyThreadVolume:Ansari2vsAnsari3
Citation Usage
W
i
t
h
C
i
t
a
t
i
o
n
s
W
i
t
h
o
u
t
C
i
t
a
t
i
o
n
s
category
0
5
10
15
20
25
30
35
40
45
50
55
60
65
p
e
r
c
e
n
t
a
g
e
QuerieswithIslamicSourceCitations(%)
Tool Usage Patterns
Q
u
r
a
n
S
e
a
r
c
h
H
a
d
i
t
h
S
e
a
r
c
h
I
s
l
a
m
i
c
E
n
c
y
c
l
o
p
e
d
i
a
T
a
f
s
i
r
C
o
m
m
e
n
t
a
r
y
0
5
10
15
20
25
30
35
40
45
50
55
p
e
r
c
e
n
t
_
t
h
r
e
a
d
s
ToolUsage(%ofthreadsusingeachtool)
What Do People Ask About?
Complete topic distribution from 22,081 analyzed threads
1. Fiqh (Islamic Law): 40.4% (8,921 threads)
"Is it permissible to pray with alcohol-based sanitizer?"
2. Islamic Life & Thought: 23.9% (5,283 threads)
"How do I balance deen and dunya in modern life?"
3. Quran: 8.5% (1,875 threads)
"What does Allah say about patience in the Quran?"
4. Other (Non-Islamic): 8.0% (1,766 threads)
Technical support, feedback, general questions
5. Hadith: 6.5% (1,433 threads)
"Is there a hadith about seeking knowledge?"
Topic Distribution
F
i
q
h
I
s
l
a
m
i
c
L
i
f
e
Q
u
r
a
n
O
t
h
e
r
H
a
d
i
t
h
H
i
s
t
o
r
y
D
u
a
A
r
a
b
i
c
C
o
n
s
o
l
a
t
i
o
n
K
h
u
t
b
a
h
topic
0
5
10
15
20
25
30
35
40
45
p
e
r
c
e
n
t
a
g
e
TopicDistribution-AllCategories(%)
Deep Dive: Quran Topics
Breakdown of Quran category (1,875 threads = 8.5% of total)
Detailed subcategory analysis:
Verse Inquiry: 510 threads (27.2%)
"What verses talk about patience?"
Tafsir Request: 397 threads (21.2%)
"Explain the meaning of Surah Al-Fatiha"
General Quran Question: 303 threads (16.2%)
"How was the Quran preserved?"
Memorization Support: 196 threads (10.5%)
"Tips for memorizing Juz Amma"
Recitation & Tajweed: 185 threads (9.9%)
Quran Subcategories
V
e
r
s
e
I
n
q
u
i
r
y
T
a
f
s
i
r
G
e
n
e
r
a
l
Q
M
e
m
o
r
i
z
a
t
i
o
n
R
e
c
i
t
a
t
i
o
n
T
r
a
n
s
l
a
t
i
o
n
E
d
u
c
a
t
i
o
n
a
l
subcategory
0
2
4
6
8
10
12
14
16
18
20
22
24
26
28
p
e
r
c
e
n
t
a
g
e
QuranQueryTypes(%of1,875threads)
Language Distribution
E
n
g
l
i
s
h
A
r
a
b
i
c
U
r
d
u
I
n
d
o
n
e
s
i
a
n
M
i
x
e
d
O
t
h
e
r
language
0
10
20
30
40
50
60
70
80
p
e
r
c
e
n
t
a
g
e
LanguagesUsed(43totallanguages)
User Feedback
Strong positive response from users
885 feedback responses collected
83.9% positive (thumbs up)
16.1% negative (thumbs down)
Users particularly appreciate sourced answers
Feedback Analysis
P
o
s
i
t
i
v
e
(
šŸ‘
)
N
e
g
a
t
i
v
e
(
šŸ‘Ž
)
feedback
0
10
20
30
40
50
60
70
80
90
p
e
r
c
e
n
t
a
g
e
UserSatisfactionRate(%)
Key Insights from Feedback
What drives user satisfaction
1. High Satisfaction Base: 84% positive feedback indicates strong core service
2. Clarity is King: 61.8% of comments mention clarity - users prioritize
understandable answers
3. Accuracy Matters: "Correct" and "incorrect" combined appear in 86 comments
Users value clear, accurate answers with authentic sources
Part 4: The Future
Live demos ahead - you're among the first to see these
MCP Integration
Retention an issue?
Looks like it.
Only 10% of full users use us weekly.
Retention dropping over time
MCP might help us get out of it.
What is MCP?
Model Context Protocol - AI's app ecosystem
MCP is a way of extending AI functionality, like apps extend phones
Host applications (Claude Desktop, Claude Code) talk to MCP servers
Open standard - different hosts can use same servers
Thousands of MCP servers now available
Examples: Google Maps, Slack, Memory, Puppeteer, EverArt
We're seeing the emergence of the AI ecosystem
Islam and Education
Multiplier Effect
Example: Tanyalah Ustaz
Inspired by Ansari • Serving Malaysian Muslims • More comprehensive sources
From a Seed, A Forest
The goal was never to build a single tree, but to plant a seed that could grow a forest
The Seed: Ansari as an open-source foundation
Shared code, shared knowledge, shared vision
The First Shoots: New projects emerging
Tanyalah Ustaz (Malaysia), and others beginning to appear
Each adapting to their local needs and languages
The Forest: Our true legacy
Even if Ansari disappears tomorrow, the ecosystem lives on
Each new project plants its own seeds
The ideas propagate beyond any single implementation
Part 5: Conclusion
Introduced many new features in Ansari 3
Seen 8x uptick in usage in ~2 years
Clearly a community demand for authentic Islamic AI
Clear desire for AI-assisted Islamic learning
Using MCP, Ansari will be available in other AI systems
Ansari will move in the direction of education
In sha Allah, Ansari inspires others to build AI for the Ummah (need your dua)
Thank You
It takes a village
Ansari builds on a lot of others' support
Core volunteers: Amr Mohammad (v3 lead), Abdullah Nahhas, Ashraf Ody
Amin Ahmad: RAG support, great LLM advice
Iman Sadreddin: Quran Foundation + testing
Dr Sohaib Saeed: Help on translation quality
Anas Abou-Allaban: Inspiration
Abdellatif Abdelfattah (Usul.ai): Tafsir Encyclopedia integration
kalimat.dev for Quran and Hadith Search
Kuwaiti awqaf for fiqh encyclopedia
Gradio for early interfaces
Many, many more ...
Questions & Discussion
Website: ansari.chat
GitHub: github.com/ansari-project/ansari-backend
Contact: hi@walee.dk
Thank You | ā€«Ł‹Ų§ā€¬ā€«Ų±ā€¬ā€«Ų“Łƒā€¬
ā€«ŁŁŠŁƒŁ…ā€¬ ‫اهلل‬ ā€«ŲØŲ§Ų±Łƒā€¬