Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An AI-powered Somali Quran Tafsiir assistant that provides grounded, accurate answers from Somali Quranic interpretation.

License

Notifications You must be signed in to change notification settings

omartood/tafsiir-agent

Repository files navigation

Logo

Somali Tafsiir Agent

A high-performance, AI-driven assistant for Somali Quranic Tafsiir.

Framework AI Model Vector DB License

An AI-powered Somali Quran Tafsiir assistant that provides grounded, accurate answers from Somali Quranic interpretation. Designed for the Somali AI community to make religious knowledge more accessible through state-of-the-art retrieval technology.


πŸ“– Knowledge Base & Support

🧠 Model Memory

The intelligence of this agent is anchored by data/trained.json. This dataset serves as the primary source for creating the model's semantic memory, ensuring that every response is derived from authenticated Somali Tafsiir.

🎯 Supported Scope

  • Current AI Agent Focus: Optimized for Surah Al-Fatiha and the 30th Juz (Juz Amma).
  • System Capability: While the AI agent is currently tuned for these sections, the underlying API and architecture support the entire Holy Quran (all 114 Surahs). You can easily extend the agent's memory to include the full Quran.

✨ Key Features

  • 🎯 Semantic Precision: Leverages gemini-embedding-001 to understand deep religious context and Somali nuances.
  • ⚑ Hybrid Retrieval: Integrates Memvid for a powerful combination of vector similarity and lexical matching, ensuring exact verse lookups.
  • πŸ›‘οΈ Hallucination-Free: strictly grounded in provided tafsiir data. If the information isn't in the context, the agent won't invent it.
  • πŸ“± Premium Experience: A modern, responsive interface with Islamic-inspired aesthetics, smooth micro-animations, and full dark mode support.

πŸ›  Tech Stack


πŸ“ Project Structure

β”œβ”€β”€ data/ # Model memory source (trained.json) & Memvid DB
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ app/ # Chat API logic and application routes
β”‚ └── components/ # UI Components (Sidebar, Messaging, etc.)
β”œβ”€β”€ scripts/ # Ingestion and development tools
└── public/ # Static assets and religious icons

βš™οΈ Getting Started

1. Prerequisites

2. Setup

git clone https://github.com/your-repo/tafsiir-agent.git
cd tafsiir-agent
npm install

3. Environment

Create a .env file in the root:

GOOGLE_API_KEY=your_gemini_api_key_here

4. Initialize Memory

Process the trained.json data into the high-speed Memvid vector database:

npm run ingest

5. Launch

npm run dev

πŸ“‘ Modern Quran API

The platform includes a robust Public REST API for accessing the Quran (Arabic + Somali translation) programmatically.

Endpoint Action
GET /api/quran/surahs List all 114 Surahs
GET /api/quran?surah=X Get all verses of Surah X
GET /api/quran?surah=X&ayah=Y Get single verse (Surah X, Ayah Y)

Full documentation available at /docs in the running application.


🀝 Contributing

Created for the Somali AI Community. Help us bridge tradition and technology.

πŸ“ License

Distributed under the MIT License. See LICENSE for more information.

About

An AI-powered Somali Quran Tafsiir assistant that provides grounded, accurate answers from Somali Quranic interpretation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /