The ISDBI Agent is an intelligent system designed to enhance, analyze, and provide insights into Islamic finance standards and documents, leveraging vector database technology and RAG (Retrieval Augmented Generation).
- Standards enhancement recommendations
- Compliance verification for financial documents
- Product design guidance for Islamic financial instruments
- Interactive querying of Islamic finance knowledge base
- Vector database for efficient retrieval of financial standards
There are two ways to set up and run this project:
-
Clone the repository:
git clone <repository-url> cd isdbi-agent
-
Create and activate a virtual environment:
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the root directory with the following:GEMINI_API_KEY=your-gemini-api-key ISLAMIC_FINANCE_API_URL=url-to-fastapi-serverNote: The
ISLAMIC_FINANCE_API_URLshould point to the FastAPI server that connects to and performs RAG operations on the vector graph database(NEO4J). -
Run the application:
streamlit run ui/app.py
-
Pull the Docker image:
docker pull ellzo/isdbi-agent
-
Access the application: Open your browser and navigate to
http://localhost:8501
The repository includes a Jupyter notebook (createNeoDB.ipynb) that demonstrates how to create the Neo4j graph database of Islamic financial books. The data source for this notebook is available at this Google Drive link.
To use the notebook:
- Ensure you have Jupyter installed
- Open the notebook:
jupyter notebook createNeoDB.ipynb - Follow the instructions within the notebook to create the graph database
/agents.py: Core agent functionality/enhancement.py: Standards enhancement logic/retreiver.py: Vector database retrieval functions/server.py: FastAPI server implementation/ui/: Streamlit user interface/components/: Modular components/documentation/: Project documentation/notebooks/: Jupyter notebooks including embedding and graph creation/vector_db_storage/: Storage for vector embeddings
- Standards Enhancement: Analyze and propose improvements to AAOIFI standards
- Compliance Verification: Check financial documents for compliance with Islamic finance principles
- Product Design: Design Shariah-compliant financial products
- Financial Standards Journaling: Process and generate journal entries based on Islamic finance standards
Contributions are welcome! Please feel free to submit a Pull Request.
[Include appropriate license information]