# hsmshubham007-code/week3day4proj1 architecture

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

- Interactive diagram: https://gitdiagram.com/hsmshubham007-code/week3day4proj1
- Repository: https://github.com/hsmshubham007-code/week3day4proj1

## Overview

This repository is a deterministic customer-message classification evaluation app with Streamlit dashboards. The main workflow is to load golden cases, classify each message, score results and regression status, and record evaluation and observability logs; dashboards present those records. Source excerpts support the classifier call, CSV reads/writes, and dashboard behavior. The README is empty, and the dataset contents and some evaluator details were not sampled, so the graph omits unverified connections.

Main entry points: [`evals/evaluate.py`](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/evaluate.py) (Evaluation runner), [`evals/eval_log.csv`](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/eval_log.csv) (Evaluation history), [`evals/observability_log.csv`](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/observability_log.csv) (Observability log), [`app/ui.py`](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/app/ui.py) (Evaluation dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_classification["Classification"]
  node_classifier["Message classifier<br/>[prompt.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_eval_runner["Evaluation runner<br/>[evaluate.py]"]
  node_golden_data["Golden dataset"]
  node_eval_history[("Evaluation history<br/>[eval_log.csv]")]
  node_observability_log[("Observability log")]
end

subgraph group_dashboards["Dashboards"]
  node_history_dashboard["Evaluation dashboard<br/>[ui.py]"]
  node_observability_dashboard["Observability dashboard<br/>[observability.py]"]
end

node_eval_runner -->|"loads cases"| node_golden_data
node_eval_runner -->|"classifies messages"| node_classifier
node_eval_runner -->|"reads history"| node_eval_history
node_eval_runner -->|"appends results"| node_eval_history
node_eval_runner -->|"appends metrics"| node_observability_log
node_history_dashboard -->|"reads history"| node_eval_history
node_observability_dashboard -->|"reads metrics"| node_observability_log

click node_eval_runner "https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/evaluate.py"
click node_golden_data "https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/golden_dataset.json"
click node_classifier "https://github.com/hsmshubham007-code/week3day4proj1/blob/main/app/prompt.py"
click node_eval_history "https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/eval_log.csv"
click node_observability_log "https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/observability_log.csv"
click node_history_dashboard "https://github.com/hsmshubham007-code/week3day4proj1/blob/main/app/ui.py"
click node_observability_dashboard "https://github.com/hsmshubham007-code/week3day4proj1/blob/main/app/observability.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_classifier toneBlue
class node_eval_runner,node_golden_data,node_eval_history,node_observability_log toneAmber
class node_history_dashboard,node_observability_dashboard toneMint
```

## Components

### Classification

- [Message classifier](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/app/prompt.py): `app/prompt.py`

### Evaluation

- [Evaluation runner](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/evaluate.py): `evals/evaluate.py`
- [Golden dataset](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/golden_dataset.json): `evals/golden_dataset.json`
- [Evaluation history](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/eval_log.csv): `evals/eval_log.csv`
- [Observability log](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/evals/observability_log.csv): `evals/observability_log.csv`

### Dashboards

- [Evaluation dashboard](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/app/ui.py): `app/ui.py`
- [Observability dashboard](https://github.com/hsmshubham007-code/week3day4proj1/blob/main/app/observability.py): `app/observability.py`

## Connections

- Evaluation runner → Golden dataset: loads cases (evidence: `evals/evaluate.py`)
- Evaluation runner → Message classifier: classifies messages (evidence: `evals/evaluate.py`)
- Evaluation runner → Evaluation history: reads history (evidence: `evals/evaluate.py`)
- Evaluation runner → Evaluation history: appends results (evidence: `evals/evaluate.py`)
- Evaluation runner → Observability log: appends metrics (evidence: `evals/evaluate.py`)
- Evaluation dashboard → Evaluation history: reads history (evidence: `app/ui.py`)
- Observability dashboard → Observability log: reads metrics (evidence: `app/observability.py`)
