QuranicLens
Live & publicA research platform that explores any Quranic verse through six lenses — tafsir, hadith, Seerat un Nabi, science, world history, and Abrahamic scripture parallels — synthesized by a 4-agent LLM pipeline that is strictly forbidden from inventing a source.
1 The Problem
The Quran speaks to science, psychology, history, and the cosmos — but a reader has no easy way to ask "how does this verse connect to X?" without either a scholar's library or a general-purpose LLM that will happily fabricate a hadith or misquote a verse to sound authoritative. For religious content specifically, a hallucinated citation isn't just wrong — it's a trust failure.
The challenge: build something that explores those connections honestly, cites only real sources, and says "I don't know" when the data doesn't support a claim.
2 The Approach
Every source — Quran, tafsir, hadith, Seerat, Bible, Torah, world history, and curated science facts — is embedded into PostgreSQL with pgvector ahead of time. At query time, the app never lets the model answer from memory: it retrieves real rows from the database first, then hands them to the model as context. The one exception is the science lens, where live web search is explicitly permitted to surface current discoveries — every other lens is retrieval-only.
The system prompt is contractual: the model must cite only what's in the provided context, must follow the source hierarchy (Quran → Hadith/Seerat → Science/History/Scripture), and must end every response with an AI disclaimer. If a lens has no relevant data for a query, it's simply omitted — never filled in with a guess.
3 Architecture — the 4-agent pipeline
Four agents share a single context object (the "backpack"), each adding to it before handing off:
No pre-seeded link tables connect the sources — every connection is discovered dynamically per query via vector similarity, so "patience" surfaces hadith about "sabr" even without an exact keyword match.
4 Tech Stack
5 Result
A publicly explorable research tool covering the full Quran plus five supporting source categories, with every claim traceable to a real record.