IjtihadAI — Arabic RAG Chatbot Toolkit

Feb 16, 2025 min read

Repo: https://github.com/has2809/IjtihadAI

Overview

IjtihadAI is an open-source Arabic retrieval-augmented Q&A (RAG) system designed to answer questions using a local scraped knowledge base. The goal is to generate answers that stay grounded in retrieved context, and return a disclaimer when relevant sources are not found.

Data Sources

  • Dorar.net — lecture-style fiqh content (primary knowledge base)
  • IslamQA and ifta.ly — used for evaluation only (Q&A-style data)

Pipeline (high level)

  • Scraping & preparation → structured JSONL data
  • Embeddings + vector database → local Chroma store
  • Retrieval-based Q&A → LangChain retrieval chain
  • Interfaces → CLI + Gradio web UI
  • Evaluation → synthetic and scraped Q&A evaluation scripts with automated labeling prompts

Key Features

  • Automated scraping (Selenium/ChromeDriver)
  • Local vector DB creation and persistence
  • Retrieval-based answering constrained to retrieved context
  • Evaluation pipeline (synthetic + external Q&A sources)
  • Gradio web app with optional API key entry

Disclaimer

This project is for demonstration and educational purposes only. It is not an official fatwa or authoritative ruling system. Answers are based strictly on scraped sources and may be incomplete; consult qualified scholars for official guidance.

How to Run

See the repository README for full setup and usage steps:
https://github.com/has2809/IjtihadAI