- Project Baitak: Sovereign Banking Intelligence Suite
Project Baitak: Sovereign Banking Intelligence Suite
Codename: Project Baitak (Ψ΅Ψ§ΩΨΉ Ψ§ΩΨ°ΩΨ§Ψ‘ Ψ§ΩΩ
Ψ§ΩΩ)
Status: Alpha Release
Version: 1.0.0
License: MIT
Vision: Sovereign Intelligence for the GCC Banking Sector
Project Baitak is a sophisticated, self-learning banking intelligence platform designed to unlock actionable insights from the GCC's largest Islamic financial institutions. Using publicly available financial data from Kuwait Finance House (KFH) and other regional banks, Baitak synthesizes 12 specialized machine learning models into a unified Orchestrator Agent that generates dual-language (English/Arabic) strategic insights.
The platform is built for financial analysts, risk managers, and institutional investors who need real-time, AI-driven intelligence on Islamic banking performance, regulatory compliance, and market dynamics in the GCC.
Core Architecture
1. 12 Specialized Intelligence Models
Baitak orchestrates 12 AutoML models across four domains:
Retail Intelligence (3 models)
- Churn Prediction: Identifies high-risk customer segments using transaction patterns and engagement metrics.
- Customer Lifetime Value (CLV): Forecasts long-term customer profitability based on tenure, revenue, and financing exposure.
- Product Propensity: Predicts likelihood of customer adoption for Murabaha (cost-plus financing) and Wakala (agency) products.
Risk Intelligence (3 models)
- Credit Scoring (Islamic Finance Compliant): Assesses default risk while adhering to Shariah principles (no interest-based penalties).
- Fraud Detection (Anomaly): Identifies suspicious transaction patterns using Isolation Forest algorithms.
- CBK 2026 Regulatory Stress-Testing: Simulates capital adequacy ratios under adverse market scenarios per Central Bank of Kuwait requirements.
Operational Intelligence (2 models)
- Demand Forecasting (Branch Liquidity): Predicts daily liquidity needs across branch networks based on customer footfall and seasonality.
- Sales Anomaly Detection: Flags unusual sales volumes or product mix shifts that may indicate operational issues or fraud.
Market Intelligence (2 models)
- Sukuk Yield Prediction: Forecasts Islamic bond yields based on oil prices, market indices, and global interest rates.
- Real Estate Portfolio Risk: Assesses risk exposure for KFH's significant real estate financing portfolio.
Institutional Bridge (1 model)
- AgenThink Institutional Stub: Placeholder for future three-tier ecosystem (Personal β Business β Institutional).
2. Orchestrator Agent
The Meta-Orchestrator is a Python-based intelligent router that:
- Analyzes incoming queries to determine which models to invoke.
- Retrieves historical insights from a ChromaDB vector database for context.
- Synthesizes model outputs with LLM-generated analysis.
- Generates dual-language insights (English & Arabic) using Gemini API.
User Query
β
Meta-Orchestrator (Intent Classification)
β
Model Selection (Retail/Risk/Ops/Market)
β
ChromaDB Memory Retrieval
β
Model Inference
β
Gemini LLM (Dual-Language Synthesis)
β
Output: English + Arabic Insight
3. Memory Layer
ChromaDB stores quarterly insights and KPIs, enabling the Orchestrator to:
- Recall historical trends ("What was NFM in Q3 2025?").
- Identify anomalies ("Cost-to-Income improved by 140 bpsβwhy?").
- Support multi-turn conversations with persistent context.
Key Financial KPIs Tracked
Based on KFH 2024/2025 Annual Reports:
| KPI | FY 2024 | FY 2025 | Y-o-Y Change |
|---|---|---|---|
| Net Profit (Shareholders) | KD 601.8M | KD 632.1M | +5.0% |
| Net Financing Income | KD 1,147.0M | KD 1,279.2M | +11.5% |
| Cost-to-Income Ratio | 35.46% | 34.06% | -140 bps β |
| Total Assets | KD 36.7B | ~KD 38.5B | +5% |
| Capital Adequacy Ratio | 19.89% | ~20% | Stable |
| EPS (Adjusted) | 33.68 Fils | 35.64 Fils | +5.8% |
Installation & Setup
Prerequisites
- Python 3.9+
- pip or uv package manager
- Gemini API key (for LLM insights)
Quick Start
# Clone the repository
git clone https://github.com/yourusername/Project-Baitak-Intelligence.git
cd Project-Baitak-Intelligence
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY
# Train models (one-time)
python3 models/retail/retail_models.py
python3 models/risk/risk_models.py
python3 models/operations/operations_models.py
python3 models/market/market_models.py
# Run the Orchestrator Agent
export GEMINI_API_KEY="your_key_here"
python3 src/orchestrator/orchestrator_agent.py
Example Queries
from src.orchestrator.orchestrator_agent import OrchestratorAgent
agent = OrchestratorAgent()
# Query 1: NFM Trend Analysis
response = agent.process_query("What is the current NFM trend and how does it relate to digital transformation?")
print(f"English: {response['english_insight']}")
print(f"Arabic: {response['arabic_insight']}")
# Query 2: Churn Risk
response = agent.process_query("Predict customer churn for a high-balance customer.")
print(f"English: {response['english_insight']}")
# Query 3: Regulatory Compliance
response = agent.process_query("Summarize the latest insights on KFH's cost-to-income ratio.")
print(f"English: {response['english_insight']}")
Project Structure
Project-Baitak-Intelligence/
βββ models/
β βββ retail/
β β βββ retail_models.py # Churn, CLV, Propensity
β β βββ retail_suite.pkl # Trained models
β βββ risk/
β β βββ risk_models.py # Credit, Fraud, Stress-Testing
β β βββ risk_suite.pkl
β βββ operations/
β β βββ operations_models.py # Liquidity, Sales Anomaly
β β βββ operations_suite.pkl
β βββ market/
β βββ market_models.py # Sukuk, Real Estate
β βββ market_suite.pkl
βββ src/
β βββ memory/
β β βββ chroma_memory.py # ChromaDB vector store
β βββ orchestrator/
β β βββ orchestrator_agent.py # Meta-Orchestrator + LLM
β βββ __init__.py
βββ data/
β βββ chroma_db/ # ChromaDB persistent storage
βββ docs/
β βββ kfh_research_summary.md # KFH 2024/2025 analysis
β βββ architecture.md # Detailed architecture
βββ requirements.txt # Python dependencies
βββ .env.example # Environment template
βββ README.md # This file
βββ LICENSE # MIT License
Dependencies
See requirements.txt for the full list. Key packages:
scikit-learn==1.8.0 # AutoML models
pandas==2.0+ # Data manipulation
numpy==1.24+ # Numerical computing
chromadb==0.3+ # Vector database
google-generativeai==0.3+ # Gemini API
Configuration
Environment Variables
Create a .env file in the project root:
# Gemini API Configuration
GEMINI_API_KEY=your_gemini_api_key_here
# Optional: Data paths
DATA_PATH=/home/ubuntu/Project-Baitak-Intelligence/data
MODELS_PATH=/home/ubuntu/Project-Baitak-Intelligence/models
# Optional: Logging
LOG_LEVEL=INFO
Usage Examples
Example 1: Retrieve Historical Insights
from src.memory.chroma_memory import BaitakMemory
memory = BaitakMemory()
# Query for NFM insights
results = memory.query_insights("What was the Net Financing Margin in 2025?", n_results=5)
for doc, meta in zip(results["documents"], results["metadatas"]):
print(f"Insight: {doc}, Metadata: {meta}")
Example 2: Run Model Predictions
from models.retail.retail_models import RetailIntelligence
ri = RetailIntelligence()
ri.train_models() # Train on synthetic data
# Predict churn for a customer
synthetic_customer = {
'avg_balance': 6000,
'transaction_count': 20,
'digital_usage_score': 0.8,
'murabaha_active': 1
}
churn_prediction = ri.models['churn_prediction'].predict([list(synthetic_customer.values())])
print(f"Churn Risk: {churn_prediction[0]}")
Example 3: Generate Dual-Language Insights
from src.orchestrator.orchestrator_agent import OrchestratorAgent
agent = OrchestratorAgent()
response = agent.process_query("Tell me about KFH's digital transformation initiatives.")
print(f"π¬π§ English: {response['english_insight']}")
print(f"πΈπ¦ Arabic: {response['arabic_insight']}")
Roadmap
Phase 1 (Current)
- β 12 AutoML models trained on synthetic data
- β Orchestrator Agent with ChromaDB memory
- β Dual-language insight generation
Phase 2 (Planned)
- Real-time data ingestion from KFH API (if available)
- Advanced NLP for intent classification
- Dashboard for visualization
- REST API for third-party integration
Phase 3 (Future)
- Integration with AgenThink Institutional tier
- Multi-bank support (Ahli United, NBK, etc.)
- Regulatory compliance reporting
- Predictive alerts for risk events
Data Sources
Primary Research
- KFH 2024 Annual Report: Comprehensive financial statements, governance, and strategy.
- KFH FY-2025 Earnings Presentation: Latest quarterly results (Feb 2026).
- Boursa Kuwait: Market data, trading volumes, and indices.
- Central Bank of Kuwait (CBK): Regulatory guidelines and monetary policy.
Synthetic Data
All 12 models are trained on synthetically generated data to ensure:
- Privacy compliance (no real customer data)
- Reproducibility for testing
- Scalability for different scenarios
Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m 'Add your feature'). - Push to the branch (
git push origin feature/your-feature). - Open a Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Disclaimer
Project Baitak is for educational and research purposes only. The insights generated are based on publicly available data and synthetic models. They should not be used as the sole basis for investment or financial decisions. Always consult with qualified financial advisors before making any investment decisions.
Contact & Support
For questions, issues, or suggestions, please open an issue on GitHub or contact the development team.
Project Baitak β Sovereign Intelligence for the GCC Banking Sector π¦ π