Tag: BM25

  • DivinityAI – Islamic Grounded RAG: Architecture & Performance Benchmark

    DivinityAI – Islamic Grounded RAG: Architecture & Performance Benchmark

    Live Project Access: https://muslim.nevatal.id
    Key Takeaways

    • DivinityAI locks all responses to authenticated Quran and Hadith sources, eliminating hallucination risks.
    • A five‑path Intent Router classifies queries (Quran, Hadith, Fiqh, Calculation, Off‑Domain) and applies confidence gating.
    • Hybrid search combines BM25 sparse matching with BGE‑M3 dense embeddings, enhanced by HyDE and sub‑query decomposition.
    • Deterministic 4‑tier citation verification (exact match → normalized → Levenshtein → semantic) ensures source authenticity.
    • Built on Django ASGI/DRF, React 19/Vite, ChromaDB, and local Ollama/Groq LLMs for high‑performance, zero‑hallucination Islamic RAG.

    Islamic scholarship demands absolute textual fidelity. General‑purpose LLMs often fabricate Quranic verses, misattribute Hadiths, or generate speculative fatwas, risking doctrinal errors. DivinityAI solves this by implementing a strict “corpus‑lock” policy: every response must be verifiable against a curated, authenticated database of the King Fahd Uthmani Quran and six canonical Hadith collections. This article dissects the system’s architectural blueprint, technical stack, data flows, and performance benchmarks, illustrating how DivinityAI achieves deterministic citation verification and zero‑hallucination retrieval‑augmented generation.

    The Engineering Challenge: Why DivinityAI – Islamic Grounded RAG Was Architected

    Traditional RAG systems retrieve information from open‑domain corpora, leaving room for hallucination when sources are incomplete or ambiguous. In Islamic contexts, even a minor textual deviation can have profound theological implications. DivinityAI was conceived to eliminate this risk through:

    • Locked Corpus: Only authentic Quran and Hadith texts are indexed, ensuring every retrieved snippet originates from trusted sources.
    • Intent Classification: A five‑path router (Quran verse, Hadith, Fiqh, Calculation, Off‑Domain) directs queries to specialized retrieval pipelines.
    • Multi‑Layer Verification: Pre‑generation evidence checks, post‑generation hallucination detectors, and a deterministic 4‑tier citation validation chain guarantee source authenticity.

    The result is an AI system that can safely answer scholarly and academic queries while refusing off‑domain or unverifiable requests.

    Core Architecture & Technical Stack Deep‑Dive

    System Overview & Interface Boundaries

    DivinityAI follows a modular, microservice‑friendly design. The React 19/Vite frontend communicates via POST /api/v1/query to a Django DRF backend, which orchestrates retrieval, verification, and generation steps.

    React 19 / Vite ──► Django ASGI / DRF ──►
       ├─ ChromaDB (port 8040) – vector stores (quran_collection, hadith_collection)
       ├─ rank_bm25 (local disk) – sparse BM25 index for Arabic text
       └─ Ollama (port 11434) – local embedding models (Gemma, BGE‑M3)
       └─ OpenRouter / Groq – LLMs (Gemini 2.5 Flash, Llama 3.3 70B)

    Frontend Architecture

    • React 19 with Vite for rapid development and optimized builds.
    • Tailwind CSS v4 for responsive, RTL‑aware styling.
    • Specialized Arabic typography: Uthmani script rendering, bidirectional text support.
    • Source citation popovers for inline references (`[Q surah:ayah]`, `[C collection/number]`).

    Backend Architecture

    • Django ASGI server with DRF endpoints, custom middleware for query auditing and logging.
    • Intent Router middleware classifies incoming queries using confidence scoring.
    • Scope Guard blocks off‑domain requests early.
    • Query Rewriting pipeline normalizes input for optimal retrieval.

    Retrieval Layer

    • Hybrid Search: BM25 sparse matching on normalized Arabic text combined with BGE‑M3 dense embeddings stored in ChromaDB.
    • HyDE Expansion: Hypothetical Document Embeddings generate richer query representations, especially for jurisprudential (Fiqh) queries.
    • Sub‑Query Decomposition: Complex multi‑part queries are broken down into atomic retrieval tasks.
    • Reciprocal Rank Fusion (RRF): Merges sparse and dense results, boosting overall precision.

    Verification & Generation Layer

    • Pre‑Generation Evidence Sufficiency: Checks that retrieved sources cover the user’s intent before invoking an LLM.
    • 4‑Tier Citation Verification:
      1. Exact match against source text.
      2. Normalized match (Arabic diacritics, ligatures).
      3. Levenshtein distance tolerance.
      4. Semantic similarity verification.
    • Post‑Generation Fatwa Boundary / Hallucination Detectors: LLM responses are cross‑checked against verified citations.

    Key Features Breakdown & Practical Benefits

    Strict Corpus‑Lock Policy

    Every answer must be traceable to the King Fahd Uthmani Quran or the six canonical Hadith books. If a claim cannot be verified, the system refuses to respond, protecting users from misinformation.

    Five‑Path Intent Router with Confidence Gating

    akkan>

    Path Purpose Confidence Threshold
    Quran verse Direct Quran retrieval and citation. ≥ 0.85
    Hadith Access to authenticated prophetic narrations. ≥ 0.80
    Fiqh Cross‑source jurisprudential analysis. ≥ 0.75
    Calculation Mathematical operations (e.g., prayer times, lunar calendar). N/A (deterministic)
    Off‑Domain Non‑Islamic queries are rejected. ≤ 0.60

    Hybrid Search & HyDE

    BM25 captures lexical nuances in Arabic morphology, while BGE‑M3 provides semantic depth. HyDE enriches queries by generating hypothetical documents, improving recall for abstract Fiqh questions.

    Deterministic Citation Verification

    The 4‑tier chain ensures that citations are not just close matches but exact, normalized, or semantically equivalent to authentic sources. This eliminates false positives and maintains scholarly rigor.

    Real‑World Deployment & Production Topology

    DivinityAI is deployed as a self‑hosted solution, with ChromaDB and Ollama running locally for data privacy

  • DivinityAI – Islamic Grounded RAG: The Best Free Alternative to Expensive Religious Research Apps

    Introduction: Why Pay Hundreds for Religious AI When DivinityAI is 100% Free

    Religious research tools often lock you behind expensive SaaS subscriptions, charge per‑query, and risk hallucinating sacred texts. DivinityAI – Islamic Grounded RAG shatters this model. It is 100% free, with no credit card required, no paywalls, and full data ownership. All production‑grade capabilities—strict corpus‑lock, deterministic citation verification, five‑path intent routing, HyDE expansion, and hybrid search—are yours to use without cost.

    Live Project Access: https://muslim.nevatal.id
    Key Takeaways
    • DivinityAI – Islamic Grounded RAG is completely free—zero subscription, zero credit‑card required.
    • It replaces expensive proprietary religious research apps and subscription‑based theological tools.
    • Full production‑grade features: corpus‑lock, deterministic citation verification, five‑path intent router, HyDE, hybrid search, and RTL Arabic typography.
    • Real‑world use cases include scholarly research, academic study, and a reference design for zero‑hallucination RAG.
    • Access the live demo now at https://muslim.nevatal.id.

    The Problem with Popular Commercial Tools: Expensive Subscriptions & Paywalls

    Many commercial religious research platforms charge $20‑$100+ per month, limit the number of queries, and lock your data inside their proprietary SaaS. This creates three major pain points:

    • Costly Subscriptions: Monthly or annual fees that add up to hundreds of dollars per year.
    • Vendor Lock‑in: Data and models are trapped in closed ecosystems, making migration painful.
    • Hallucination Risks: General‑purpose LLMs can fabricate Quranic verses, misattribute Hadiths, and generate inaccurate Fiqh rulings.

    These tools also often lack transparency in their retrieval logic, making it impossible to verify the sources behind any generated answer.

    Introducing DivinityAI – Islamic Grounded RAG: A Production‑Grade Free Alternative

    DivinityAI was built to democratize access to accurate, authenticated Islamic research. Every feature is open, free, and designed for zero‑hallucination. Whether you’re a developer, scholar, or student, you can leverage the same robust pipeline that ensures every answer is grounded in the King Fahd Uthmani Quran and the six canonical Hadith collections.

    The system runs locally with ChromaDB, BGE‑M3 embeddings, BM25 sparse search, and modern LLMs (OpenRouter Gemini 2.5 Flash, Groq Llama 3.3 70B) all orchestrated through a Django ASGI backend and React 19 frontend. All of this is yours to run and extend at no cost.

    Head‑to‑Head Comparison: DivinityAI – Islamic Grounded RAG vs. Popular Commercial Paid Tools

    Feature DivinityAI – Islamic Grounded RAG Popular Commercial Religious Research Tools
    Pricing $0 / 100% Free / Full Ownership $20‑$100+ per month (subscription)
    Key Capabilities • Strict corpus‑lock policy
    • Five‑path Intent Router (Quran, Hadith, Fiqh, Calculation, Off‑Domain)
    • HyDE expansion & sub‑query decomposition
    • Hybrid BM25 + BGE‑M3 search
    • Deterministic 4‑tier citation verification
    • Pre/post‑generation hallucination detectors
    • RTL Arabic typography & Uthmani script
    • Basic search (often limited)
    • No deterministic citation verification
    • Risk of hallucination
    • Limited language support (mostly English)
    Paywalls / Limits None – unlimited queries, full access Query caps, feature tiers, API limits
    Data Privacy / Ownership Full ownership, local deployment, no third‑party data sharing Data stored in proprietary cloud, limited transparency

    Core Features You Get Completely Free

    1. Strict Corpus‑Lock Policy

    Every answer must be traceable to the King Fahd Uthmani Quran or the six canonical Hadith collections. If a claim cannot be verified, the system refuses to answer, eliminating hallucination risk.

    2. Five‑Path Intent Router with Confidence Gating

    Queries are automatically classified into Quran verse search, Hadith research, Fiqh analysis, calculation, or off‑domain. Each path applies specialized retrieval strategies and confidence thresholds.

    3. HyDE Expansion & Sub‑Query Decomposition

    Hypothetical Document Embeddings (HyDE) generate query reformulations that capture nuanced jurisprudential intent. Sub‑query decomposition further refines search precision.

    4. Hybrid BM25 + BGE‑M3 Search

    Combines sparse matching on normalized Arabic text with dense embeddings from BGE‑M3, delivering superior recall and relevance.

    5. Deterministic 4‑Tier Citation Verification

    Exact match → normalized form → Levenshtein distance → semantic check. This ensures citations are accurate and verifiable.

    6. Pre‑Generation Evidence Sufficiency & Post‑Generation Fatwa Boundary Checks

    Before generating an answer, the system validates that sufficient evidence exists. After generation, it runs hallucination and boundary detectors to enforce Islamic scholarly standards.

    7. Optimized RTL Arabic Typography & Uthmani Script Rendering

    Full support for Arabic script, Uthmani Quranic fonts, and proper right‑to‑left layout for a native reading experience.

    Real‑World Use Cases: How Users Save Money with This Free Alternative

    • Scholarly Research: Academics can now explore authenticated Quran and Hadith references without paying subscription fees, ensuring citations are deterministically verified.
    • Academic Study: Students and institutions benefit from a cost‑free platform for comparative analysis of classical Arabic religious texts.
    • Reference Design: Developers can adopt the same zero‑hallucination RAG pattern for high‑stakes domain‑specific AI applications, all without licensing costs.

    Step‑by‑Step Guide: How to Get Started with This Free Alternative

    1. **Visit the Live Demo**: Open your browser and navigate to https://muslim.nevatal.id.

    2. **Enter Your Query**: Type an Islamic research question in Arabic, English, or Malay. The system will automatically route intent, perform hybrid search, and verify citations.

    3. **Review Sources**: Click on any citation to see the original verse or Hadith with deterministic verification details.

    4. **Explore Advanced Features**: Use the intent selector to target Quran verse lookup, Hadith research, Fiqh analysis, or calculations.

    5. **Deploy Locally (Optional)**: Clone the GitHub repository and run the Django + ChromaDB stack on your own infrastructure for complete control.

    Frequently Asked Questions (FAQ)

    Is DivinityAI – Islamic Grounded RAG really 100% free?

    Yes. There are no hidden

  • DivinityAI – Islamic Grounded RAG: The Best Free Alternative to Expensive Religious Research Apps

    Introduction: The Problem with Expensive Commercial Religious Research Tools

    Researchers, students, and developers often face a tough choice when seeking reliable Islamic texts: pay $20‑$100+ each month for proprietary religious research apps, or settle for limited free alternatives that risk hallucinated verses and unreliable citations. These commercial tools lock you into subscription fees, restrict data ownership, and often hide advanced features behind paywalls. The result? High costs, limited control, and the constant threat of inaccurate information in a domain where precision is sacred.

    Live Project Access: https://muslim.nevatal.id
    Key Takeaways: DivinityAI – Islamic Grounded RAG is 100% free, costs $0 vs. $20‑$100+/month for paid alternatives, requires no credit card, offers full data privacy and ownership, and provides production‑grade features without any paywalls.

    Imagine a system that delivers hallucination‑free Quran and Hadith search, deterministic citation verification, and multilingual support—all at no cost. That’s exactly what DivinityAI – Islamic Grounded RAG provides. Built with a strict corpus‑lock policy, it ensures every answer is grounded in authentic sources, eliminating the risk of fabricated verses or misattributed narrations.

    Introducing DivinityAI – Islamic Grounded RAG: A Production‑Grade Free Alternative

    DivinityAI – Islamic Grounded RAG was conceived to democratize access to accurate Islamic scholarship. Leveraging cutting‑edge retrieval‑augmented generation (RAG) techniques, hybrid search (BM25 + BGE‑M3 embeddings), and a deterministic 4‑tier citation verification chain, it delivers a robust, scholarly‑grade experience entirely free of charge. Whether you’re a researcher, a developer building domain‑specific solutions, or a student seeking reliable references, DivinityAI gives you the tools you need without any subscription fees.

    Head‑to‑Head Comparison: DivinityAI – Islamic Grounded RAG vs. Popular Commercial Paid Tools

    Feature DivinityAI – Islamic Grounded RAG (Free) Expensive Proprietary Religious Research Apps
    Pricing $0 – 100% free, no credit card required $20‑$100+ per month (subscription)
    Key Capabilities
    • Strict corpus‑lock policy (Quran & 6 Hadith collections)
    • Five‑path Intent Router (Quran, Hadith, Fiqh, Calculation, Off‑Domain)
    • Hybrid BM25 + BGE‑M3 dense embeddings
    • Deterministic 4‑tier citation verification
    • Pre/post‑generation hallucination detectors
    • RTL Arabic & Uthmani script rendering
    • Limited corpus access (often incomplete)
    • Basic keyword search, no intent routing
    • Simple citation display, prone to errors
    • No advanced verification layers
    • Limited multilingual support
    Paywalls / Limits None – full access free Many features gated behind premium tiers, API limits
    Data Privacy & Ownership Local deployment, full ownership, no data harvesting Cloud‑only, data stored on vendor servers, limited control

    Core Features You Get Completely Free

    Strict Corpus‑Lock Policy

    Every answer is verified against the King Fahd Uthmani Quran and six canonical Hadith collections. If a claim cannot be sourced, the system refuses to answer, guaranteeing zero hallucination.

    Five‑Path Intent Router

    Queries are classified into Quran verse lookup, Hadith research, Fiqh analysis, calculations, or off‑domain. Each path applies specialized retrieval strategies, ensuring precision and relevance.

    Hybrid Search & HyDE Expansion

    Combines BM25 sparse matching on normalized Arabic text with BGE‑M3 dense embeddings. Sub‑query decomposition and Hypothetical Document Embeddings (HyDE) enable nuanced jurisprudential queries.

    Deterministic Citation Verification

    A four‑tier verification chain (exact match, normalized, Levenshtein distance, semantic check) ensures citations are accurate and trustworthy.

    Pre‑ and Post‑Generation Checks

    Evidence sufficiency checks before generation and hallucination/fatwa boundary detectors after generation add additional safety layers.

    Optimized Arabic Typography

    Full RTL support with Uthmani script rendering, enabling seamless reading of Arabic texts alongside English and Malay interfaces.

    Real‑World Use Cases: How Users Save Money with This Free Alternative

    • Scholarly Research: Academics can access authenticated Quran and Hadith references without paying for expensive databases or subscription‑based journals.
    • Cross‑Source Comparative Analysis: Researchers can compare classical Arabic texts across multiple sources, leveraging the deterministic citation system to ensure accuracy.
    • Reference Architecture: Developers can adopt the same zero‑hallucination RAG pattern for other high‑stakes domains, saving on licensing fees for proprietary solutions.

    Step‑by‑Step Guide: How to Get Started with This Free Alternative

    1. Visit the Live Platform: Navigate to https://muslim.nevatal.id.
    2. Start a Query: Enter your question in Arabic, English, or Malay. The Intent Router will automatically classify the request.
    3. Review Results: Examine the retrieved sources and deterministic citations. Each reference includes inline tags like [Q surah:ayah] or [C collection/number].
    4. Utilize Advanced Filters: Use the built‑in filters to focus on specific collections, verse ranges, or hadith narrators.
    5. Export & Share: Download citations in various formats or share directly via links.

    Frequently Asked Questions (FAQ)

    Is DivinityAI – Islamic Grounded RAG truly 100% free?

    Yes. There are no hidden fees, paywalls, or credit‑card requirements. All features are accessible at zero cost.

    Are there any limitations compared to paid tools?

    DivinityAI offers a richer feature set—including deterministic citation verification, strict corpus‑lock, and multilingual support—than many paid alternatives, all without any restrictions.

    How does it compare to expensive subscription services?

    While paid tools charge $20‑$100+ per month, DivinityAI provides production‑grade capabilities for free, ensuring full data ownership and privacy.

    What about performance and reliability?

    Built on Django ASGI, ChromaDB, and optimized embeddings, DivinityAI delivers fast, accurate responses with built‑in hallucination detection and verification.

    Conclusion & Next Steps

    DivinityAI – Islamic Grounded RAG stands as a powerful, free alternative to costly commercial religious research applications. By eliminating subscription fees and providing full control over your data, it empowers scholars, developers, and enthusiasts to explore Islamic texts with confidence and precision. Experience the platform today at https://muslim.nevatal.id and discover how a free solution can outperform any paid tool.

  • DivinityAI – Islamic Grounded RAG: Free Alternative to Paid Religious Research Tools

    DivinityAI – Islamic Grounded RAG: Free Alternative to Paid Religious Research Tools

    Live Project Access: https://muslim.nevatal.id
    Key Takeaways

    • DivinityAI is **100% free** – no subscription, no credit‑card required.
    • Full **data ownership** and **privacy**; you control everything.
    • Production‑grade **hallucination‑free** Quran & Hadith search with deterministic citations.
    • Zero paywalls or tiered limits – use all features without paying.

    Religious research and Islamic scholarship demand absolute textual accuracy. Yet many developers turn to expensive, proprietary tools that lock you into monthly subscriptions, throttle features behind paywalls, and leave your data vulnerable to vendor control. The pain is real: $20‑$100+ per month for a closed SaaS solution, limited query quotas, and no guarantee against fabricated verses or fabricated hadiths.

    The Problem with Popular Commercial Tools: Expensive Subscriptions & Paywalls

    Commercial theological platforms often market themselves as “all‑inclusive” but deliver a fragmented experience behind a paywall. Typical drawbacks include:

    • Subscription costs ranging from $20 to $100+ per month.
    • Limited query caps that force you to upgrade for deeper research.
    • Vendor lock‑in – data resides on their servers, not yours.
    • Risk of hallucination because they rely on generic LLMs without strict source verification.

    These constraints choke both independent scholars and enterprise teams looking for reliable, cost‑effective solutions.

    Introducing DivinityAI – Islamic Grounded RAG: A Production-Grade Free Alternative

    Built from the ground up as a **100% free** alternative, DivinityAI eliminates subscription fees while delivering enterprise‑grade capabilities. It is an open‑source, self‑hosted Retrieval‑Augmented Generation system that locks every response to an authenticated corpus of the King Fahd Uthmani Quran and the six canonical Hadith collections. Because it runs locally (ChromaDB, BM25 indexes, and optional Ollama) and uses free remote LLMs via OpenRouter, you get full control, zero licensing costs, and complete data privacy.

    Head-to-Head Comparison: DivinityAI – Islamic Grounded RAG vs. Popular Commercial Paid Tools

    Feature DivinityAI – Islamic Grounded RAG (Free) Commercial Paid Tools (e.g., Quranic Insight SaaS, Islamic Research Suite)
    Pricing $0 – completely free, no credit card required $20‑$100+ per month (subscription)
  • Architecture & Performance Benchmark of DivinityAI – Islamic Grounded RAG

    Architecture & Performance Benchmark of DivinityAI – Islamic Grounded RAG

    Key Takeaways: DivinityAI is a strict corpus-locked Islamic RAG system, ensuring zero hallucination of Quranic verses or Hadith citations. It features a five-path intent router, HyDE expansion, hybrid search, and deterministic citation verification.

    Live Project Access: https://muslim.nevatal.id

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, fabricating Quranic surah and ayah numbers, attributing narrations to the wrong companions, merging distinct prophetic sayings (Hadith), and synthesizing inaccurate Islamic jurisprudence (Fiqh) fatwas. This inaccuracy can be misleading and unreliable, particularly in a domain where textual accuracy is critical.

    Core Architecture & Technical Stack Deep-Dive

    Overview

    DivinityAI is built as a modular application with a Django backend serving a React SPA, deploying local embeddings and remote LLM orchestrators. The system consists of several components, including a vector database (ChromaDB), a sparse index (rank_bm25), an embedding model (Ollama), and an LLM engine (OpenRouter and Groq).

    Ingestion & Arabic NLP Pipeline

    The ingestion pipeline implements a custom preprocessing normalization stage to index classical Arabic scripts accurately. This includes NFKD normalization, stripping diacritics, and normalizing alef forms.

    Key Features Breakdown & Practical Benefits

    Strict Corpus-Lock Policy

    DivinityAI ensures zero hallucination of Quranic verses or Hadith citations by implementing a strict corpus-lock policy. If a fact or claim cannot be verified from the retrieved sources, the system refuses to answer.

    Intent Router & HyDE Expansion

    The system features a five-path intent router, classifying incoming queries by intent (Quran search, Hadith research, Fiqh analysis, calculations, or out-of-scope). It also implements HyDE expansion and sub-query decomposition for nuanced jurisprudential queries.

    Hybrid Search & Deterministic Citation Verification

    DivinityAI uses a hybrid approach, combining BM25 sparse matching with BGE-M3 dense embeddings. It also implements a deterministic citation verification chain, ensuring that all citations are accurate and reliable.

    Real-World Use Cases & Applications

    DivinityAI has several real-world use cases, including scholarly research and authenticated Quran/Hadith reference discovery, academic study of classical Arabic religious texts, and reference design pattern for high-stakes zero-hallucination domain-specific RAG architectures.

    How It Works: Step-by-Step Workflow

    1. Intent classification: The system classifies the user query using an LLM classifier.
    2. Scope enforcement: The system checks the classification confidence and rejects out-of-scope queries.
    3. Expansion: The system executes HyDE expansion and sub-query decomposition for Fiqh intent.
    4. Retrieval: The system runs BM25 token searches and BGE-M3 dense queries against ChromaDB.
    5. Verification: The system validates citations using a deterministic verification chain.
    6. Synthesis: The system generates the final response using the validated citations.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional Approaches
    Corpus-lock policy Strict corpus-lock policy No corpus-lock policy
    Intent router Five-path intent router No intent router
    Hybrid search Hybrid BM25 and BGE-M3 search No hybrid search
    Citation verification Deterministic citation verification No citation verification

    Frequently Asked Questions (FAQ)

    What is DivinityAI – Islamic Grounded RAG?
    DivinityAI is a strict corpus-locked Islamic RAG system that ensures zero hallucination of Quranic verses or Hadith citations.
    How does DivinityAI work?
    DivinityAI works by classifying the user query, expanding the query, retrieving relevant citations, verifying the citations, and synthesizing the final response.
    What are the benefits of using DivinityAI?
    The benefits of using DivinityAI include accurate and reliable citations, zero hallucination of Quranic verses or Hadith citations, and a strict corpus-lock policy.
    Can I use DivinityAI for scholarly research?
    Yes, DivinityAI is suitable for scholarly research and authenticated Quran/Hadith reference discovery.
    Is DivinityAI available for public use?
    Yes, DivinityAI is available for public use at https://muslim.nevatal.id.

    Conclusion & Next Steps

    In conclusion, DivinityAI – Islamic Grounded RAG is a revolutionary system that ensures zero hallucination of Quranic verses or Hadith citations. Its strict corpus-lock policy, five-path intent router, HyDE expansion, hybrid search, and deterministic citation verification make it an ideal solution for scholarly research and authenticated Quran/Hadith reference discovery. To explore the project and learn more about its features and use cases, visit https://muslim.nevatal.id.

  • Comprehensive Guide & Technical Deep-Dive into DivinityAI – Islamic Grounded RAG

    Comprehensive Guide & Technical Deep-Dive into DivinityAI – Islamic Grounded RAG

    Key Takeaways:

    • DivinityAI ensures zero hallucination in Quran and Hadith references.
    • Built with a strict corpus-lock policy, it verifies all citations deterministically.
    • Utilizes advanced techniques like HyDE expansion and hybrid search for accurate retrieval.
    • Supports multilingual inputs and optimized Arabic typography.
    Live Project Access: https://muslim.nevatal.id

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, leading to inaccurate Quranic surah and ayah numbers, misattributed Hadith narrations, and synthesized Fiqh fatwas. In a domain where textual accuracy is critical, such inaccuracies can be misleading and harmful. DivinityAI addresses this issue by implementing a strict corpus-lock policy, ensuring that every statement is grounded in authenticated Quranic and Hadith sources.

    Core Architecture & Technical Stack Deep-Dive

    Frontend

    Built with React 19 and Vite, the frontend is optimized for Right-to-Left (RTL) Arabic scripts, ensuring readability of diacritics and Uthmani script. Tailwind CSS v4 is used for styling, providing a responsive and visually appealing interface.

    Backend

    The backend is powered by Django and Django REST Framework (DRF), handling RESTful API requests and query auditing. Custom middleware ensures structured logging and query auditing for enhanced security and traceability.

    Vector Database & Indexing

    ChromaDB serves as the vector database, storing embeddings for Quran and Hadith texts. BM25 sparse indexing allows for fast exact-token matches, while BGE-M3 embeddings capture semantic concepts in both Arabic and English.

    LLM Engine

    OpenRouter handles text generation using Gemini 2.5 Flash, while Groq performs high-speed validation tasks with Llama 3.3 70B. This combination ensures accurate and efficient processing of queries.

    Key Features Breakdown & Practical Benefits

    Strict Corpus-Lock Policy

    DivinityAI refuses to answer queries that cannot be verified from its locked corpus of Quran and Hadith texts, ensuring zero hallucination.

    Five-Path Intent Router

    Queries are classified into Quran verse, Hadith, Fiqh, Calculation, or Off-Domain intents, with specialized retrieval strategies applied for each category.

    HyDE Expansion & Sub-Query Decomposition

    Hypothetical Document Embeddings (HyDE) and sub-query decomposition enhance retrieval accuracy, especially for nuanced jurisprudential queries.

    Hybrid Search

    Combining BM25 sparse matching with BGE-M3 dense embeddings ensures comprehensive search results, capturing both exact keyword matches and semantic concepts.

    Deterministic Citation Verification

    A four-tier citation verification chain (exact match, normalized, Levenshtein distance, semantic check) ensures the accuracy of all references.

    Real-World Use Cases & Applications

    DivinityAI is invaluable for scholarly research, academic study of classical Arabic religious texts, and cross-source comparative analysis. Its deterministic citation verification makes it a reliable tool for high-stakes domain-specific RAG architectures.

    How It Works: Step-by-Step Workflow

    1. Intent Classification: Queries are classified into one of five intents.
    2. Scope Enforcement: Off-domain queries are rejected with a polite message.
    3. Query Rewriting: HyDE and sub-query decomposition refine the query.
    4. Hybrid Retrieval: BM25 and BGE-M3 embeddings retrieve relevant texts.
    5. Citation Verification: Citations are verified through a four-tier process.
    6. Grounded Generation: Verified texts are used to generate accurate responses.
    7. Safety Layer: Post-generation checks ensure the response is safe and accurate.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional Approaches
    Hallucination Control Zero hallucination High risk of hallucination
    Citation Verification Deterministic verification Manual verification
    Query Classification Five-path intent router Single-path classification
    Search Technique Hybrid search Single search technique

    Frequently Asked Questions (FAQ)

    What is DivinityAI?

    DivinityAI is a Retrieval-Augmented Generation (RAG) system designed for accurate Quran and Hadith research, ensuring zero hallucination.

    How does DivinityAI ensure accuracy?

    It employs a strict corpus-lock policy and deterministic citation verification to ensure all references are accurate.

    Can DivinityAI issue fatwas?

    No, DivinityAI displays source materials and scholarly positions without generating new religious rulings.

    What languages does DivinityAI support?

    DivinityAI supports Arabic, English, and Malay inputs, with optimized RTL Arabic typography.

    Conclusion & Next Steps

    DivinityAI – Islamic Grounded RAG represents a significant advancement in AI-driven religious research, ensuring accuracy and reliability in Quran and Hadith references. To explore this groundbreaking tool, visit https://muslim.nevatal.id and experience the future of Islamic research.

  • Getting Started with DivinityAI – Islamic Grounded RAG: A Hands-On Tutorial

    Getting Started with DivinityAI – Islamic Grounded RAG: A Hands-On Tutorial

    Welcome to the definitive guide on DivinityAI – Islamic Grounded RAG, a cutting-edge Retrieval-Augmented Generation (RAG) system tailored for accurate Quran and Hadith searches. This tutorial will walk you through the core features, architecture, and practical applications of this innovative platform.

    Key Takeaways:

    • DivinityAI ensures zero hallucination of Quranic verses or Hadith citations.
    • It employs a strict corpus-lock policy for authenticated Islamic texts.
    • The system includes deterministic citation verification and multi-layered safety checks.
    Live Project Access: https://muslim.nevatal.id

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, fabricating Quranic surah and ayah numbers, attributing narrations to the wrong companions, and merging distinct prophetic sayings. In a domain where textual accuracy is critical, these LLMs are unreliable and potentially misleading. DivinityAI addresses this challenge by implementing a strict corpus-lock policy, ensuring every statement is grounded in authenticated Quran and Hadith sources.

    Core Architecture & Technical Stack Deep-Dive

    DivinityAI is built as a modular application with a Django backend serving a React SPA, deploying local embeddings and remote LLM orchestrators. The system includes:

    • React 19 single-page application styled using Tailwind CSS v4.
    • Django web service exposing REST endpoints via Django REST Framework (DRF).
    • ChromaDB server deployed locally for vector storage.
    • BM25 sparse index for fast exact-token matches.
    • Local Ollama service serving embeddinggemma for query embedding.
    • OpenRouter and Groq for text generation and validation tasks.

    Key Features Breakdown & Practical Benefits

    Strict Corpus-Lock Policy

    DivinityAI refuses to answer queries not grounded in authentic Quran and Hadith collections, ensuring zero hallucination.

    Five-Path Intent Router

    The system classifies incoming queries by intent (Quran verse, Hadith, Fiqh, Calculation, Off-Domain) and applies specialized retrieval strategies.

    Deterministic Citation Verification

    A four-tier citation verification chain ensures the accuracy of every citation before outputting the final answer.

    Real-World Use Cases & Applications

    DivinityAI is invaluable for scholarly research, academic study, and reference design patterns for high-stakes domain-specific RAG architectures.

    How It Works: Step-by-Step Workflow

    The query execution pipeline involves intent classification, scope enforcement, query rewriting, hybrid retrieval, reciprocal rank fusion, citation verification, evidence sufficiency checks, grounded generation, and safety layers.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional LLMs
    Hallucination-Free Yes No
    Deterministic Citation Yes No
    Corpus-Lock Policy Yes No

    Frequently Asked Questions (FAQ)

    What is DivinityAI – Islamic Grounded RAG?

    DivinityAI is a Retrieval-Augmented Generation system designed for accurate Quran and Hadith searches, ensuring zero hallucination and deterministic citation verification.

    How does DivinityAI ensure accuracy?

    DivinityAI employs a strict corpus-lock policy, multi-layered verification system, and post-generation hallucination detection to ensure accuracy.

    Can DivinityAI answer non-Islamic queries?

    No, DivinityAI rejects off-domain queries with an informational message.

    Conclusion & Next Steps

    DivinityAI – Islamic Grounded RAG represents a significant advancement in the field of Retrieval-Augmented Generation, offering unparalleled accuracy and reliability for Quran and Hadith searches. To explore the live project, visit https://muslim.nevatal.id.

  • DivinityAI – Islamic Grounded RAG: A Comprehensive Comparison & Alternatives Breakdown

    Introduction

    In the realm of Islamic studies, accuracy and authenticity are paramount. DivinityAI – Islamic Grounded RAG emerges as a revolutionary tool designed to address the challenges posed by general-purpose large language models (LLMs) that often hallucinate religious texts. This article delves into the intricacies of DivinityAI, comparing it with traditional approaches and exploring its unique features and benefits.

    Key Takeaways:

    • DivinityAI ensures zero hallucination of Quranic verses or Hadith citations.
    • It employs a strict corpus-lock policy, grounding every statement in authentic sources.
    • The system features a multi-layered verification system to maintain accuracy.
    Live Project Access: https://muslim.nevatal.id

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose LLMs often fabricate Quranic surah and ayah numbers, attribute narrations to the wrong companions, and synthesize inaccurate Islamic jurisprudence (Fiqh) fatwas. DivinityAI was built to eliminate these inaccuracies by implementing a strict “corpus-lock” policy, ensuring that every fact or claim is verified from authenticated sources.

    Core Architecture & Technical Stack Deep-Dive

    DivinityAI is built using a robust tech stack including Django ASGI / DRF, React 19 / Vite, ChromaDB, BGE-M3 Embeddings, BM25 Sparse Search, Reciprocal Rank Fusion, OpenRouter (Gemini 2.5 Flash), Groq (Llama 3.3 70B), and Tailwind CSS v4. This combination ensures high performance, accuracy, and user-friendly interfaces.

    Key Features Breakdown & Practical Benefits

    • Strict Corpus-Lock Policy: Ensures answers are grounded in authentic Quran and canonical Hadith collections.
    • Five-Path Intent Router: Classifies queries into Quran verse, Hadith, Fiqh, Calculation, or Off-Domain categories.
    • Hybrid Search: Combines BM25 sparse matching with BGE-M3 dense embeddings for comprehensive retrieval.
    • Deterministic Citation Verification: Implements a 4-tier citation verification chain for accuracy.

    Real-World Use Cases & Applications

    DivinityAI is invaluable for scholarly research, academic study, and reference design patterns for high-stakes domain-specific RAG architectures. It ensures authenticated Quran/Hadith reference discovery without hallucination risks.

    How It Works: Step-by-Step Workflow

    The workflow involves intent classification, scope enforcement, query rewriting, hybrid retrieval, reciprocal rank fusion, citation verification, evidence sufficiency checks, grounded generation, and safety layers.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional Approaches
    Accuracy Strict corpus-lock policy ensures zero hallucination Prone to inaccuracies and hallucinations
    Verification Multi-layered deterministic citation verification Limited or no citation verification
    Intent Classification Five-path intent router with confidence gating Limited or no intent classification

    Frequently Asked Questions (FAQ)

    What is DivinityAI?

    DivinityAI is a Retrieval-Augmented Generation (RAG) system built around a locked, authenticated corpus of Al-Quran and canonical Hadith compilations.

    How does DivinityAI ensure accuracy?

    It employs a strict corpus-lock policy and a multi-layered verification system to ensure every statement is grounded in authentic sources.

    Can DivinityAI issue fatwas?

    No, it displays source materials and scholarly positions without generating new religious rulings.

    What languages does DivinityAI support?

    It supports multilingual inputs, including Arabic, English, and Malay.

    Conclusion & Next Steps

    DivinityAI – Islamic Grounded RAG sets a new standard for accuracy and authenticity in Islamic studies. Explore the live project at https://muslim.nevatal.id to experience its capabilities firsthand.

  • Real-World Deployment & Case Study: DivinityAI – Islamic Grounded RAG System

    Real-World Deployment & Case Study: DivinityAI – Islamic Grounded RAG System

    Key Takeaways:

    • DivinityAI ensures zero hallucinations in Quran and Hadith searches with a strict corpus-lock policy.
    • The system integrates advanced AI techniques like HyDE, BM25, and BGE-M3 embeddings for accurate retrieval.
    • Real-world applications include scholarly research, academic study, and high-stakes domain-specific RAG architectures.
    Live Project Access: https://muslim.nevatal.id

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, fabricating Quranic surah and ayah numbers, merging distinct prophetic sayings, and synthesizing inaccurate Islamic jurisprudence fatwas. In a domain where textual accuracy is critical, these hallucinations are unreliable and potentially misleading. DivinityAI addresses this challenge by implementing a strict “corpus-lock” policy, ensuring every answer is grounded in authentic Quran and Hadith sources.

    Core Architecture & Technical Stack Deep-Dive

    DivinityAI is built on a robust tech stack that includes Django ASGI / DRF for the backend, React 19 / Vite for the frontend, and ChromaDB for vector storage. The system leverages BGE-M3 embeddings for dense retrieval and BM25 for sparse search, combined with Reciprocal Rank Fusion (RRF) to blend results. The architecture ensures low latency and high citation accuracy, making it suitable for real-world deployment.

    Key Features Breakdown & Practical Benefits

    • Strict Corpus-Lock Policy: Ensures answers are only provided if verified from authentic sources.
    • Intent Routing: Classifies queries into Quran verse, Hadith, Fiqh, Calculation, or Off-Domain categories.
    • HyDE & Sub-Query Decomposition: Enhances retrieval accuracy for nuanced queries.
    • Deterministic Citation Verification: Validates citations through exact match, normalized match, Levenshtein distance, and semantic check.

    Real-World Use Cases & Applications

    DivinityAI is designed for scholarly research, authenticated Quran/Hadith reference discovery, and academic study of classical Arabic religious texts. It also serves as a reference design pattern for high-stakes zero-hallucination domain-specific RAG architectures.

    How It Works: Step-by-Step Workflow

    1. Intent Classification: User queries are classified by intent using an LLM classifier.
    2. Scope Enforcement: Off-domain queries are rejected with a polite message.
    3. Query Rewriting: HyDE and sub-query decomposition enhance retrieval accuracy.
    4. Hybrid Retrieval: Combines BM25 sparse search with BGE-M3 dense embeddings.
    5. Citation Verification: Validates citations through a deterministic Python chain.
    6. Grounded Generation: Ensures responses are strictly based on retrieved passages.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional LLMs
    Hallucination Risk Zero High
    Citation Accuracy 95%+ Variable
    Domain Specificity Strictly Islamic Texts General
    Latency <8 seconds Variable

    Frequently Asked Questions (FAQ)

    What makes DivinityAI different from other AI systems?

    DivinityAI implements a strict corpus-lock policy, ensuring zero hallucinations and high citation accuracy.

    Can DivinityAI issue fatwas?

    No, DivinityAI displays source materials and scholarly positions without generating new religious rulings.

    What languages does DivinityAI support?

    DivinityAI supports Arabic, English, and Malay.

    How does DivinityAI ensure citation accuracy?

    The system uses a deterministic verification chain including exact match, normalized match, Levenshtein distance, and semantic check.

    Conclusion & Next Steps

    DivinityAI represents a significant advancement in the field of Islamic AI, offering a reliable, hallucination-free solution for Quran and Hadith searches. For more information and to experience the system firsthand, visit the live project at https://muslim.nevatal.id.

  • DivinityAI – Islamic Grounded RAG: Architecture & Performance Benchmark

    DivinityAI – Islamic Grounded RAG: Architecture & Performance Benchmark

    Key Takeaways:

    • DivinityAI ensures zero hallucinations in Quranic verses and Hadith citations.
    • It uses a strict corpus-lock policy grounded in authentic Quran and Hadith texts.
    • The system employs advanced techniques like HyDE expansion, hybrid search, and deterministic citation verification.
    Live Project Access: https://muslim.nevatal.id

    The Challenge: Why DivinityAI – Islamic Grounded RAG Was Built

    General-purpose large language models (LLMs) often hallucinate religious texts, fabricating Quranic surah and ayah numbers, attributing narrations to the wrong companions, and merging distinct prophetic sayings. In a domain where textual accuracy is critical, these hallucinations are unreliable and potentially misleading. DivinityAI addresses this challenge by implementing a strict corpus-lock policy, ensuring every response is grounded in authentic Quran and Hadith texts.

    Core Architecture & Technical Stack Deep-Dive

    DivinityAI is built using a modular architecture with a Django backend serving a React SPA. The system leverages ChromaDB for vector storage, BGE-M3 embeddings, BM25 sparse search, and Reciprocal Rank Fusion for hybrid search. The LLM engine uses OpenRouter (Gemini 2.5 Flash) and Groq (Llama 3.3 70B) for text generation and validation tasks.

    System Components & Interface Boundaries

    The architecture includes:

    • Frontend: React 19 single-page application styled with Tailwind CSS v4.
    • Backend: Django web service exposing REST endpoints via Django REST Framework (DRF).
    • Vector Database: ChromaDB server deployed locally on port 8040.
    • Sparse Index: rank_bm25 indexes saved on disk for fast exact-token matches.
    • Embedding Model: A local Ollama service serving embeddinggemma.
    • LLM Engine: OpenRouter handles text generation, while Groq performs high-speed validation tasks.

    Key Features Breakdown & Practical Benefits

    DivinityAI’s key features include:

    • Strict corpus-lock policy refusing answers not grounded in authentic Quran and Hadith texts.
    • Five-path Intent Router with confidence gating.
    • HyDE expansion and sub-query decomposition for nuanced queries.
    • Hybrid BM25 sparse matching combined with BGE-M3 dense embeddings.
    • Deterministic 4-tier citation verification chain.
    • Pre-generation evidence sufficiency checks and post-generation fatwa boundary / hallucination detectors.

    Real-World Use Cases & Applications

    DivinityAI is ideal for:

    • Scholarly research and authenticated Quran/Hadith reference discovery.
    • Academic study of classical Arabic religious texts.
    • Reference design pattern for high-stakes zero-hallucination domain-specific RAG architectures.

    How It Works: Step-by-Step Workflow

    The query execution pipeline includes:

    1. Intent Classification: Categorizes the query using Gemini 2.5 Flash.
    2. Scope Enforcement: Checks classification confidence and rejects off-domain queries.
    3. Expansion: Executes HyDE and splits Fiqh questions into sub-queries.
    4. Retrieval: Runs hybrid searches using BM25 and BGE-M3 embeddings.
    5. RRF & Verification: Melds retrieval lists and validates citations.
    6. Sufficiency Check: Determines if retrieved chunks contain sufficient evidence.
    7. Synthesis: Compiles the final response using Gemini 2.5 Flash.
    8. Audit: Audits the response text and appends appropriate disclaimers.

    Comparison: DivinityAI – Islamic Grounded RAG vs Traditional Approaches

    Feature DivinityAI Traditional Approaches
    Hallucination Risk Zero High
    Citation Verification Deterministic None
    Query Intent Routing Five-path Intent Router None
    Search Technique Hybrid BM25 + BGE-M3 Single Method

    Frequently Asked Questions (FAQ)

    What is DivinityAI?

    DivinityAI is a Retrieval-Augmented Generation (RAG) system built around a locked, authenticated corpus of Al-Quran and canonical Hadith compilations, ensuring zero hallucinations.

    How does DivinityAI verify citations?

    DivinityAI uses a deterministic 4-tier citation verification chain, including exact string matching, normalized matching, fuzzy Levenshtein distance, and semantic LLM fallback.

    Can DivinityAI issue fatwas?

    No, DivinityAI displays source materials and scholarly positions without generating new religious rulings.

    What languages does DivinityAI support?

    DivinityAI supports multilingual inputs in Arabic, English, and Malay.

    Conclusion & Next Steps

    DivinityAI sets a new standard for domain-specific RAG systems, ensuring zero hallucinations and deterministic citation verification in Islamic texts. Explore the live project at https://muslim.nevatal.id.