Methodology
How ShAIkhy retrieves, verifies, and presents Islamic sources.
Source corpus
- Quran: all 6,236 ayat indexed with Arabic + multiple English translations.
- Hadith: the full Kutub al-Sitta (Bukhari, Muslim, Abu Dawud, Tirmidhi, Nasa'i, Ibn Majah), Muwatta Malik, Musnad Ahmad — with grades from al-Albani, Shu'ayb al-Arna'ut, and Darussalam where available.
- Tafsir: Tabari, Ibn Kathir, Qurtubi, Razi, Sa'di, Jalalayn, Ibn 'Ashur, Alusi, and more.
- Fiqh: classical works from all four madhahib — Hanafi (Sarakhsi, Kasani, Marghinani, Ibn Abidin), Maliki (Khalil, Dusuqi, Ibn Rushd), Shafi'i (Nawawi, Ramli, Hytami), Hanbali (Ibn Qudamah, Buhuti).
- Rijal & biographies: Tahdhib al-Kamal (Mizzi), Siyar A'lam al-Nubala (Dhahabi), Tahdhib al-Tahdhib (Ibn Hajar).
- Seerah: Ibn Hisham, Zad al-Ma'ad (Ibn al-Qayyim).
Total: 440,000+ embedded passages across ~1,500 books.
Retrieval pipeline
- Query understanding: an LLM decomposes complex questions into focused sub-queries with source-type filters (Quran, hadith, fiqh, tafsir).
- Bilingual vector search: Qwen3-Embedding-8B vectors retrieve semantically related passages in both Arabic and English.
- Keyword search: in parallel, exact-match lookups for narrator names, hadith numbers, and technical terms.
- Knowledge graph expansion: 58K nodes covering hadith chains, scholar networks, and book metadata add neighbors the embedding wouldn't find.
- Reranking: Qwen3-Reranker-8B reorders the top candidates by claim-relevance.
- Evidence assessment: a second LLM pass identifies remaining gaps and issues follow-up searches.
Source trust hierarchy
- Tier 1: Quran, Sahih Bukhari, Sahih Muslim.
- Tier 2: rest of Kutub al-Sitta, Muwatta, Musnad Ahmad.
- Tier 3: tafsir, classical fiqh, aqeedah, biographical works.
- Tier 4: contemporary scholarly works, fatwa collections.
Higher-tier sources are surfaced first and cited preferentially.
Anti-hallucination guardrails
- Strict source grounding: every factual claim must include a
[Source N]citation tied to a retrieved passage. - Citation verification: post-generation pass that fails loud on any
[Source N]that doesn't resolve to a real chunk. - Quran text canonicalization: quoted ayat are matched against the canonical mushaf with high-threshold sequence similarity; corrections are flagged to the reader.
- Hadith grade preservation: weak (da'if) and fabricated (mawdu') hadith are always flagged with a visible warning.
Theological scope
ShAIkhy operates within Ahl as-Sunnah wa al-Jamaa (Sunni Islam) across the four madhahib (Hanafi, Maliki, Shafi'i, Hanbali) and the three Sunni aqeedah schools (Athari, Ash'ari, Maturidi). Non-Sunni positions surfaced from the corpus are labeled explicitly.
ShAIkhy does NOT issue takfir, declare individuals or sects deviant, or rule on personal life situations. For those, consult a qualified scholar who knows your full context.
Open source
The retrieval engine, data pipeline, citation verifier, and frontend are MIT-licensed. View the source on GitHub.