# pooja-314/enterprise-intelligence-platform architecture

> Architecture diagram of the GitHub repository pooja-314/enterprise-intelligence-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pooja-314/enterprise-intelligence-platform
- Repository: https://github.com/pooja-314/enterprise-intelligence-platform

## Overview

Enterprise Intelligence Platform provides a Streamlit dashboard over a FastAPI document-intelligence backend. Users authenticate, upload documents for parsing, chunking and indexing, then ask questions through conversational routing, hybrid retrieval and grounded answer generation; multi-step agent tools and claim verification extend that workflow. PostgreSQL/pgvector stores users, documents, chunks and conversations. The graph preserves documented evaluation and telemetry capabilities; unsampled route wiring is included only where the README or source index supports it.

Main entry points: [`frontend/api_client.py`](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/frontend/api_client.py) (HTTP API Client), [`app/rag/generator.py`](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/generator.py) (RAG Answer Generator), [`app/rag/retrieval.py`](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/retrieval.py) (Hybrid Retrieval), [`app/ingestion/pipeline.py`](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/ingestion/pipeline.py) (Ingestion Pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Dashboard"]
  node_dashboard["Streamlit Dashboard<br/>[app.py]"]
  node_views["Product Views"]
  node_client["HTTP API Client<br/>[api_client.py]"]
end

subgraph group_api["Backend API"]
  node_api_auth["Authentication API<br/>[auth.py]"]
  node_api_docs["Document API<br/>[documents.py]"]
  node_api_rag["RAG API<br/>[rag.py]"]
  node_api_conversations["Conversation API<br/>[conversations.py]"]
  node_api_agent["Agent API<br/>[agent.py]"]
end

subgraph group_knowledge["Document Intelligence"]
  node_ingestion["Ingestion Pipeline<br/>[pipeline.py]"]
  node_parser["Document Parser<br/>[parser.py]"]
  node_chunker["Recursive Chunker<br/>[chunker.py]"]
  node_embeddings["Embedding Service<br/>[embeddings.py]"]
  node_retrieval["Hybrid Retrieval<br/>[retrieval.py]"]
  node_generator["RAG Answer Generator<br/>[generator.py]"]
  node_verifier["Claim Verifier<br/>[verifier.py]"]
end

subgraph group_agents["Agents and Memory"]
  node_router["Intent Router<br/>[query_router.py]"]
  node_orchestrator["Agent Orchestrator<br/>[orchestrator.py]"]
  node_tools["Agent Tools"]
  node_memory["Conversation Memory<br/>[manager.py]"]
end

subgraph group_platform["Platform Services"]
  node_llm["LLM Fallback Router<br/>[fallback_router.py]"]
  node_providers["LLM Providers"]
  node_database[("Relational and Vector Store<br/>[models.py]")]
  node_evaluation["RAG Evaluation<br/>[runner.py]"]
  node_telemetry["Usage Telemetry<br/>[telemetry.py]"]
end

node_user(("Enterprise User"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"renders"| node_views
node_views -->|"requests data"| node_client
node_client -->|"authenticates"| node_api_auth
node_client -->|"manages documents"| node_api_docs
node_client -->|"submits queries"| node_api_rag
node_client -.->|"uses conversations"| node_api_conversations
node_client -.->|"uses agent"| node_api_agent
node_api_docs -->|"processes uploads"| node_ingestion
node_ingestion -->|"parses files"| node_parser
node_ingestion -->|"chunks text"| node_chunker
node_ingestion -->|"embeds chunks"| node_embeddings
node_ingestion -->|"persists documents"| node_database
node_api_rag -->|"retrieves evidence"| node_retrieval
node_api_rag -->|"generates answers"| node_generator
node_api_rag -->|"verifies claims"| node_verifier
node_retrieval -->|"embeds queries"| node_embeddings
node_retrieval -->|"searches chunks"| node_database
node_generator -->|"gets evidence"| node_retrieval
node_generator -->|"checks response"| node_verifier
node_generator -->|"generates text"| node_llm
node_api_conversations -->|"routes messages"| node_router
node_router -->|"dispatches agent work"| node_orchestrator
node_router -->|"answers factual queries"| node_generator
node_orchestrator -->|"runs selected tool"| node_tools
node_orchestrator -->|"reasons with"| node_llm
node_orchestrator -->|"uses context"| node_memory
node_tools -->|"searches knowledge"| node_retrieval
node_tools -->|"analyzes and reports"| node_llm
node_api_conversations -->|"persists dialogue"| node_memory
node_memory -.->|"stores conversations"| node_database
node_llm -->|"fails over"| node_providers
node_evaluation -->|"evaluates retrieval"| node_retrieval
node_evaluation -->|"evaluates answers"| node_generator
node_evaluation -->|"evaluates grounding"| node_verifier
node_providers -->|"records usage"| node_telemetry

click node_dashboard "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/frontend/app.py"
click node_views "https://github.com/pooja-314/enterprise-intelligence-platform/tree/main/frontend/pages_views"
click node_client "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/frontend/api_client.py"
click node_api_auth "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/auth.py"
click node_api_docs "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/documents.py"
click node_api_rag "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/rag.py"
click node_api_conversations "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/conversations.py"
click node_api_agent "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/agent.py"
click node_ingestion "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/ingestion/pipeline.py"
click node_parser "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/ingestion/parser.py"
click node_chunker "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/ingestion/chunker.py"
click node_embeddings "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/embeddings.py"
click node_retrieval "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/retrieval.py"
click node_generator "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/generator.py"
click node_verifier "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/verifier.py"
click node_router "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/agent/query_router.py"
click node_orchestrator "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/agent/orchestrator.py"
click node_tools "https://github.com/pooja-314/enterprise-intelligence-platform/tree/main/app/agent/tools"
click node_memory "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/memory/manager.py"
click node_llm "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/llm/fallback_router.py"
click node_providers "https://github.com/pooja-314/enterprise-intelligence-platform/tree/main/app/llm"
click node_database "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/db/models.py"
click node_evaluation "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/evaluation/runner.py"
click node_telemetry "https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/core/telemetry.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_views,node_client,node_user toneBlue
class node_api_auth,node_api_docs,node_api_rag,node_api_conversations,node_api_agent toneAmber
class node_ingestion,node_parser,node_chunker,node_embeddings,node_retrieval,node_generator,node_verifier toneMint
class node_router,node_orchestrator,node_tools,node_memory toneRose
class node_llm,node_providers,node_database,node_evaluation,node_telemetry toneIndigo
```

## Components

### Dashboard

- [Streamlit Dashboard](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/frontend/app.py): `frontend/app.py`
- [Product Views](https://github.com/pooja-314/enterprise-intelligence-platform/tree/main/frontend/pages_views): `frontend/pages_views`
- [HTTP API Client](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/frontend/api_client.py): `frontend/api_client.py`

### Backend API

- [Authentication API](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/auth.py): `app/api/auth.py`
- [Document API](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/documents.py): `app/api/documents.py`
- [RAG API](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/rag.py): `app/api/rag.py`
- [Conversation API](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/conversations.py): `app/api/conversations.py`
- [Agent API](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/api/agent.py): `app/api/agent.py`

### Document Intelligence

- [Ingestion Pipeline](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/ingestion/pipeline.py): `app/ingestion/pipeline.py`
- [Document Parser](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/ingestion/parser.py): `app/ingestion/parser.py`
- [Recursive Chunker](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/ingestion/chunker.py): `app/ingestion/chunker.py`
- [Embedding Service](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/embeddings.py): `app/rag/embeddings.py`
- [Hybrid Retrieval](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/retrieval.py): `app/rag/retrieval.py`
- [RAG Answer Generator](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/generator.py): `app/rag/generator.py`
- [Claim Verifier](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/rag/verifier.py): `app/rag/verifier.py`

### Agents and Memory

- [Intent Router](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/agent/query_router.py): `app/agent/query_router.py`
- [Agent Orchestrator](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/agent/orchestrator.py): `app/agent/orchestrator.py`
- [Agent Tools](https://github.com/pooja-314/enterprise-intelligence-platform/tree/main/app/agent/tools): `app/agent/tools`
- [Conversation Memory](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/memory/manager.py): `app/memory/manager.py`

### Platform Services

- [LLM Fallback Router](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/llm/fallback_router.py): `app/llm/fallback_router.py`
- [LLM Providers](https://github.com/pooja-314/enterprise-intelligence-platform/tree/main/app/llm): `app/llm`
- [Relational and Vector Store](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/db/models.py): `app/db/models.py`
- [RAG Evaluation](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/evaluation/runner.py): `app/evaluation/runner.py`
- [Usage Telemetry](https://github.com/pooja-314/enterprise-intelligence-platform/blob/main/app/core/telemetry.py): `app/core/telemetry.py`

### Other components

- **Enterprise User**

## Connections

- Enterprise User → Streamlit Dashboard: uses (evidence: `README.md`)
- Streamlit Dashboard → Product Views: renders (evidence: `frontend/app.py`)
- Product Views → HTTP API Client: requests data (evidence: `frontend/pages_views/chat_view.py`)
- HTTP API Client → Authentication API: authenticates (evidence: `frontend/api_client.py`)
- HTTP API Client → Document API: manages documents (evidence: `README.md`)
- HTTP API Client → RAG API: submits queries (evidence: `frontend/api_client.py`)
- HTTP API Client → Conversation API: uses conversations
- HTTP API Client → Agent API: uses agent
- Document API → Ingestion Pipeline: processes uploads (evidence: `README.md`)
- Ingestion Pipeline → Document Parser: parses files (evidence: `app/ingestion/pipeline.py`)
- Ingestion Pipeline → Recursive Chunker: chunks text (evidence: `app/ingestion/pipeline.py`)
- Ingestion Pipeline → Embedding Service: embeds chunks (evidence: `app/ingestion/pipeline.py`)
- Ingestion Pipeline → Relational and Vector Store: persists documents (evidence: `README.md`)
- RAG API → Hybrid Retrieval: retrieves evidence (evidence: `app/api/rag.py`)
- RAG API → RAG Answer Generator: generates answers (evidence: `app/api/rag.py`)
- RAG API → Claim Verifier: verifies claims (evidence: `app/api/rag.py`)
- Hybrid Retrieval → Embedding Service: embeds queries (evidence: `app/rag/retrieval.py`)
- Hybrid Retrieval → Relational and Vector Store: searches chunks (evidence: `app/rag/retrieval.py`)
- RAG Answer Generator → Hybrid Retrieval: gets evidence (evidence: `app/rag/generator.py`)
- RAG Answer Generator → Claim Verifier: checks response (evidence: `app/rag/generator.py`)
- RAG Answer Generator → LLM Fallback Router: generates text (evidence: `app/rag/generator.py`)
- Conversation API → Intent Router: routes messages (evidence: `app/api/conversations.py`)
- Intent Router → Agent Orchestrator: dispatches agent work (evidence: `app/agent/query_router.py`)
- Intent Router → RAG Answer Generator: answers factual queries (evidence: `app/agent/query_router.py`)
- Agent Orchestrator → Agent Tools: runs selected tool (evidence: `app/agent/orchestrator.py`)
- Agent Orchestrator → LLM Fallback Router: reasons with (evidence: `app/agent/orchestrator.py`)
- Agent Orchestrator → Conversation Memory: uses context (evidence: `app/agent/orchestrator.py`)
- Agent Tools → Hybrid Retrieval: searches knowledge (evidence: `app/agent/tools/kb_search.py`)
- Agent Tools → LLM Fallback Router: analyzes and reports (evidence: `app/agent/tools/doc_analysis.py`)
- Conversation API → Conversation Memory: persists dialogue (evidence: `app/api/conversations.py`)
- Conversation Memory → Relational and Vector Store: stores conversations (evidence: `app/memory/manager.py`)
- LLM Fallback Router → LLM Providers: fails over (evidence: `app/llm/fallback_router.py`)
- RAG Evaluation → Hybrid Retrieval: evaluates retrieval (evidence: `app/evaluation/runner.py`)
- RAG Evaluation → RAG Answer Generator: evaluates answers (evidence: `app/evaluation/runner.py`)
- RAG Evaluation → Claim Verifier: evaluates grounding (evidence: `app/evaluation/runner.py`)
- LLM Providers → Usage Telemetry: records usage (evidence: `app/llm/groq_provider.py`)
