# maheshm-01/multimodel_graph_rag architecture

> Architecture diagram of the GitHub repository maheshm-01/multimodel_graph_rag, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maheshm-01/multimodel_graph_rag
- Repository: https://github.com/maheshm-01/multimodel_graph_rag

## Overview

This is a multimodal Graph RAG platform: users upload documents or ask grounded questions through a web dashboard or API. Ingestion loads and chunks documents, extracts graph entities, embeds content, and indexes it; query handling routes intent, retrieves across hybrid channels, reranks evidence, and synthesizes cited answers. The graph preserves the documented visualizer and job-status capabilities. Some subsystem links rely on README or SOURCE INDEX references because their implementations were not excerpted; those limits are reflected by omitted or dashed edges.

Main entry points: [`src/workflows/ingestion_pipeline.py`](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/workflows/ingestion_pipeline.py) (Ingestion Workflow), [`src/api/v1/endpoints/query.py`](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/v1/endpoints/query.py) (Chat Query API), [`src/api/app.py`](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/app.py) (FastAPI App & Routes), [`src/retrieval/hybrid_fusion.py`](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/hybrid_fusion.py) (Hybrid Retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience &amp; API"]
  node_dashboard["Web Dashboard<br/>[app.js]"]
  node_api["FastAPI App &amp; Routes<br/>[app.py]"]
  node_ingest_api["Ingest &amp; Jobs API<br/>[ingest.py]"]
  node_query_api["Chat Query API<br/>[query.py]"]
  node_graph_api["Graph API<br/>[graph.py]"]
end

subgraph group_workflows["Workflow Orchestration"]
  node_worker["Background Worker<br/>[worker.py]"]
  node_ingest_flow["Ingestion Workflow"]
  node_rag_flow["RAG Workflow<br/>[rag_pipeline.py]"]
end

subgraph group_knowledge["Ingestion &amp; Retrieval"]
  node_loaders["Document Loaders"]
  node_chunking["Multimodal Chunking"]
  node_extraction["Graph Extraction<br/>[extractor.py]"]
  node_graph_build["Graph Construction<br/>[builder.py]"]
  node_router["Intent Router<br/>[query_router.py]"]
  node_hybrid["Hybrid Retrieval<br/>[hybrid_fusion.py]"]
  node_doc_search["Document Search<br/>[document_search.py]"]
  node_reranker["Multimodal Reranker<br/>[reranker.py]"]
  node_synth["Grounded Synthesizer<br/>[synthesizer.py]"]
end

subgraph group_infra["Stores &amp; Models"]
  node_embed["Text &amp; Vision Embeddings"]
  node_vector_store[("Vector Store<br/>[vector_store.py]")]
  node_graph_store[("Graph Store<br/>[graph_store.py]")]
  node_schemas["Domain Models"]
  node_settings["Application Settings<br/>[settings.py]"]
end

node_user(("User"))
node_neo4j[("Neo4j")]
node_qdrant[("Qdrant")]
node_llm["LLM / VLM Providers"]

node_user -->|"uses"| node_dashboard
node_dashboard -.->|"requests"| node_api
node_user -->|"calls"| node_api
node_api -->|"routes to"| node_ingest_api
node_api -->|"routes to"| node_query_api
node_api -->|"routes to"| node_graph_api
node_ingest_api -->|"registers jobs"| node_worker
node_worker -->|"executes"| node_ingest_flow
node_ingest_flow -->|"loads documents"| node_loaders
node_ingest_flow -->|"chunks content"| node_chunking
node_ingest_flow -->|"extracts entities"| node_extraction
node_ingest_flow -->|"builds graph"| node_graph_build
node_ingest_flow -->|"embeds chunks"| node_embed
node_ingest_flow -->|"indexes vectors"| node_vector_store
node_graph_build -.->|"writes graph"| node_neo4j
node_query_api -->|"routes intent"| node_router
node_query_api -->|"retrieves evidence"| node_hybrid
node_query_api -->|"searches documents"| node_doc_search
node_hybrid -->|"searches graph"| node_graph_store
node_hybrid -.->|"searches vectors"| node_vector_store
node_hybrid -.->|"uses embeddings"| node_embed
node_query_api -->|"reranks results"| node_reranker
node_query_api -->|"synthesizes answer"| node_synth
node_synth -->|"generates response"| node_llm
node_graph_store -->|"queries graph"| node_neo4j
node_vector_store -.->|"stores vectors"| node_qdrant
node_rag_flow -->|"routes queries"| node_router
node_rag_flow -->|"retrieves"| node_hybrid
node_rag_flow -->|"reranks"| node_reranker
node_rag_flow -->|"synthesizes"| node_synth
node_api -->|"configures"| node_settings
node_ingest_flow -->|"uses job and document models"| node_schemas
node_query_api -->|"uses request models"| node_schemas

click node_dashboard "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/static/js/app.js"
click node_api "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/app.py"
click node_ingest_api "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/v1/endpoints/ingest.py"
click node_query_api "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/v1/endpoints/query.py"
click node_graph_api "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/v1/endpoints/graph.py"
click node_worker "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/worker.py"
click node_ingest_flow "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/workflows/ingestion_pipeline.py"
click node_rag_flow "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/workflows/rag_pipeline.py"
click node_loaders "https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/ingestion/loaders"
click node_chunking "https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/ingestion/chunkers"
click node_extraction "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/graph/extraction/extractor.py"
click node_graph_build "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/graph/construction/builder.py"
click node_router "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/query_router.py"
click node_hybrid "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/hybrid_fusion.py"
click node_doc_search "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/document_search.py"
click node_reranker "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/reranker.py"
click node_synth "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/generation/synthesizer.py"
click node_embed "https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/embeddings"
click node_vector_store "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/storage/vector_store.py"
click node_graph_store "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/storage/graph_store.py"
click node_schemas "https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/domain"
click node_settings "https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/config/settings.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_api,node_ingest_api,node_query_api,node_graph_api,node_user toneBlue
class node_worker,node_ingest_flow,node_rag_flow,node_neo4j,node_qdrant toneAmber
class node_loaders,node_chunking,node_extraction,node_graph_build,node_router,node_hybrid,node_doc_search,node_reranker,node_synth toneMint
class node_embed,node_vector_store,node_graph_store,node_schemas,node_settings toneRose
class node_llm toneIndigo
```

## Components

### User Experience & API

- [Web Dashboard](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/static/js/app.js): `src/static/js/app.js`
- [FastAPI App & Routes](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/app.py): `src/api/app.py`
- [Ingest & Jobs API](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/v1/endpoints/ingest.py): `src/api/v1/endpoints/ingest.py`
- [Chat Query API](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/v1/endpoints/query.py): `src/api/v1/endpoints/query.py`
- [Graph API](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/api/v1/endpoints/graph.py): `src/api/v1/endpoints/graph.py`

### Workflow Orchestration

- [Background Worker](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/worker.py): `src/worker.py`
- [Ingestion Workflow](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/workflows/ingestion_pipeline.py): `src/workflows/ingestion_pipeline.py`
- [RAG Workflow](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/workflows/rag_pipeline.py): `src/workflows/rag_pipeline.py`

### Ingestion & Retrieval

- [Document Loaders](https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/ingestion/loaders): `src/ingestion/loaders`
- [Multimodal Chunking](https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/ingestion/chunkers): `src/ingestion/chunkers`
- [Graph Extraction](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/graph/extraction/extractor.py): `src/graph/extraction/extractor.py`
- [Graph Construction](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/graph/construction/builder.py): `src/graph/construction/builder.py`
- [Intent Router](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/query_router.py): `src/retrieval/query_router.py`
- [Hybrid Retrieval](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/hybrid_fusion.py): `src/retrieval/hybrid_fusion.py`
- [Document Search](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/document_search.py): `src/retrieval/document_search.py`
- [Multimodal Reranker](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/retrieval/reranker.py): `src/retrieval/reranker.py`
- [Grounded Synthesizer](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/generation/synthesizer.py): `src/generation/synthesizer.py`

### Stores & Models

- [Text & Vision Embeddings](https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/embeddings): `src/embeddings`
- [Vector Store](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/storage/vector_store.py): `src/storage/vector_store.py`
- [Graph Store](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/storage/graph_store.py): `src/storage/graph_store.py`
- [Domain Models](https://github.com/maheshm-01/multimodel_graph_rag/tree/main/src/domain): `src/domain`
- [Application Settings](https://github.com/maheshm-01/multimodel_graph_rag/blob/main/src/config/settings.py): `src/config/settings.py`

### Other components

- **User**
- **Neo4j**
- **Qdrant**
- **LLM / VLM Providers**

## Connections

- User → Web Dashboard: uses (evidence: `README.md`)
- Web Dashboard → FastAPI App & Routes: requests
- User → FastAPI App & Routes: calls (evidence: `README.md`)
- FastAPI App & Routes → Ingest & Jobs API: routes to
- FastAPI App & Routes → Chat Query API: routes to
- FastAPI App & Routes → Graph API: routes to
- Ingest & Jobs API → Background Worker: registers jobs (evidence: `src/api/v1/endpoints/ingest.py`)
- Background Worker → Ingestion Workflow: executes (evidence: `src/worker.py`)
- Ingestion Workflow → Document Loaders: loads documents (evidence: `src/workflows/ingestion_pipeline.py`)
- Ingestion Workflow → Multimodal Chunking: chunks content (evidence: `src/workflows/ingestion_pipeline.py`)
- Ingestion Workflow → Graph Extraction: extracts entities (evidence: `src/workflows/ingestion_pipeline.py`)
- Ingestion Workflow → Graph Construction: builds graph (evidence: `src/workflows/ingestion_pipeline.py`)
- Ingestion Workflow → Text & Vision Embeddings: embeds chunks (evidence: `src/workflows/ingestion_pipeline.py`)
- Ingestion Workflow → Vector Store: indexes vectors (evidence: `src/workflows/ingestion_pipeline.py`)
- Graph Construction → Neo4j: writes graph
- Chat Query API → Intent Router: routes intent (evidence: `src/api/v1/endpoints/query.py`)
- Chat Query API → Hybrid Retrieval: retrieves evidence (evidence: `src/api/v1/endpoints/query.py`)
- Chat Query API → Document Search: searches documents (evidence: `src/api/v1/endpoints/query.py`)
- Hybrid Retrieval → Graph Store: searches graph (evidence: `src/retrieval/hybrid_fusion.py`)
- Hybrid Retrieval → Vector Store: searches vectors
- Hybrid Retrieval → Text & Vision Embeddings: uses embeddings
- Chat Query API → Multimodal Reranker: reranks results (evidence: `src/api/v1/endpoints/query.py`)
- Chat Query API → Grounded Synthesizer: synthesizes answer (evidence: `src/api/v1/endpoints/query.py`)
- Grounded Synthesizer → LLM / VLM Providers: generates response (evidence: `src/generation/synthesizer.py`)
- Graph Store → Neo4j: queries graph (evidence: `src/storage/graph_store.py`)
- Vector Store → Qdrant: stores vectors
- RAG Workflow → Intent Router: routes queries (evidence: `src/workflows/rag_pipeline.py`)
- RAG Workflow → Hybrid Retrieval: retrieves (evidence: `src/workflows/rag_pipeline.py`)
- RAG Workflow → Multimodal Reranker: reranks (evidence: `src/workflows/rag_pipeline.py`)
- RAG Workflow → Grounded Synthesizer: synthesizes (evidence: `src/workflows/rag_pipeline.py`)
- FastAPI App & Routes → Application Settings: configures (evidence: `src/api/app.py`)
- Ingestion Workflow → Domain Models: uses job and document models (evidence: `src/workflows/ingestion_pipeline.py`)
- Chat Query API → Domain Models: uses request models (evidence: `src/api/v1/endpoints/query.py`)
