The Knowledge Base: What's Inside, How It's Built, and Why These Sources
A complete account of the 32+ scholarly works that power 3arif.ai — the selection criteria, storage architecture, and what's coming next.
What the Knowledge Base Contains
3arif.ai draws from 32+ authenticated scholarly works spanning 14 centuries of Islamic intellectual tradition, with new sources being added continuously. As of June 2026, the knowledge base holds:
| Category | Works | Passages | |----------|-------|----------| | Quran | 1 | 6,236 verses | | Tafsīr (Quranic commentary) | 15 | 82,000+ passages | | Ḥadīth (prophetic narrations) | 10 | 56,602+ narrations | | Primary Texts (theology, spirituality) | 4 | 16,784 passages | | Law / Sharīʿa | 3+ | 5,000+ passages | | History & Sīra | 2+ | growing | | Total | 32+ | 227,000+ |
Unlike most Islamic AI tools that draw from a single source or use unverified internet text, every passage in the 3arif.ai knowledge base has a known author, a publication date, and a scholarly tradition. Nothing is scraped from Wikipedia or anonymous websites.
The Quran — The Primary Source
Everything begins with the Quran. The text is sourced from Tanzil.net, the most rigorously verified digital Arabic Quran corpus, using the Hafs ʿan ʿĀṣim recitation. Each of the 6,236 verses is stored with:
- The full Arabic text (Uthmanic script)
- The Sahih International English translation
- Surah and verse coordinates for precise citation
Every response that draws on the Quran cites the verse directly — `[Q 2:255]` — and the frontend renders the Arabic text alongside the translation.
The Tafsīr Library — 14 Works
Tafsīr is the discipline of Quranic exegesis. We have deliberately selected works that represent the full breadth of the tradition:
Classical Sunnī Tafsīrs (English)
Tafsīr Ibn Kathīr (c. 774 AH / 1373 CE) — The most widely studied Sunnī tafsīr. Ibn Kathīr explains the Quran primarily through authenticated ḥadīth and companion narrations. 16,194 passages.
Al-Jalālayn (911 AH / 1505 CE) — Completed by Al-Suyūṭī after Al-Maḥallī's death. Celebrated for its conciseness and linguistic precision. 4,166 passages.
Tafsīr al-Qurṭubī (671 AH / 1272 CE) — The definitive reference for legal rulings derived from the Quran. Essential for the Mālikī tradition. 6,831 passages.
Maalim al-Tanzīl / Al-Baghawī (516 AH / 1122 CE) — A reliable and balanced Sunnī commentary, praised for its sound narrations. Complete 6-volume text. 9,288 passages total.
Classical Arabic Tafsīrs
Jāmiʿ al-Bayān / Al-Ṭabarī (310 AH / 923 CE) — The oldest surviving comprehensive tafsīr. The foundation upon which all later tafsīrs were built. In Arabic. 1,420 passages.
Mafātīḥ al-Ghayb / Al-Rāzī (606 AH / 1210 CE) — The most encyclopaedic classical tafsīr, integrating philosophy, theology, and natural science. 8 volumes, 12,323 passages in Arabic.
Al-Kashshāf / Al-Zamakhsharī (538 AH / 1144 CE) — Peerless in Arabic linguistic depth. Essential for understanding the rhetorical excellence of the Quran. Arabic. 1,244 passages.
Al-Durr al-Manthūr / Al-Suyūṭī (911 AH / 1505 CE) — A vast compilation of narration-based tafsīr with no authorial opinion — pure transmission. Arabic. 912 passages.
Lubāb al-Taʾwīl / Al-Khāzin (741 AH / 1341 CE) — An accessible Sunnī commentary drawing on Al-Baghawī's methodology. Arabic. 1,539 passages.
Zad al-Masīr / Ibn al-Jawzī (597 AH / 1201 CE) — A condensed Ḥanbalī tafsīr surveying all major scholarly views on each verse. Arabic. 7,196 passages.
Laṭāʾif al-Ishārāt / Al-Qushayrī (465 AH / 1072 CE) — A landmark of esoteric tafsīr, revealing the spiritual interior of each verse. Arabic. 1,864 passages.
Modern Scholarship
The Study Quran (2015 CE) — A landmark modern English commentary produced by 28 contributing scholars from across the Sunnī, Shīʿī, and traditional Islamic spectrum, edited by Seyyed Hossein Nasr. 12,606 passages.
Al-Mīzān fī Tafsīr al-Qurʾān / Ṭabāṭabāʾī (1964–1972 CE) — The most comprehensive modern Shīʿī tafsīr in 20 Arabic volumes. Interprets the Quran through the Quran itself (al-Qurʾān yufassiru baʿḍuhu baʿḍan). 2,849 passages (English translation, 13 volumes).
Why These Tafsīrs Specifically?
The selection follows three principles:
- Authority — Every work is recognised as authoritative within its tradition. No fringe or disputed commentaries.
- Coverage — The set spans different methodologies: narration-based (Ṭabarī, Ibn Kathīr), legal (Qurṭubī), linguistic (Zamakhsharī), philosophical (Rāzī), esoteric (Qushayrī), modern synthesis (Study Quran, Mīzān).
- Verifiability — Sources must be traceable. The model cites chapter, volume, and verse so any claim can be verified in the original.
The Ḥadīth Collections — 9 Works
The Sunnī Canonical Six
- Ṣaḥīḥ al-Bukhārī (256 AH / 870 CE) — 7,580 narrations, all graded Ṣaḥīḥ by consensus. The gold standard of ḥadīth authentication.
- Ṣaḥīḥ Muslim (261 AH / 875 CE) — 7,360 narrations, all Ṣaḥīḥ. Renowned for its superior chain verification.
- Sunan al-Nasāʾī (303 AH / 915 CE) — 5,679 narrations. The most critically rigorous of the six canonical books.
- Sunan Abū Dāwūd (275 AH / 889 CE) — 5,272 narrations. Specialises in legal rulings from prophetic practice.
- Sunan Ibn Mājah (273 AH / 887 CE) — 4,340 narrations. Contains unique narrations absent from the other five.
- Sunan al-Tirmidhī (279 AH / 892 CE) — 3,926 narrations. Unique for including the compiler's own grading on each narration.
The Mālikī Foundation
- Al-Muwaṭṭaʾ / Mālik ibn Anas (179 AH / 795 CE) — 1,818 narrations. The oldest surviving ḥadīth collection, compiled in Medina.
From the Jaʿfarī Tradition
- Al-Kāfī / Al-Kulaynī (329 AH / 941 CE) — 14,245 narrations. The most comprehensive collection of narrations from the Prophet and the Imāms.
- Man Lā Yaḥḍuruhu al-Faqīh / Al-Ṣadūq (381 AH / 991 CE) — 6,382 narrations. A foundational legal ḥadīth collection organised by topic.
Each ḥadīth is stored with its full matn (body text), Arabic text, narrator chain (isnād), and grade — enabling the interactive isnād tooltip you see in responses.
How It's Stored: The Technical Architecture
Text Extraction
- English sources — downloaded as plain text from archive.org (djvu.txt files), cleaned and chunked
- Arabic sources — same pipeline; Voyage AI's multilingual embedding handles Arabic natively
- Al-Mīzān — user-provided PDFs extracted with pdfplumber
- Ḥadīth (Sunnī) — downloaded from fawazahmed0/hadith-api GitHub repository as structured JSON
- Ḥadīth (Jaʿfarī) — fetched from ThaqalaynAPI REST endpoint
Chunking
Each source is split into overlapping chunks of ~800 characters with 100-character overlap. This preserves semantic context across chunk boundaries. The Quran stores one verse per chunk. Ḥadīth stores one narration per chunk.
Embedding
All text is embedded using Voyage AI's `voyage-multilingual-2` model (1024 dimensions). This model places Arabic and English text in the same semantic vector space — so a query in English retrieves relevant Arabic-language tafsīr passages.
Storage
- PostgreSQL (Neon) — chunk metadata, source registry, ḥadīth records with isnād and grade
- Qdrant Cloud — vector embeddings, indexed by `source_slug` for fast filtered retrieval
New Categories Added
As of June 2026, the knowledge base has expanded beyond Quran and ḥadīth into three new scholarly categories:
Primary Texts — theological and spiritual masterworks studied in their own right:
- Nahjul Balagha (Imam Ali's sermons and letters) — 11,170 passages
- Ihyā ʿUlūm al-Dīn / Al-Ghazālī — 4,832 passages
- Al-Ṣaḥīfa al-Sajjādiyya — 541 passages
- Al-ʿAqīda al-Ṭaḥāwiyya — 241 passages
Law (Sharīʿa) — foundational jurisprudential texts:
- Al-Risāla / Imam al-Shāfiʿī — 1,085 passages
- Bidāyat al-Mujtahid / Ibn Rushd (Averroes) — in progress
- Islamic Laws (Tawḍīḥ al-Masāʾil) / Sayyid al-Sīstānī — in progress
History & Sīra — biographical and historiographical sources:
- Tārīkh al-Ṭabarī — 40 volumes of English translation — in progress
- Sīrat Rasūl Allāh / Ibn Isḥāq (Guillaume translation) — in progress
What's Still Pending
Tafsīr — the following Arabic tafsīrs were identified in our original 40-work plan but still need alternate sources or processing:
- Tafsīr al-Bayḍāwī, Tafsīr Muqātil ibn Sulaymān, Rūḥ al-Bayān, Majmaʿ al-Bayān, Al-Tashīl
Ḥadīth — two Jaʿfarī collections not yet in ThaqalaynAPI:
- Tahdhīb al-Aḥkām / Al-Ṭūsī
- Al-Istiṣbār / Al-Ṭūsī
Modern Law — requiring specialist sourcing:
- AAOIFI Sharīʿah Standards (Islamic finance) — behind commercial paywall
- Taqi Usmani contemporary fatwās — no complete free digital text
The long-term goal: 200,000+ passages across 50+ works — covering every major tradition of Islamic scholarship, in both Arabic and English, accessible to any question you ask.
Want to suggest a source? Use the request form on the homepage.