How This Tafseer Was Made
Every verse of the Qur'an, all 6,236, received an individual commentary written, verified, and peer-reviewed by a fleet of AI language models running across three personal machines and one cloud API, coordinated by an autonomous orchestration system. This page documents the machinery, the methodology, and the safeguards, in the spirit of full transparency.
The Grounding Principle
The project's central engineering lesson: language models must not be trusted to recall facts, they must be handed them. Every verse task was grounded in verified sources fetched or stored locally before the model wrote a word:
- Canonical Arabic, the Uthmani text (all 6,236 verses, verified counts) is inserted into each commentary by code, never reproduced from model memory.
- Translation, Saheeh International, per verse.
- Classical commentary, Ibn Kathir (Abridged, English) fetched per-ayah, plus authoritative word-by-word morphology, injected into every writing task.
- Hadith verification, an offline corpus of six major collections (Bukhari, Muslim, Tirmidhi, Abu Dawud, Nasa'i, Ibn Majah, ~34,500 hadith). Every citation in every verse is mechanically checked against it; a citation that cannot be verified is grounds for rejection. The pipeline explicitly rewards writing “no authentic report exists” over inventing one.
Quality Gates & Adversarial Review
A verse survives only after passing, in order:
- Mechanical gates, exact canonical Arabic present, all six required sections (Verse, Word by Word, Context of Revelation, Commentary, Cross-References, Reflection), length discipline, correct verse header.
- Adversarial peer review, a different model family reads the verse and actively tries to refute it: fabricated citations, misattributed scholars, altered Arabic, opinion disguised as classical commentary. Refuted verses are quarantined and rewritten from scratch.
- Calibration probes, deliberately flawed decoy papers are planted occasionally to measure whether reviewers actually catch known fabrications. Reviewer rewards are weighted by their measured accuracy.
Final tally: 9,950 adversarial reviews were performed across the corpus, producing 3,560 refutations; 4,475 rejected drafts are preserved in quarantine rather than deleted, keeping the full audit trail. The closing sweep ran up to 124 concurrent DeepSeek v4-pro (reasoning) review lanes alongside local Qwen reviewers, so that every one of the 6,236 surviving verse commentaries passed review by a model family different from its author.
Citation policy (enforced on both writer and reviewer sides): a hadith presented as authenticated must carry a canonical six-collection name and number (Bukhari, Muslim, Tirmidhi, Abu Dawud, Nasa'i, Ibn Majah), mechanically verified against the offline corpus; reports that classical tafsir transmits from other compilers (Ibn Abi Hatim, Ibn Khuzaymah, Imam Ahmad) may appear only in indirect speech ("Ibn Kathir relates a report via...") without an authentication claim; and "no authentic report exists" is always an acceptable answer.
The Machines
| Machine | Hardware | Engine | Roles over the project |
|---|---|---|---|
| MacBook Pro | Apple M4 Max, 128 GB unified | llama.cpp · Metal | Orchestrator hub, NFS corpus server, Qwen3.6-27B writer |
| Linux workstation | 2× NVIDIA RTX 3090 (24 GB each) | llama.cpp · CUDA (and Vulkan, benchmarked) | Gemma4-31B/12B writers; Qwen3.8-27B reviewers; host for cloud-agent containers |
| ASUS ROG Z13 | AMD Ryzen AI Max (Strix Halo), 128 GB unified | llama.cpp · Vulkan | Gemma 12B writers (including a server shared with other workloads) |
| Cloud | DeepSeek API | deepseek-v4-flash & v4-pro | High-throughput writers (flash/no-think) and precision reviewers (pro/thinking) |
The Models & What Each Contributed
Qwen3.6-27BGemma4-31B QAT Gemma4-12B QATgemma-4-12B-it Qwen3.8-27BQwen3.5-27B deepseek-v4-flashdeepseek-v4-pro
Four model families wrote and cross-reviewed each other, deliberately: model diversity in review catches each family's blind spots. Controlled experiments during the run measured each configuration (survival rate under review, refutation rate, throughput). Notable findings: DeepSeek flash without chain-of-thought was the volume champion at ~95% review survival; v4-pro required its reasoning mode to function (disabling it collapsed output discipline); grounding mattered far more than model size, 12B models with verified sources matched much larger models' survival rates.
Orchestration Architecture
- Hub-and-spoke over NFS, a single orchestrator (Mac) assigns verse and review tasks through a shared file-based queue; agents on all machines and the cloud mount the same corpus.
- Work-stealing scheduler, surahs were partitioned across agents, with agents stealing remaining verses fleet-wide once their allocation finished, keeping all lanes busy to the last verse.
- Functional awareness layer, agents receive their own failure reasons and reviewer critiques on subsequent tasks, keep per-agent journals, and carry evolving persona files; reviewer accuracy is tracked through planted probes.
- Self-healing corpus, any verse refuted at any time automatically reopens for rewriting under the current (always-improving) pipeline.
The Role of Claude (Fable 5)
The system itself, every gate, the grounding integrations, the orchestrator, the review economy, this website, was designed, written, debugged, and continuously supervised by Claude Fable 5 (Anthropic), operating as an autonomous engineering agent via Claude Code under human direction. Fable 5 did not write the tafseer content; its role was the meta-level: building the pipeline, running controlled experiments on model configurations, diagnosing live failures (from GPU memory races to reasoning-model output quirks), and acting as standing supervisor over the multi-day run, while the verse commentary itself was produced by the open-weight and DeepSeek models listed above, under the constraints the pipeline enforced.
One anecdote is worth recording for what it says about the gates. The very last verse to converge (97:2) kept failing review, and at the user's suggestion Fable 5 drafted a commentary for it directly. The pipeline's mechanical gate refuted the supervisor's own draft, its hand-typed Arabic differed from the canonical text at the codepoint level, exactly the failure mode the code-inserted-Arabic safeguard exists to prevent. The verse's published commentary was instead written by the model fleet and passed review on its own merits. The gates do not know who you are.
Two auxiliary datasets are used by the site itself: the per-verse "Related Verses" graph is computed offline by a small purpose-built embedding model (bge-small-en-v1.5, run once under llama.cpp, cosine top-neighbors over the finished commentaries), and the Quran reader's transliteration text comes from the public alquran.cloud edition, fetched once and served locally. Neither runs at page-view time; both ship as static files.
Human direction set the goals, chose the models and machines, made all publication decisions, and repeatedly caught issues the automated systems missed.
Honest Limitations
- This is AI-generated commentary, rigorous scaffolding reduces but cannot eliminate model error. Word-by-word morphology and cross-references are the most error-prone sections.
- The classical grounding leans primarily on one accessible source (Ibn Kathir, abridged English); al-Tabari, al-Qurtubi and al-Sa'di attributions rest on model knowledge and review, not direct text access.
- The Reflection sections are explicitly the models' own composition, labeled as such.
- Reader corrections are welcome, the pipeline can reopen and rewrite any verse.
Project window: August 16-18, 2026 · 6,236 verses · four model families · three machines + one cloud · 9,950 adversarial reviews · 3,560 refutations.