# thanushamh/talentscout-chatbot architecture

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

- Interactive diagram: https://gitdiagram.com/thanushamh/talentscout-chatbot
- Repository: https://github.com/thanushamh/talentscout-chatbot

## Overview

TalentScout is a Streamlit hiring-screening chatbot. A candidate enters a chat, is guided through profile collection and validation, then receives technical questions generated from their role, experience, and tech stack. The app keeps candidate data and chat history in session state. Its LLM utility supports local TinyLLaMA through Ollama and a mock-question mode; the README also describes a question-only display after profile submission. The graph follows visible calls and documented behavior; it does not assume additional storage or service integrations.

Main entry points: [`app.py`](https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py) (Screening flow), [`utils.py`](https://github.com/thanushamh/talentscout-chatbot/blob/main/utils.py) (LLM response selector), [`prompts.py`](https://github.com/thanushamh/talentscout-chatbot/blob/main/prompts.py) (Prompt definitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversation["Candidate conversation"]
  node_streamlit_app["Screening flow<br/>[app.py]"]
  node_profile["Profile collection<br/>[app.py]"]
  node_session[("Session state<br/>[app.py]")]
end

subgraph group_generation["Question generation"]
  node_prompts["Prompt definitions<br/>[prompts.py]"]
  node_llm_router["LLM response selector<br/>[utils.py]"]
  node_ollama["TinyLLaMA via Ollama<br/>[utils.py]"]
  node_mock["Mock questions<br/>[utils.py]"]
  node_questions["Technical questions<br/>[app.py]"]
end

node_candidate(("Candidate"))

node_candidate -->|"enters answers"| node_streamlit_app
node_streamlit_app -->|"routes answers"| node_profile
node_profile -->|"stores details"| node_session
node_streamlit_app -->|"stores chat"| node_session
node_streamlit_app -->|"imports prompts"| node_prompts
node_streamlit_app -->|"requests questions"| node_llm_router
node_llm_router -->|"selects local model"| node_ollama
node_llm_router -.->|"selects mock mode"| node_mock
node_ollama -->|"returns output"| node_questions
node_mock -->|"returns questions"| node_questions
node_streamlit_app -->|"displays output"| node_questions

click node_streamlit_app "https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py"
click node_profile "https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py"
click node_session "https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py"
click node_prompts "https://github.com/thanushamh/talentscout-chatbot/blob/main/prompts.py"
click node_llm_router "https://github.com/thanushamh/talentscout-chatbot/blob/main/utils.py"
click node_ollama "https://github.com/thanushamh/talentscout-chatbot/blob/main/utils.py"
click node_mock "https://github.com/thanushamh/talentscout-chatbot/blob/main/utils.py"
click node_questions "https://github.com/thanushamh/talentscout-chatbot/blob/main/app.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_streamlit_app,node_profile,node_session toneBlue
class node_prompts,node_llm_router,node_ollama,node_mock,node_questions toneAmber
class node_candidate toneIndigo
```

## Components

### Candidate conversation

- [Screening flow](https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py): `app.py`
- [Profile collection](https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py): `app.py`
- [Session state](https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py): `app.py`

### Question generation

- [Prompt definitions](https://github.com/thanushamh/talentscout-chatbot/blob/main/prompts.py): `prompts.py`
- [LLM response selector](https://github.com/thanushamh/talentscout-chatbot/blob/main/utils.py): `utils.py`
- [TinyLLaMA via Ollama](https://github.com/thanushamh/talentscout-chatbot/blob/main/utils.py): `utils.py`
- [Mock questions](https://github.com/thanushamh/talentscout-chatbot/blob/main/utils.py): `utils.py`
- [Technical questions](https://github.com/thanushamh/talentscout-chatbot/blob/main/app.py): `app.py`

### Other components

- **Candidate**

## Connections

- Candidate → Screening flow: enters answers (evidence: `app.py`)
- Screening flow → Profile collection: routes answers (evidence: `app.py`)
- Profile collection → Session state: stores details (evidence: `app.py`)
- Screening flow → Session state: stores chat (evidence: `app.py`)
- Screening flow → Prompt definitions: imports prompts (evidence: `app.py`)
- Screening flow → LLM response selector: requests questions (evidence: `app.py`)
- LLM response selector → TinyLLaMA via Ollama: selects local model (evidence: `utils.py`)
- LLM response selector → Mock questions: selects mock mode (evidence: `utils.py`)
- TinyLLaMA via Ollama → Technical questions: returns output (evidence: `utils.py`)
- Mock questions → Technical questions: returns questions (evidence: `utils.py`)
- Screening flow → Technical questions: displays output (evidence: `app.py`)
