🟪 GitHub Repo: https://github.com/0marwa/elysium-chatbot

AI Coran Mohammadi Chatbot

→ Idea: Develop a chatbot that answers Coran-related questions only, using the ChatGPT API, and that simply doesn’t provide an answer when asked an unrelated question.


Typical questions it can handle

Type of question Example Response
Verse requests What is ayah 3 of surate al Kursi Return the verse (only in arabic?)
Tafsir request Explain ayah 3 of sourate al fatiha Return tafsir (in desired language)
i3rab request What’s the i3rab of surah al fatiha ayah 4 Return i3rab (in desired language)
metadata how many sajdahs is there in the Quran Return metadata (count)
Invalid questions Anything unrelated Neutral refusal: “Sorry, I only respond to Quran-related questions”
Any related question What does Islam say about patience Intelligent answer cross-referenced with the DB

Useful links:

• Languages

→ React CS: https://react.dev/

→ React notes (mine): ‣

→ ML py CS: https://www.datacamp.com/cheat-sheet/scikit-learn-cheat-sheet-python-machine-learning

→ py CS global: https://www.kaggle.com/discussions/getting-started/154462

→ HTLM CS: https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Cheatsheet

• APIs

→ ChatGPT API: https://www.chatbase.co/blog/chatgpt-api

→ Gemini Pro API: https://aistudio.google.com/app/apikey

→ Fine-tuning (later): https://developers.google.com/machine-learning/crash-course/llm/tuning

https://www.geeksforgeeks.org/deep-learning/fine-tuning-large-language-model-llm/


Implementation plan(s) :

Phase 1 :

• Strict prompt to Gemini Pro’s API :

<aside> 📖

"You are an expert in Moroccan Quran interpretation, specifically the Mohammadi school. You have deep knowledge of:
- Quranic verses and their Mohammadi interpretation
- Hadiths relevant to Moroccan Islamic tradition  
- I'rab (grammar analysis) of Quranic verses
- Waqf (pause marks) and Sajda (prostration) positions
- Moroccan Islamic scholars and imams

Please answer the following question based solely on this knowledge. If the question is not related to these Islamic topics, politely decline and explain you only answer Quran-related questions.

Question: [user question]"

</aside>

Phase 2 :

• Integrate dataset and do hybrid LLM + data (RAG) Retrieval Augmented Generation :

Phase 3 (optional but nice): Fine-tuned model + Database


Gemini Pro AI Implementation

For real AI-powered repsonses & question filtering

Steps to follow:

  1. Get the Gemini API key