# nithusikan01/customer-support-chatbot architecture

> Architecture diagram of the GitHub repository nithusikan01/customer-support-chatbot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nithusikan01/customer-support-chatbot
- Repository: https://github.com/nithusikan01/customer-support-chatbot

## Overview

This is a command-line customer-support chatbot that loads policy documents, splits them into chunks, builds a persistent vector store, and answers interactive questions with retrieval-augmented generation. Fine-tuning is also a documented project capability, represented by the training notebook and Hugging Face dataset; its implementation is not sampled here. The runtime wiring is supported by the excerpts, though the loader’s required folder argument is not passed in main.py, so successful loading is not assured.

Main entry points: [`main.py`](https://github.com/nithusikan01/customer-support-chatbot/blob/main/main.py) (CLI workflow), [`rag_pipeline/qa_chain.py`](https://github.com/nithusikan01/customer-support-chatbot/blob/main/rag_pipeline/qa_chain.py) (Retrieval QA chain), [`vectorstore/chroma_store.py`](https://github.com/nithusikan01/customer-support-chatbot/blob/main/vectorstore/chroma_store.py) (Chroma vector store), [`loaders/load_data.py`](https://github.com/nithusikan01/customer-support-chatbot/blob/main/loaders/load_data.py) (Document loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Document ingestion"]
  node_source_docs["Policy documents"]
  node_loader["Document loader<br/>[load_data.py]"]
  node_chunker["Text chunker<br/>[load_data.py]"]
  node_embedder["Embedding model<br/>[embedder.py]"]
  node_store[("Chroma vector store<br/>[chroma_store.py]")]
end

subgraph group_rag["Retrieval and answers"]
  node_main["CLI workflow<br/>[main.py]"]
  node_qa["Retrieval QA chain<br/>[qa_chain.py]"]
  node_llm["LLaMA generator<br/>[llama_model.py]"]
end

subgraph group_training["Model training"]
  node_training_data["Support training dataset"]
  node_training_notebook["Fine-tuning notebook"]
end

node_user(("Question asker"))

node_user -->|"asks"| node_main
node_main -->|"loads documents"| node_loader
node_loader -->|"reads files"| node_source_docs
node_main -->|"splits documents"| node_chunker
node_main -->|"builds store"| node_store
node_store -->|"embeds chunks"| node_embedder
node_main -->|"creates QA chain"| node_qa
node_qa -->|"retrieves passages"| node_store
node_qa -->|"loads generator"| node_llm
node_main -->|"submits query"| node_qa
node_main -->|"prints answer"| node_user
node_training_data -->|"trains on"| node_training_notebook
node_training_notebook -.->|"fine-tunes model"| node_llm

click node_main "https://github.com/nithusikan01/customer-support-chatbot/blob/main/main.py"
click node_source_docs "https://github.com/nithusikan01/customer-support-chatbot/tree/main/data"
click node_loader "https://github.com/nithusikan01/customer-support-chatbot/blob/main/loaders/load_data.py"
click node_chunker "https://github.com/nithusikan01/customer-support-chatbot/blob/main/loaders/load_data.py"
click node_embedder "https://github.com/nithusikan01/customer-support-chatbot/blob/main/embeddings/embedder.py"
click node_store "https://github.com/nithusikan01/customer-support-chatbot/blob/main/vectorstore/chroma_store.py"
click node_qa "https://github.com/nithusikan01/customer-support-chatbot/blob/main/rag_pipeline/qa_chain.py"
click node_llm "https://github.com/nithusikan01/customer-support-chatbot/blob/main/llm/llama_model.py"
click node_training_notebook "https://github.com/nithusikan01/customer-support-chatbot/blob/main/Fine_Tuning_LLama_3_8B_Chat_Bot%20_model_training.ipynb"

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_source_docs,node_loader,node_chunker,node_embedder,node_store toneBlue
class node_main,node_qa,node_llm toneAmber
class node_training_data,node_training_notebook toneMint
class node_user toneIndigo
```

## Components

### Document ingestion

- [Policy documents](https://github.com/nithusikan01/customer-support-chatbot/tree/main/data): `data`
- [Document loader](https://github.com/nithusikan01/customer-support-chatbot/blob/main/loaders/load_data.py): `loaders/load_data.py`
- [Text chunker](https://github.com/nithusikan01/customer-support-chatbot/blob/main/loaders/load_data.py): `loaders/load_data.py`
- [Embedding model](https://github.com/nithusikan01/customer-support-chatbot/blob/main/embeddings/embedder.py): `embeddings/embedder.py`
- [Chroma vector store](https://github.com/nithusikan01/customer-support-chatbot/blob/main/vectorstore/chroma_store.py): `vectorstore/chroma_store.py`

### Retrieval and answers

- [CLI workflow](https://github.com/nithusikan01/customer-support-chatbot/blob/main/main.py): `main.py`
- [Retrieval QA chain](https://github.com/nithusikan01/customer-support-chatbot/blob/main/rag_pipeline/qa_chain.py): `rag_pipeline/qa_chain.py`
- [LLaMA generator](https://github.com/nithusikan01/customer-support-chatbot/blob/main/llm/llama_model.py): `llm/llama_model.py`

### Model training

- **Support training dataset**
- [Fine-tuning notebook](https://github.com/nithusikan01/customer-support-chatbot/blob/main/Fine_Tuning_LLama_3_8B_Chat_Bot%20_model_training.ipynb): `Fine_Tuning_LLama_3_8B_Chat_Bot _model_training.ipynb`

### Other components

- **Question asker**

## Connections

- Question asker → CLI workflow: asks (evidence: `main.py`)
- CLI workflow → Document loader: loads documents (evidence: `main.py`)
- Document loader → Policy documents: reads files (evidence: `loaders/load_data.py`)
- CLI workflow → Text chunker: splits documents (evidence: `main.py`)
- CLI workflow → Chroma vector store: builds store (evidence: `main.py`)
- Chroma vector store → Embedding model: embeds chunks (evidence: `vectorstore/chroma_store.py`)
- CLI workflow → Retrieval QA chain: creates QA chain (evidence: `main.py`)
- Retrieval QA chain → Chroma vector store: retrieves passages (evidence: `rag_pipeline/qa_chain.py`)
- Retrieval QA chain → LLaMA generator: loads generator (evidence: `rag_pipeline/qa_chain.py`)
- CLI workflow → Retrieval QA chain: submits query (evidence: `main.py`)
- CLI workflow → Question asker: prints answer (evidence: `main.py`)
- Support training dataset → Fine-tuning notebook: trains on (evidence: `README.md`)
- Fine-tuning notebook → LLaMA generator: fine-tunes model (evidence: `README.md`)
