# amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant architecture

> Architecture diagram of the GitHub repository amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant
- Repository: https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant

## Overview

Jal Setu is a Streamlit dashboard for seasonal groundwater forecasting, with a question-answering assistant grounded in both run results and project knowledge. The main workflow is upload a seasonal workbook, prepare and model the data, inspect forecasts and diagnostics, and optionally export results. A separate model family adds physics-informed, reservoir, SARIMA, and optional LSTM results. The chat assistant handles small talk directly or answers substantive questions using retrieved documentation and live run context, with optional hosted LLM providers. Some wiring details are inferred only from module descriptions and the partial app excerpt.

Main entry points: [`groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py`](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py) (Streamlit app), [`groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/assistant.py`](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/assistant.py) (Assistant orchestration), [`groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py`](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py) (Seasonal pipeline), [`groundwater-dashboard-updatedv2_Final_finnished_With_RAG/deep_models.py`](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/deep_models.py) (Deep model family)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_app["Streamlit app<br/>[app.py]"]
  node_workbook["Uploaded workbook"]
end

subgraph group_forecast["Forecasting"]
  node_seasonal_pipeline["Seasonal pipeline<br/>[pipeline.py]"]
  node_deep_models["Deep model family<br/>[deep_models.py]"]
  node_forecast_results["Forecast results"]
end

subgraph group_analysis["Analysis and export"]
  node_dashboard_views["Forecast views<br/>[app.py]"]
  node_diagnostics["Diagnostics and plots<br/>[app.py]"]
  node_excel_export["Excel export<br/>[pipeline.py]"]
end

subgraph group_assistant["Grounded assistant"]
  node_chat_prompt["Chat question"]
  node_assistant["Assistant orchestration<br/>[assistant.py]"]
  node_smalltalk["Small-talk replies<br/>[smalltalk.py]"]
  node_retriever["Knowledge retriever<br/>[retriever.py]"]
  node_knowledge_base["Knowledge documents"]
  node_context["Run context<br/>[context.py]"]
  node_llm_provider["LLM provider<br/>[llm_provider.py]"]
  node_chat_answer["Grounded answer"]
end

node_user(("Dashboard user"))
node_hosted_llm{{"Hosted LLM"}}

node_user -->|"uses"| node_app
node_user -->|"provides"| node_workbook
node_workbook -->|"uploads"| node_app
node_app -->|"runs workflow"| node_seasonal_pipeline
node_app -->|"runs models"| node_deep_models
node_seasonal_pipeline -->|"produces"| node_forecast_results
node_deep_models -->|"produces"| node_forecast_results
node_app -->|"renders"| node_dashboard_views
node_app -->|"renders"| node_diagnostics
node_app -->|"requests export"| node_excel_export
node_forecast_results -->|"supplies results"| node_dashboard_views
node_forecast_results -->|"supplies results"| node_diagnostics
node_user -->|"asks"| node_chat_prompt
node_chat_prompt -->|"enters chat"| node_app
node_app -->|"dispatches question"| node_assistant
node_assistant -->|"checks reply"| node_smalltalk
node_assistant -->|"searches"| node_retriever
node_retriever -->|"loads documents"| node_knowledge_base
node_assistant -->|"summarizes run"| node_context
node_assistant -.->|"requests completion"| node_llm_provider
node_llm_provider -.->|"calls provider"| node_hosted_llm
node_assistant -->|"composes answer"| node_chat_answer
node_chat_answer -->|"returns answer"| node_app

click node_app "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py"
click node_seasonal_pipeline "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py"
click node_deep_models "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/deep_models.py"
click node_dashboard_views "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py"
click node_diagnostics "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py"
click node_excel_export "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py"
click node_assistant "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/assistant.py"
click node_smalltalk "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/smalltalk.py"
click node_retriever "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/retriever.py"
click node_knowledge_base "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/tree/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/knowledge_base"
click node_context "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/context.py"
click node_llm_provider "https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/llm_provider.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_app,node_workbook,node_user toneBlue
class node_seasonal_pipeline,node_deep_models,node_forecast_results toneAmber
class node_dashboard_views,node_diagnostics,node_excel_export toneMint
class node_chat_prompt,node_assistant,node_smalltalk,node_retriever,node_knowledge_base,node_context,node_llm_provider,node_chat_answer toneRose
class node_hosted_llm toneIndigo
```

## Components

### Dashboard

- [Streamlit app](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py`
- **Uploaded workbook**

### Forecasting

- [Seasonal pipeline](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py`
- [Deep model family](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/deep_models.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/deep_models.py`
- **Forecast results**

### Analysis and export

- [Forecast views](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py`
- [Diagnostics and plots](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/app.py`
- [Excel export](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/pipeline.py`

### Grounded assistant

- **Chat question**
- [Assistant orchestration](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/assistant.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/assistant.py`
- [Small-talk replies](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/smalltalk.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/smalltalk.py`
- [Knowledge retriever](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/retriever.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/retriever.py`
- [Knowledge documents](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/tree/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/knowledge_base): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/knowledge_base`
- [Run context](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/context.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/context.py`
- [LLM provider](https://github.com/amankumarranjan8969/jal-setu-ground-water-forecasting-and-rag-assistant/blob/main/groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/llm_provider.py): `groundwater-dashboard-updatedv2_Final_finnished_With_RAG/rag/llm_provider.py`
- **Grounded answer**

### Other components

- **Dashboard user**
- **Hosted LLM**

## Connections

- Dashboard user → Streamlit app: uses
- Dashboard user → Uploaded workbook: provides
- Uploaded workbook → Streamlit app: uploads
- Streamlit app → Seasonal pipeline: runs workflow
- Streamlit app → Deep model family: runs models
- Seasonal pipeline → Forecast results: produces
- Deep model family → Forecast results: produces
- Streamlit app → Forecast views: renders
- Streamlit app → Diagnostics and plots: renders
- Streamlit app → Excel export: requests export
- Forecast results → Forecast views: supplies results
- Forecast results → Diagnostics and plots: supplies results
- Dashboard user → Chat question: asks
- Chat question → Streamlit app: enters chat
- Streamlit app → Assistant orchestration: dispatches question
- Assistant orchestration → Small-talk replies: checks reply
- Assistant orchestration → Knowledge retriever: searches
- Knowledge retriever → Knowledge documents: loads documents
- Assistant orchestration → Run context: summarizes run
- Assistant orchestration → LLM provider: requests completion
- LLM provider → Hosted LLM: calls provider
- Assistant orchestration → Grounded answer: composes answer
- Grounded answer → Streamlit app: returns answer
