Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GreenLedger

ESG Obligation Tracking from Loan Agreements

GreenLedger turns loan agreements into living ESG systems — extracting, tracking, and verifying sustainability obligations with AI.

GreenLedger

🔗 Quick Links

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

Features

  • 📄 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

Tech Stack

  • Frontend: Electron + React + TypeScript + Tailwind CSS
  • Backend: Python + FastAPI + SQLite
  • RAG: ChromaDB + BGE Embeddings
  • LLM: Ollama + Llama 3.2 (local inference)

Prerequisites

  • Python 3.11 (exact - 3.14 is not supported due to ML package compatibility)
  • Node.js 18+
  • Ollama (for local LLM inference)

Quick Start

1. Install Ollama and Llama 3.2

# Install Ollama from https://ollama.ai
# Then pull the Llama 3.2 model
ollama pull llama3.2:latest

2. Set Up Backend

cd backend
python -m venv venv
venv\Scripts\activate  # Windows
# source venv/bin/activate  # Linux/Mac

pip install -r requirements.txt
python run.py

3. Set Up Frontend

cd frontend
npm install
npm run dev

4. Open GreenLedger

The Electron app will launch automatically at http://localhost:5173

Usage

Upload Documents

  1. Go to Upload page
  2. Drag & drop PDF loan agreements
  3. Optionally add Loan ID and Borrower metadata
  4. Wait for processing to complete

View ESG Clauses

  1. Go to ESG Clauses page
  2. Filter by category (Environmental/Social/Governance)
  3. Review and approve/reject extracted clauses

Ask Questions

  1. Go to Ask AI page
  2. Type natural language questions like:
    • "What ESG targets does this loan require?"
    • "Which loans require carbon reporting?"
  3. All answers include source citations

Track Compliance

  1. Upload ESG metrics via CSV
  2. View compliance status on Dashboard
  3. Check Alerts for issues

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                     ELECTRON + REACT UI                         │
├─────────────────────────────────────────────────────────────────┤
│                     FASTAPI REST API                            │
├─────────────────────────────────────────────────────────────────┤
│  PDF Parser → Chunker → ESG Extractor → Vector Store → RAG     │
├─────────────────────────────────────────────────────────────────┤
│         SQLite           │         ChromaDB                     │
└─────────────────────────────────────────────────────────────────┘

Anti-Hallucination Guarantees

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

Sample Data

A synthetic loan agreement with ESG clauses is included in sample_data/.

License

MIT License

Authors

Built for the LMA Edge Hackathon 2026.

Dhevenddra - LinkedIn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages