Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AEVAR — GraphRAG Financial Audit Pipeline

Live demo: Streamlit app · Stack: Python, Neo4j, Pydantic, Gemini, Streamlit

Enterprise-grade financial ingestion and governance engine. Ingests corporate transaction feeds, enforces Pydantic validation, cross-references anomalies against a Neo4j knowledge graph (GraphRAG), and produces typed executive risk briefings via Gemini.

Distinguishes clerical anomalies (routine data-entry mistakes) from active fraud risks (unmapped billing injection attacks).


Architecture

[ Raw Invoices JSON ]
        │
        ▼
┌──────────────────────────┐
│  1. Ingestion Engine     │ ──► Validated clean ledger
│  (Pydantic validation)   │
└──────────────────────────┘
        │ (anomalies)
        ▼
┌──────────────────────────┐
│  2. Quarantine Registry  │ ──► quarantined_invoices.json
└──────────────────────────┘
        │
        ▼
┌──────────────────────────┐
│  3. Neo4j GraphRAG       │ ──► Vendor/contract context
└──────────────────────────┘
        │
        ▼
┌──────────────────────────┐
│  4. Gemini AI Agent      │ ──► Typed executive briefing
└──────────────────────────┘
        │
        ▼
┌──────────────────────────┐
│  5. Streamlit Dashboard  │ ──► Live audit telemetry
└──────────────────────────┘
  1. Ingestion — Pydantic-gated invoice parsing; valid rows → clean ledger, failures → quarantine.
  2. GraphRAG (Neo4j) — Maps quarantined entities to contract nodes, vendor risk scores, and rogue-entity detection.
  3. AI Agent (Gemini) — Low-temperature, schema-constrained executive briefings (risk score, fraud exposure, remediation steps).
  4. Dashboard (Streamlit) — Cached telemetry UI with async audit triggers.

Project Layout

AEVAR/
├── config/settings.py           # Paths & constants
├── data/{raw,processed,quarantine}/
├── src/
│   ├── ingestion/               # Parser + Pydantic schemas
│   ├── analytics/               # Neo4j graph store + reporter
│   ├── agents/auditor.py        # Gemini structured-output agent
│   └── app/dashboard.py         # Streamlit UI
├── seed.py                      # Neo4j seed data
├── requirements.txt
└── .env.example

Getting Started

Prerequisites

  • Python 3.11+
  • Neo4j (local or Aura)
  • Google Gemini API key

Setup

git clone https://github.com/hansitvarshney/AEVAR.git
cd AEVAR

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

cp .env.example .env            # add GEMINI_API_KEY + Neo4j credentials
python seed.py                  # populate knowledge graph
streamlit run src/app/dashboard.py

AI Agent Output Schema

The auditor agent returns a strictly typed ExecutiveBriefingSchema:

class ExecutiveBriefingSchema(BaseModel):
    risk_assessment_score: float       # 0.0 (safe) → 1.0 (critical)
    executive_summary: str
    fraud_exposure_usd: float
    critical_action_items: list[str]
    requires_immediate_freeze: bool

License

MIT — see LICENSE.

About

Autonomous financial governance and GraphRAG audit pipeline using Neo4j, Pydantic data validation, and the native Google GenAI SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages