ESG Obligation Tracking from Loan Agreements
GreenLedger turns loan agreements into living ESG systems — extracting, tracking, and verifying sustainability obligations with AI.
| Resource | Link |
|---|---|
| 🎬 Overview Video | Watch on Vimeo |
| 🖥️ Demo Video | Watch on Vimeo |
| 💻 GitHub Repo | github.com/Dhevenddra/green-ledger |
| 📖 API Docs | greenledger-docs.vercel.app |
- 📄 Document Ingestion - Upload PDF loan agreements with automatic text extraction
- 🔍 ESG Clause Extraction - AI-powered identification of Environmental, Social, and Governance clauses
- 💬 RAG Chat Interface - Natural language queries with mandatory source citations
- 📊 Compliance Dashboard - Track obligations, deadlines, and compliance status
⚠️ Alert System - Automatic alerts for breaches, deadlines, and missing reports- 📈 Portfolio View - Aggregate ESG insights across all loans
- Frontend: Electron + React + TypeScript + Tailwind CSS
- Backend: Python + FastAPI + SQLite
- RAG: ChromaDB + BGE Embeddings
- LLM: Ollama + Llama 3.2 (local inference)
- Python 3.11 (exact - 3.14 is not supported due to ML package compatibility)
- Node.js 18+
- Ollama (for local LLM inference)
# Install Ollama from https://ollama.ai
# Then pull the Llama 3.2 model
ollama pull llama3.2:latestcd backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/Mac
pip install -r requirements.txt
python run.pycd frontend
npm install
npm run devThe Electron app will launch automatically at http://localhost:5173
- Go to Upload page
- Drag & drop PDF loan agreements
- Optionally add Loan ID and Borrower metadata
- Wait for processing to complete
- Go to ESG Clauses page
- Filter by category (Environmental/Social/Governance)
- Review and approve/reject extracted clauses
- Go to Ask AI page
- Type natural language questions like:
- "What ESG targets does this loan require?"
- "Which loans require carbon reporting?"
- All answers include source citations
- Upload ESG metrics via CSV
- View compliance status on Dashboard
- Check Alerts for issues
┌─────────────────────────────────────────────────────────────────┐
│ ELECTRON + REACT UI │
├─────────────────────────────────────────────────────────────────┤
│ FASTAPI REST API │
├─────────────────────────────────────────────────────────────────┤
│ PDF Parser → Chunker → ESG Extractor → Vector Store → RAG │
├─────────────────────────────────────────────────────────────────┤
│ SQLite │ ChromaDB │
└─────────────────────────────────────────────────────────────────┘
GreenLedger is designed for bank-grade reliability:
- ✅ Rule-based first: Keywords trigger LLM, not the other way around
- ✅ Mandatory citations: Every RAG answer cites source document + page
- ✅ Explicit refusal: "INSUFFICIENT DATA — CANNOT ANSWER" when context is missing
- ✅ Confidence scoring: Low-confidence extractions flagged for human review
- ✅ Deterministic compliance: No LLM in compliance calculations
A synthetic loan agreement with ESG clauses is included in sample_data/.
MIT License
Built for the LMA Edge Hackathon 2026.
Dhevenddra - LinkedIn