# anilkumarb20062006/project architecture

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

- Interactive diagram: https://gitdiagram.com/anilkumarb20062006/project
- Repository: https://github.com/anilkumarb20062006/project

## Overview

This repository tree combines several projects, but its README identifies the Zepto Support Assistant as the product: a FastAPI question-answering service grounded in policy documents. The main workflow accepts a question, classifies it, retrieves policy context for policy questions (or gives a fallback for general questions), and returns a structured answer. The README also describes document ingestion and an optional real-LLM extension. The tree places policy files at its root while the sampled vector-store code expects a docs/ directory, so the ingestion-to-store link is uncertain; the optional LLM functions are explicitly unimplemented.

Main entry points: [`main.py`](https://github.com/anilkumarb20062006/project/blob/main/main.py) (Ask API), [`graph.py`](https://github.com/anilkumarb20062006/project/blob/main/graph.py) (Intent classifier), [`vectorstore.py`](https://github.com/anilkumarb20062006/project/blob/main/vectorstore.py) (Vector store), [`prompt_template.py`](https://github.com/anilkumarb20062006/project/blob/main/prompt_template.py) (Prompt builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API boundary"]
  node_fastapi["Ask API<br/>[main.py]"]
  node_request["Request/response schema<br/>[schema.py]"]
end

subgraph group_answering["Answer workflow"]
  node_graph["LangGraph workflow<br/>[graph.py]"]
  node_classify["Intent classifier<br/>[graph.py]"]
  node_retrieve["Policy answer<br/>[graph.py]"]
  node_fallback["General fallback<br/>[graph.py]"]
  node_prompt["Prompt builder<br/>[prompt_template.py]"]
end

subgraph group_knowledge["Policy knowledge"]
  node_policy_docs["Policy corpus"]
  node_vectorstore["Vector store<br/>[vectorstore.py]"]
  node_chroma[("ChromaDB collection<br/>[vectorstore.py]")]
  node_embedder["Local embedder<br/>[vectorstore.py]"]
end

node_customer(("Questioner"))
node_llm{{"Real LLM"}}

node_customer -->|"submits question"| node_fastapi
node_fastapi -->|"validates input"| node_request
node_fastapi -->|"invokes workflow"| node_graph
node_graph -->|"starts at"| node_classify
node_classify -->|"routes policy"| node_retrieve
node_classify -->|"routes general"| node_fallback
node_retrieve -->|"queries top-k"| node_vectorstore
node_vectorstore -->|"embeds query"| node_embedder
node_vectorstore -->|"searches collection"| node_chroma
node_retrieve -.->|"builds optional prompt"| node_prompt
node_fallback -.->|"builds optional prompt"| node_prompt
node_classify -.->|"optional classification"| node_llm
node_prompt -.->|"optional generation"| node_llm
node_graph -->|"returns answer state"| node_fastapi
node_fastapi -->|"constructs response"| node_request

click node_fastapi "https://github.com/anilkumarb20062006/project/blob/main/main.py"
click node_request "https://github.com/anilkumarb20062006/project/blob/main/schema.py"
click node_graph "https://github.com/anilkumarb20062006/project/blob/main/graph.py"
click node_classify "https://github.com/anilkumarb20062006/project/blob/main/graph.py"
click node_retrieve "https://github.com/anilkumarb20062006/project/blob/main/graph.py"
click node_fallback "https://github.com/anilkumarb20062006/project/blob/main/graph.py"
click node_prompt "https://github.com/anilkumarb20062006/project/blob/main/prompt_template.py"
click node_vectorstore "https://github.com/anilkumarb20062006/project/blob/main/vectorstore.py"
click node_chroma "https://github.com/anilkumarb20062006/project/blob/main/vectorstore.py"
click node_embedder "https://github.com/anilkumarb20062006/project/blob/main/vectorstore.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_fastapi,node_request toneBlue
class node_graph,node_classify,node_retrieve,node_fallback,node_prompt toneAmber
class node_policy_docs,node_vectorstore,node_chroma,node_embedder toneMint
class node_customer,node_llm toneIndigo
```

## Components

### API boundary

- [Ask API](https://github.com/anilkumarb20062006/project/blob/main/main.py): `main.py`
- [Request/response schema](https://github.com/anilkumarb20062006/project/blob/main/schema.py): `schema.py`

### Answer workflow

- [LangGraph workflow](https://github.com/anilkumarb20062006/project/blob/main/graph.py): `graph.py`
- [Intent classifier](https://github.com/anilkumarb20062006/project/blob/main/graph.py): `graph.py`
- [Policy answer](https://github.com/anilkumarb20062006/project/blob/main/graph.py): `graph.py`
- [General fallback](https://github.com/anilkumarb20062006/project/blob/main/graph.py): `graph.py`
- [Prompt builder](https://github.com/anilkumarb20062006/project/blob/main/prompt_template.py): `prompt_template.py`

### Policy knowledge

- **Policy corpus**
- [Vector store](https://github.com/anilkumarb20062006/project/blob/main/vectorstore.py): `vectorstore.py`
- [ChromaDB collection](https://github.com/anilkumarb20062006/project/blob/main/vectorstore.py): `vectorstore.py`
- [Local embedder](https://github.com/anilkumarb20062006/project/blob/main/vectorstore.py): `vectorstore.py`

### Other components

- **Questioner**
- **Real LLM**

## Connections

- Questioner → Ask API: submits question
- Ask API → Request/response schema: validates input
- Ask API → LangGraph workflow: invokes workflow
- LangGraph workflow → Intent classifier: starts at
- Intent classifier → Policy answer: routes policy
- Intent classifier → General fallback: routes general
- Policy answer → Vector store: queries top-k
- Vector store → Local embedder: embeds query
- Vector store → ChromaDB collection: searches collection
- Policy answer → Prompt builder: builds optional prompt
- General fallback → Prompt builder: builds optional prompt
- Intent classifier → Real LLM: optional classification
- Prompt builder → Real LLM: optional generation
- LangGraph workflow → Ask API: returns answer state
- Ask API → Request/response schema: constructs response
