You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Mohsen Taba c2d0d5bf54 Refactor code by commenting out unused imports and decorators in various modules to improve clarity and maintainability. Update the default system prompt with strict rules for brevity and confidence in responses, enhancing user interaction guidelines. 5 days ago
config Update environment configurations, modify Docker settings, and add new scripts for data processing. Adjusted Jenkinsfile for deployment, updated .gitignore, and refined agent instructions for improved user interaction. 1 week ago
docker Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
docs Add documentation for collection naming strategy and incremental vector synchronization. Implement background task for syncing data from PostgreSQL to Qdrant, ensuring zero duplicate embeddings and crash resilience. Update API routes to trigger synchronization process. 6 days ago
langfuse Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
scripts Update environment configurations, modify Docker settings, and add new scripts for data processing. Adjusted Jenkinsfile for deployment, updated .gitignore, and refined agent instructions for improved user interaction. 1 week ago
src Refactor code by commenting out unused imports and decorators in various modules to improve clarity and maintainability. Update the default system prompt with strict rules for brevity and confidence in responses, enhancing user interaction guidelines. 5 days ago
tests Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
.dockerignore Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
.env.example Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
.gitignore Update environment configurations, modify Docker settings, and add new scripts for data processing. Adjusted Jenkinsfile for deployment, updated .gitignore, and refined agent instructions for improved user interaction. 1 week ago
DOCKER_TESTING_README.md Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
Dockerfile Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
Jenkinsfile Update environment configurations, modify Docker settings, and add new scripts for data processing. Adjusted Jenkinsfile for deployment, updated .gitignore, and refined agent instructions for improved user interaction. 1 week ago
PRODUCTION_READINESS_REPORT.md Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
README.md Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
docker-compose.yml Update docker-compose.yml to configure networking and DNS settings, replacing the previous commented-out sections with active configurations for the imam-reza-network. 1 week ago
entrypoint.sh Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
imam-reza.session.sql Add new SQL file for wiki content retrieval and refactor API routes to implement a new background task for syncing Wiki data to Qdrant. Remove deprecated global embedding sync functionality and introduce a dedicated sync process for Wiki content, enhancing the overall data synchronization strategy. 5 days ago
out.md Refactor code by commenting out unused imports and decorators in various modules to improve clarity and maintainability. Update the default system prompt with strict rules for brevity and confidence in responses, enhancing user interaction guidelines. 5 days ago
pytest.ini Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
requirements-dev.txt Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
requirements.txt Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago
runner.sh Add initial project structure with Docker support, environment configurations, and basic application setup 1 week ago

README.md

Islamic Scholar Agent

A production-ready Islamic knowledge agent built with Agno framework, featuring RAG (Retrieval-Augmented Generation) capabilities for answering questions based on Islamic texts and knowledge.

Project Structure

├── src/                          # Production source code
│   ├── agents/                   # Agent implementations
│   ├── knowledge/                # Knowledge base & RAG pipeline
│   ├── models/                   # LLM integrations
│   ├── api/                      # FastAPI routes
│   ├── core/                     # Core configurations
│   └── utils/                    # Utility functions
├── data/                         # Data files
│   ├── raw/                      # Original data files
│   ├── processed/                # Processed/cleaned data
│   └── embeddings/               # Pre-computed embeddings
├── scripts/                      # Utility scripts
├── tests/                        # Test files
├── config/                       # Configuration files
├── docker/                       # Docker files
└── docs/                         # Documentation

Features

  • Islamic Knowledge Focus: Specialized agent for Islamic knowledge queries
  • RAG Pipeline: Retrieval-augmented generation using vector databases
  • Multiple Vector Stores: Support for Qdrant and PostgreSQL with PgVector
  • Modular Architecture: Clean separation of concerns
  • Production Ready: Docker support, health checks, logging
  • Comprehensive Testing: Unit and integration tests

Quick Start

  1. Setup Environment:

    cp .env.example .env
    # Edit .env with your API keys
    
  2. Install Dependencies:

    pip install -r requirements.txt
    
  3. Setup Vector Database:

    python scripts/setup_vectordb.py
    
  4. Ingest Knowledge Data:

    python scripts/ingest_excel.py
    
  5. Run Application:

    python src/main.py
    

Development

Running Tests

pytest tests/

Qdrant Connection Test

Test Qdrant vector database connectivity:

python test_qdrant_connection.py

For detailed documentation see: Qdrant Connection Test Guide

Health Check

python scripts/health_check.py

Docker Development

cd docker
docker-compose -f docker-compose.dev.yml up

API Usage

Health Check

curl http://localhost:8081/health

Chat Endpoint

curl -X POST "http://localhost:8081/chat" \
     -H "Content-Type: application/json" \
     -d '{"message": "What is the importance of Islamic knowledge?"}'

Configuration

  • Development: config/development.env
  • Production: config/production.env
  • Models: config/models.yaml

Documentation

License

This project is licensed under the MIT License.