AccuracyAI SafetyCitationsḤadīth GradingQuality

How 3arif.ai Ensures Accuracy: The Complete Transparency Report

Every response is generated, reviewed by a second AI model, and scored before you see it. Here is the exact methodology — nothing hidden.

3arif Engineering·8 June 2026·10 min read

The Problem with AI and Islamic Knowledge

AI systems hallucinate. They generate confident-sounding text that is factually wrong, citing books that don't exist, attributing opinions to scholars who never held them, and paraphrasing ḥadīth with subtle errors that change their meaning entirely.

For Islamic knowledge specifically, this is not a minor inconvenience. A fabricated ḥadīth is a serious matter. An incorrect attribution to a scholar misrepresents 14 centuries of careful intellectual tradition. We treat this with appropriate gravity.

Here is exactly what 3arif.ai does about it.


Step 1 — Retrieval-Augmented Generation (RAG)

3arif.ai does not generate knowledge from memory. The model cannot draw on what it learned during training when answering questions about Islam. Instead, every response follows this pipeline:

Query → Embed → Retrieve → Generate → Review → Display

``` User question ↓ Embed with Voyage multilingual-2 ↓ Search 141,000 passages in Qdrant (cosine similarity) ↓ Retrieve top 8–12 most relevant chunks ↓ Pass chunks to Claude as explicit context ↓ Generate response — ONLY from provided context ↓ Review response quality (see Step 3) ↓ Display to user ```

The model receives the retrieved passages and is told: "Only use the exact provided context passages. Never invent or paraphrase tafsīr or ḥadīth."

If the knowledge base does not contain the answer, the model is instructed to say so clearly — not to fill the gap with training data.


Step 2 — Strict Citation Rules

Every factual claim must carry an inline citation marker. The system prompt enforces this non-negotiably:

  • Quran verses: `[Q 2:255]`
  • Tafsīr: `[Tafsir Ibn Kathir, on Q 2:255]` or `[Al-Mizan, Vol. 2]`
  • Ḥadīth: `[bukhari:1]` or `[muslim:977]`

These markers are not decorative. Each one is rendered as an interactive badge in the UI. Ḥadīth badges open a tooltip showing:

  • The full text of the narration
  • The narrator chain (isnād) — every name from the collector back to the Prophet ﷺ
  • The grade: Ṣaḥīḥ, Ḥasan, Ḍaʿīf, or Mawḍūʿ
  • The grading source (e.g. Al-Bukhārī, Al-Albānī, Al-Majlisī)

This means every cited ḥadīth is independently verifiable — not just by reference number, but by reading the full chain.


Step 3 — Ḥadīth Grading: The Mandatory Disclosure System

Ḥadīth scholarship developed a rigorous science of narrator criticism (ʿilm al-rijāl) over 12 centuries. Every narration has a grade. 3arif.ai enforces these grades strictly:

| Grade | Arabic | Status | Our Policy | |-------|--------|--------|------------| | Ṣaḥīḥ | صحيح | Authentic | Cite freely as primary evidence | | Ḥasan | حسن | Good | Cite with note it is "hasan" | | Ḍaʿīf | ضعيف | Weak | Must disclose weakness explicitly | | Mawḍūʿ | موضوع | Fabricated | Never cite under any circumstances |

When a ḍaʿīf ḥadīth appears in a response, the model is required to state immediately: "this ḥadīth is considered weak (ḍaʿīf) by scholars." This is not optional. It is enforced in the system prompt and verified in the review step.


Step 4 — The Quality Review System

After the response is generated, a second AI call (using a faster model) reviews the response before it is displayed to the user. This review checks five dimensions:

1. CITATIONS_PRESENT Does every factual Islamic claim carry a citation marker? Unsourced assertions are flagged.

2. NO_HALLUCINATION Do all cited sources appear in the retrieved context passed to the model? If the model cites `[Ibn Kathir, Vol. 5]` but that volume was not retrieved, this is flagged as a potential hallucination.

3. HADITH_GRADING If a ḍaʿīf ḥadīth is cited, was the weakness disclosed? Missing disclosure is flagged as an error.

4. FORMAT_CORRECT Are ḥadīth citations in the correct `[slug:number]` format? Variants like `[Bukhari 1]` that would break the tooltip system are flagged.

5. ACCURACY Does the response stay within what the sources say, or does it add unsourced interpretive commentary as fact?

The Scoring System

Each response receives a score from 0 to 100:

| Score | Meaning | |-------|---------| | 90–100 | Excellent — all checks pass | | 72–89 | Good — minor issues only | | < 72 | Below threshold — retry triggered |

Minimum standard: 72/100. If a response scores below 72, the system automatically regenerates it with additional quality instructions. The higher-scoring of the two attempts is shown. If both attempts score below 72, the response is displayed with a clear warning: "This response was regenerated but did not meet the minimum standard. Treat with caution."

The score and any specific flags are visible to users — click the badge beneath any response to see the full review.


Step 5 — The Four Response Modes

Accuracy requirements vary by use case. 3arif.ai offers four response modes, each with different depth and citation density:

⚡ Short Answer — 2–4 sentences, one or two essential citations. For quick factual lookups.

📖 Longer Answer — Full academic structure: main analysis, Referenced Verses section, Tafsīr Notes section with attributed scholar commentary.

🔬 Deep Research — All 24 sources cross-referenced. Classical and modern scholarship compared. Scholarly consensus and divergence explicitly mapped. Up to 8,096 tokens.

🌙 Mystic — The esoteric and spiritual dimension of the Quran. Inner (bāṭin) meanings drawn from sources like Al-Qushayrī's Laṭāʾif and the Shīʿī tafsīr tradition. All claims still cited.


What We Do Not Do

To be explicit about our limits:

  • We do not generate ḥadīth text from the model's training memory. If a ḥadīth is not in the knowledge base, we say so.
  • We do not paraphrase or summarise tafsīr passages in a way that alters their meaning. We quote directly.
  • We do not merge different scholars' views without attribution.
  • We do not present the model's own analytical commentary as scholarly opinion.
  • We do not cite Mawḍūʿ (fabricated) narrations under any circumstances.

The Quality Gate: Minimum Score 72/100

Every response must pass a minimum quality threshold of 72 out of 100 before being shown to the user.

If the first attempt scores below 72, the system automatically regenerates the response with an additional quality instruction: "ensure every claim has a citation and all ḥadīth grades are disclosed." The higher-scoring of the two attempts is shown.

If both attempts score below 72, the response is still displayed — but with a prominent warning: "Below quality standard · Treat with caution."

This gate ensures that the vast majority of responses shown are verified as citied, sourced, and grade-compliant before they reach you.

What the Review Badge Shows

Every assistant response carries a quality badge. Click it to see:

  • Score — e.g. 94/100
  • Summary — e.g. "All checks passed — citations present, sources verified, no fabrication detected."
  • Specific flags — e.g. "ERROR · NO_HALLUCINATION: The citation [Al-Mizan, Vol. 8] was not present in the retrieved context."

🟢 Verified — score ≥ 90, all checks pass 🟡 Minor notes — score 72–89, small issues flagged 🔴 Below standard — score < 72, shown with warning

Current Limitations

We believe in being honest about what we cannot yet guarantee:

  1. Arabic retrieval precision — Our Arabic-language tafsīrs (Al-Rāzī, Al-Alūsī, etc.) are embedded correctly with Voyage multilingual, but the retrieval precision for Arabic-specific queries is still maturing. We are improving this continuously.

  2. Isnād completeness — Not all ḥadīth in our database have complete narrator chain data. Where the chain is absent, the tooltip notes this explicitly rather than hiding it.

  3. Review model constraints — The quality review is itself an AI system (Claude Haiku). It can miss subtle issues. It is a strong safeguard, not a mathematical guarantee of accuracy.

  4. Scope — 227,000+ passages is large, but Islamic scholarship spans 1,400 years and millions of pages. Some questions will correctly receive: "the knowledge base does not contain sufficient material on this topic."

  5. Modern law — Contemporary fatwā collections (AAOIFI standards, Taqi Usmani, Mudawwana) are largely behind commercial paywalls or not yet digitised. We are working to source and licence accessible subsets.


The Transparency Commitment

Every response shows:

  • 🟢 / 🟡 / 🔴 Quality badge with score
  • Full review flags (clickable)
  • Source panel listing every retrieved passage
  • Colour-coded citation badges (green for Quran, amber for Tafsīr, purple for Ḥadīth)
  • Ḥadīth tooltip with isnād chain and grade on hover

We believe users of an Islamic knowledge tool deserve to see exactly where every claim comes from, who said it, when it was written, and how reliable the narration chain is. Anything less would be a disservice to the tradition.