Muhammad KaifKarachi, Pakistan
Muhammad Kaif

Back to all projects

Seerah Q&A Assistant

An assistant for questions about the life of Prophet Muhammad ﷺ. It answers only from an approved corpus and cites every answer.

For
Personal build: an AI assistant that answers only from its sources.
Built with
Next.js, AI with retrieval (RAG)
Proof
Every answer shows its source. Fatwa questions are refused and sent to an alim.
Live
seerah-qn-a.vercel.app
Code
Repository not linked yet
Seerah Q&A Assistant home screen with suggested questions and the not-a-fatwa notice

The problem

A general chatbot will happily make up a hadith or a date. For this subject that is not acceptable. Answers have to come from approved sources, show where they came from, and stay out of religious rulings.

What I built

  • Answers grounded in two sources: Shamail (120 entries) and a Seerah Timeline.
  • A citation under every answer, with the source and its title.
  • Fatwa and ruling questions are refused and redirected to a qualified alim.
  • Questions outside the corpus are declined instead of guessed.
  • Works in English, Roman Urdu and Urdu. The disclaimer stays on screen in the reader's language.

How it fits together

  1. QuestionEnglish, Roman Urdu or Urdu
  2. RetrievalShamail and Seerah Timeline only
  3. Answerwritten from what was retrieved
  4. Citationsource and title shown

This is the flow as the live app shows it. Code-level details will be added after a code review.

Hard parts

Saying "I don't know"

The app's rule is that answers come only from the corpus. Questions it cannot answer from its sources, like a favourite colour, are declined instead of filled in.

Staying out of rulings

Questions like "Is music haram?" are a different kind of question. The app refuses them and points to an alim, and a notice on every screen says it is not a fatwa service.

Results

Live at seerah-qn-a.vercel.app.

Stack

Next.js, Retrieval over an approved corpus (RAG)

Screens