IslamChat

Get reliable answers on Islamic jurisprudence

What it does

Building an AI religious counsellor, especially one that can emulate a Muslim Imam, has been a notoriously difficult challenge. The developer will be held spiritually responsible for the user being misled by hallucinations. Most abandon the task rather than take the risk.

We use Gemini to get around this challenge in a clever way. We have built a RAG app over a dataset of 145k questions on Islamic jurisprudence answered by reputable human scholars. Gemini does three things in different parts of the pipeline:

1) Expands the pool of questions by translating questions into Arabic such that we can also retrieve Arabic-language vector embeddings
2) Condenses the chat history into a standalone question such that we can keep our prompts small
3) Tailors the responses to the user based on their question and the data retrieved. We have extremely strict guardrails such that anything outside this dataset is not answered at all, and all answers are cited and linked by source down to the school of thought (madhab) and scholar, thanks to Gemini.

From our logs (Google Cloud Logging), we have found that most users ask variations of the most common questions that have been answered by humans already many times. This is ideal, as Gemini can focus on making that existing data conversational!

Built with

  • Web/Chrome
  • Google Cloud Platform

Team

By

deen.ai

From

UK