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
-
Goes beyond standard vector search by modeling explicit relationships
-
Tracks:
- Ownership structures
- Board memberships
- Financial transfers
-
Enables multi-hop reasoning across disconnected datasets
- 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
- 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
-
Handles inconsistent LLM outputs safely
-
Uses:
- AST parsing
- Strict schema prompts
- Validation mechanisms
-
Ensures zero pipeline breakage during ingestion
Built with Streamlit, featuring:
- Real-time Neo4j graph metrics
- Autonomous chatbot for graph querying
- Analyst-friendly interface
- Interactive investigation workflows
| 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 |
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
git clone https://github.com/yourusername/AuditGraph.git
cd AuditGraphpython -m venv .venv
# Windows
.venv\Scripts\activate
# Linux / macOS
source .venv/bin/activatepip install -r requirements.txt- Open the Neo4j Aura Console.
- Create a Free instance.
- Save the generated password.
- Copy your connection URI.
Example:
neo4j+s://<instance-id>.databases.neo4j.io
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_passwordAdd PDF files to:
data/raw/
Run:
python main.pyThe system will:
- Parse PDFs using PyPDF
- Extract structured entities via NVIDIA Nemotron
- Build the Neo4j knowledge graph
- Store relationships in AuraDB
streamlit run app/ui.pyOpen:
http://localhost:8501
to interact with the autonomous forensic investigation agent.
AuditGraph supports:
- Corporate due diligence
- Fraud detection
- Financial investigations
- Risk analysis
- Compliance auditing
- Related-party transaction discovery
- Ownership structure analysis
- Ensure your Neo4j AuraDB instance is Running before ingestion.
- Keep your
.envfile private and excluded from version control. - Large documents (100+ page 10-K reports) may require several minutes for deep reasoning and extraction.
Pull requests are welcome.
For major changes, please open an issue first to discuss proposed modifications.
MIT License
⭐ If you found this project useful, consider starring the repository!