# abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm architecture

> Architecture diagram of the GitHub repository abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm
- Repository: https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm

## Overview

This is a financial-risk intelligence platform combining document ingestion, hybrid/graph retrieval, specialist AI agents, and a React dashboard. The documented user workflow runs from financial documents through indexing and retrieval to analysis and explainable reports. The README supports the broad backend pipeline, while sampled frontend code confirms dashboard rendering and HTTP calls; most Python excerpts are empty or unavailable, so internal backend links are limited to documented relationships.

Main entry points: [`src/services/risk_investigation.py`](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/risk_investigation.py) (Risk investigation), [`src/embeddings/embedding_pipeline.py`](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/embeddings/embedding_pipeline.py) (Embedding generation), [`src/retriever/hybrid_search.py`](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/retriever/hybrid_search.py) (Hybrid retrieval), [`src/agents/supervisor.py`](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/agents/supervisor.py) (Agent supervisor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_dashboard["Risk dashboard<br/>[App.jsx]"]
  node_overview["Overview hook<br/>[useRiskOverview.js]"]
  node_riskcases["Risk cases view<br/>[RiskCases.jsx]"]
  node_customers["Customers view<br/>[Customers.jsx]"]
  node_documents["Documents view<br/>[Documents.jsx]"]
  node_api_client["Risk API client<br/>[riskApi.js]"]
end

subgraph group_api["API and services"]
  node_api["FastAPI"]
  node_risk_service["Risk investigation"]
  node_rag_service["RAG service<br/>[rag_service.py]"]
  node_reports["Report generation<br/>[report_service.py]"]
  node_documents_service["Document service"]
  node_postgres[("PostgreSQL<br/>[postgres.py]")]
  node_redis[("Redis<br/>[redis.py]")]
end

subgraph group_knowledge["Document intelligence"]
  node_ingestion["Document ingestion"]
  node_preprocessing["Document preparation"]
  node_embeddings["Embedding generation"]
  node_retrieval["Hybrid retrieval<br/>[hybrid_search.py]"]
  node_graph_rag["Graph RAG"]
  node_vector_store[("Vector databases")]
  node_knowledge_graph[("Neo4j graph<br/>[neo4j_loader.py]")]
end

subgraph group_analysis["Risk analysis"]
  node_supervisor["Agent supervisor<br/>[supervisor.py]"]
  node_agents["Specialist agents"]
  node_ml_models["Risk ML models"]
  node_llm["LLM generation"]
end

node_analyst(("Risk analyst"))

node_analyst -->|"reviews"| node_dashboard
node_dashboard -->|"renders"| node_overview
node_overview -->|"requests overview"| node_api_client
node_riskcases -->|"requests cases"| node_api_client
node_api_client -->|"calls HTTP API"| node_api
node_documents -.->|"submits documents"| node_documents_service
node_api -.->|"dispatches investigation"| node_risk_service
node_risk_service -.->|"uses retrieval"| node_rag_service
node_documents_service -.->|"processes documents"| node_ingestion
node_ingestion -->|"extracts and chunks"| node_preprocessing
node_preprocessing -->|"prepares for indexing"| node_embeddings
node_embeddings -->|"indexes vectors"| node_vector_store
node_embeddings -->|"builds graph"| node_knowledge_graph
node_rag_service -->|"retrieves context"| node_retrieval
node_retrieval -->|"searches vectors"| node_vector_store
node_graph_rag -->|"queries graph"| node_knowledge_graph
node_retrieval -->|"combines graph search"| node_graph_rag
node_risk_service -.->|"coordinates analysis"| node_supervisor
node_supervisor -->|"dispatches agents"| node_agents
node_agents -.->|"assesses risk"| node_ml_models
node_agents -.->|"uses retrieved evidence"| node_rag_service
node_supervisor -->|"generates answers"| node_llm
node_llm -.->|"produces reports"| node_reports
node_risk_service -.->|"persists risk data"| node_postgres
node_risk_service -.->|"uses cache"| node_redis
node_reports -->|"presents results"| node_dashboard

click node_dashboard "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/App.jsx"
click node_overview "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/hooks/useRiskOverview.js"
click node_riskcases "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/pages/RiskCases.jsx"
click node_customers "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/pages/Customers.jsx"
click node_documents "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/pages/Documents.jsx"
click node_api_client "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/services/riskApi.js"
click node_api "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/api"
click node_risk_service "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/risk_investigation.py"
click node_rag_service "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/rag_service.py"
click node_reports "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/report_service.py"
click node_documents_service "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/document_service.py"
click node_ingestion "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/ingestion"
click node_preprocessing "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/preprocessing"
click node_embeddings "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/embeddings/embedding_pipeline.py"
click node_retrieval "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/retriever/hybrid_search.py"
click node_graph_rag "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/graph_rag"
click node_vector_store "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/vectordb"
click node_knowledge_graph "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/graph_rag/neo4j_loader.py"
click node_supervisor "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/agents/supervisor.py"
click node_agents "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/agents"
click node_ml_models "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/ml_models"
click node_llm "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/llm/response_generator.py"
click node_postgres "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/database/postgres.py"
click node_redis "https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/database/redis.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dashboard,node_overview,node_riskcases,node_customers,node_documents,node_api_client toneBlue
class node_api,node_risk_service,node_rag_service,node_reports,node_documents_service,node_postgres,node_redis toneAmber
class node_ingestion,node_preprocessing,node_embeddings,node_retrieval,node_graph_rag,node_vector_store,node_knowledge_graph toneMint
class node_supervisor,node_agents,node_ml_models,node_llm toneRose
class node_analyst toneIndigo
```

## Components

### User experience

- [Risk dashboard](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Overview hook](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/hooks/useRiskOverview.js): `frontend/src/hooks/useRiskOverview.js`
- [Risk cases view](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/pages/RiskCases.jsx): `frontend/src/pages/RiskCases.jsx`
- [Customers view](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/pages/Customers.jsx): `frontend/src/pages/Customers.jsx`
- [Documents view](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/pages/Documents.jsx): `frontend/src/pages/Documents.jsx`
- [Risk API client](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/frontend/src/services/riskApi.js): `frontend/src/services/riskApi.js`

### API and services

- [FastAPI](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/api): `src/api`
- [Risk investigation](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/risk_investigation.py): `src/services/risk_investigation.py`
- [RAG service](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/rag_service.py): `src/services/rag_service.py`
- [Report generation](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/report_service.py): `src/services/report_service.py`
- [Document service](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/services/document_service.py): `src/services/document_service.py`
- [PostgreSQL](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/database/postgres.py): `src/database/postgres.py`
- [Redis](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/database/redis.py): `src/database/redis.py`

### Document intelligence

- [Document ingestion](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/ingestion): `src/ingestion`
- [Document preparation](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/preprocessing): `src/preprocessing`
- [Embedding generation](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/embeddings/embedding_pipeline.py): `src/embeddings/embedding_pipeline.py`
- [Hybrid retrieval](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/retriever/hybrid_search.py): `src/retriever/hybrid_search.py`
- [Graph RAG](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/graph_rag): `src/graph_rag`
- [Vector databases](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/vectordb): `src/vectordb`
- [Neo4j graph](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/graph_rag/neo4j_loader.py): `src/graph_rag/neo4j_loader.py`

### Risk analysis

- [Agent supervisor](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/agents/supervisor.py): `src/agents/supervisor.py`
- [Specialist agents](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/agents): `src/agents`
- [Risk ML models](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/tree/main/src/ml_models): `src/ml_models`
- [LLM generation](https://github.com/abhishek4209/ai-financial-risk-intelligence-platform-using-graph-rag-multi-agent-llm/blob/main/src/llm/response_generator.py): `src/llm/response_generator.py`

### Other components

- **Risk analyst**

## Connections

- Risk analyst → Risk dashboard: reviews (evidence: `README.md`)
- Risk dashboard → Overview hook: renders (evidence: `frontend/src/App.jsx`)
- Overview hook → Risk API client: requests overview (evidence: `frontend/src/hooks/useRiskOverview.js`)
- Risk cases view → Risk API client: requests cases (evidence: `frontend/src/pages/RiskCases.jsx`)
- Risk API client → FastAPI: calls HTTP API (evidence: `frontend/src/services/riskApi.js`)
- Documents view → Document service: submits documents
- FastAPI → Risk investigation: dispatches investigation
- Risk investigation → RAG service: uses retrieval
- Document service → Document ingestion: processes documents
- Document ingestion → Document preparation: extracts and chunks (evidence: `README.md`)
- Document preparation → Embedding generation: prepares for indexing (evidence: `README.md`)
- Embedding generation → Vector databases: indexes vectors (evidence: `README.md`)
- Embedding generation → Neo4j graph: builds graph (evidence: `README.md`)
- RAG service → Hybrid retrieval: retrieves context (evidence: `README.md`)
- Hybrid retrieval → Vector databases: searches vectors (evidence: `README.md`)
- Graph RAG → Neo4j graph: queries graph (evidence: `README.md`)
- Hybrid retrieval → Graph RAG: combines graph search (evidence: `README.md`)
- Risk investigation → Agent supervisor: coordinates analysis
- Agent supervisor → Specialist agents: dispatches agents (evidence: `README.md`)
- Specialist agents → Risk ML models: assesses risk
- Specialist agents → RAG service: uses retrieved evidence
- Agent supervisor → LLM generation: generates answers (evidence: `README.md`)
- LLM generation → Report generation: produces reports
- Risk investigation → PostgreSQL: persists risk data
- Risk investigation → Redis: uses cache
- Report generation → Risk dashboard: presents results (evidence: `README.md`)
