Skip to content

NukaNarendra/AuditGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🕵️ AuditGraph: Autonomous Corporate Due Diligence Agent

Author: Venkata Narendra Nuka

AuditGraph is an advanced Agentic GraphRAG (Retrieval-Augmented Generation) system designed to automate forensic accounting and corporate due diligence.

It combines unstructured financial data (PDF contracts, 10-K reports, internal emails) with a Neo4j Knowledge Graph to detect complex fraud patterns such as:

  • Related-party transactions
  • Shell company fund transfers
  • Hidden ownership structures

🚀 Key Features

🔗 Multi-Modal GraphRAG Architecture

  • Goes beyond standard vector search by modeling explicit relationships

  • Tracks:

    • Ownership structures
    • Board memberships
    • Financial transfers
  • Enables multi-hop reasoning across disconnected datasets


🧠 Cognitive Data Engineering

  • Powered by NVIDIA Nemotron-3-Super-120B for enterprise-grade reasoning
  • Uses explicit Reasoning Budgets ("Thinking") to reduce hallucinations
  • Processes complex PDFs using pypdf
  • Converts raw text into structured JSON ontologies based on custom schemas

🤖 Autonomous LangGraph Agent

  • Features an autonomous forensic accounting chatbot
  • Dynamically generates and executes Cypher queries
  • Performs step-by-step reasoning over graph evidence
  • Produces explainable forensic investigation reports

🛡️ Robust Extraction Pipeline

  • Handles inconsistent LLM outputs safely

  • Uses:

    • AST parsing
    • Strict schema prompts
    • Validation mechanisms
  • Ensures zero pipeline breakage during ingestion


📊 Interactive Dashboard

Built with Streamlit, featuring:

  • Real-time Neo4j graph metrics
  • Autonomous chatbot for graph querying
  • Analyst-friendly interface
  • Interactive investigation workflows

🛠️ Technology Stack

Category Tools Used
Language Python 3.10+
Graph Database Neo4j AuraDB (Cloud)
LLM Engine NVIDIA Nemotron (langchain-nvidia-ai-endpoints)
Orchestration LangChain & LangGraph
Data Processing PyPDF
Frontend Streamlit

📂 Project Structure

AuditGraph/
│
├── app/
│   └── ui.py                  # Streamlit Dashboard UI
│
├── data/
│   └── raw/
│       ├── contracts/
│       ├── financials/
│       └── internal/
│
├── src/
│   ├── graph/                 # Neo4j connection & schema logic
│   │   ├── builder.py
│   │   ├── neo4j_client.py
│   │   └── schema.py
│   │
│   ├── ingestion/             # PDF reading & NVIDIA JSON extraction
│   │   ├── loader.py
│   │   └── parser.py
│   │
│   ├── orchestrator/          # Autonomous Agent Logic
│   │   ├── langgraph_bot.py
│   │   └── tools.py
│   │
│   └── config.py              # Environment variables
│
├── tests/
├── .env
├── main.py                    # Pipeline execution script
└── requirements.txt

⚙️ Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/yourusername/AuditGraph.git
cd AuditGraph

2️⃣ Create Virtual Environment

python -m venv .venv

# Windows
.venv\Scripts\activate

# Linux / macOS
source .venv/bin/activate

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Setup Neo4j AuraDB (Cloud)

  1. Open the Neo4j Aura Console.
  2. Create a Free instance.
  3. Save the generated password.
  4. Copy your connection URI.

Example:

neo4j+s://<instance-id>.databases.neo4j.io

5️⃣ Configure Environment Variables

Create a .env file in the project root:

NVIDIA_API_KEY=your_nvidia_api_key_here

NEO4J_URI=neo4j+s://<your-id>.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your_auradb_password

🏃 Running the System

▶️ Step 1: Ingest Documents

Add PDF files to:

data/raw/

Run:

python main.py

The system will:

  • Parse PDFs using PyPDF
  • Extract structured entities via NVIDIA Nemotron
  • Build the Neo4j knowledge graph
  • Store relationships in AuraDB

📊 Step 2: Launch Dashboard

streamlit run app/ui.py

Open:

http://localhost:8501

to interact with the autonomous forensic investigation agent.


🧠 Use Cases

AuditGraph supports:

  • Corporate due diligence
  • Fraud detection
  • Financial investigations
  • Risk analysis
  • Compliance auditing
  • Related-party transaction discovery
  • Ownership structure analysis

⚠️ Notes

  • Ensure your Neo4j AuraDB instance is Running before ingestion.
  • Keep your .env file private and excluded from version control.
  • Large documents (100+ page 10-K reports) may require several minutes for deep reasoning and extraction.

🤝 Contributing

Pull requests are welcome.

For major changes, please open an issue first to discuss proposed modifications.


📜 License

MIT License


If you found this project useful, consider starring the repository!

About

AuditGraph is an advanced Agentic GraphRAG (Retrieval-Augmented Generation) system designed to automate forensic accounting and corporate due diligence. It combines unstructured financial data (PDF contracts, 10-K reports, internal emails) with a Neo4j Knowledge Graph to detect complex fraud patterns.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages