# bot041/resumescreening-agent-ml-model architecture

> Architecture diagram of the GitHub repository bot041/resumescreening-agent-ml-model, 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/bot041/resumescreening-agent-ml-model
- Repository: https://github.com/bot041/resumescreening-agent-ml-model

## Overview

Resume Screening Agent ranks resumes against a job description through its CLI or Python API: it parses PDF, DOCX, or TXT files, extracts structured match features, computes lexical and semantic similarity, and predicts and orders relevance scores. The separate training path generates synthetic examples, builds features, fits an XGBoost model, and saves artifacts used at inference. The README documents both entry modes and CSV output. Training internals are only partly sampled, so the graph limits that branch to documented behavior.

Main entry points: [`src/rank_candidates.py`](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/rank_candidates.py) (Ranker / CLI), [`src/train_model.py`](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/train_model.py) (Training pipeline), [`src/parse_resume.py`](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/parse_resume.py) (Resume parser), [`src/extract_features.py`](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/extract_features.py) (Feature extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ranking["Ranking workflow"]
  node_ranker["Ranker / CLI<br/>[rank_candidates.py]"]
  node_jd["Job description"]
  node_resume_files["Resume files"]
  node_results["Ranked results"]
  node_csv["CSV output"]
end

subgraph group_analysis["Resume analysis"]
  node_parser["Resume parser<br/>[parse_resume.py]"]
  node_features["Feature extraction"]
  node_utils["Text and taxonomy<br/>[utils.py]"]
  node_similarity["Similarity scorer<br/>[similarity.py]"]
  node_embedding_model["Sentence-BERT model"]
end

subgraph group_training["Model training"]
  node_trainer["Training pipeline<br/>[train_model.py]"]
  node_synthetic_data["Synthetic examples"]
end

subgraph group_artifacts["Model artifacts"]
  node_model_artifacts["Model and scaler"]
end

node_user(("Recruiter / caller"))

node_user -->|"invokes"| node_ranker
node_user -->|"provides"| node_jd
node_user -->|"provides"| node_resume_files
node_ranker -->|"parses folder"| node_parser
node_resume_files -->|"reads files"| node_parser
node_parser -->|"returns text"| node_ranker
node_ranker -->|"scores pairs"| node_similarity
node_similarity -->|"encodes text"| node_embedding_model
node_ranker -->|"extracts features"| node_features
node_features -->|"extracts metadata"| node_utils
node_jd -->|"supplies text"| node_ranker
node_ranker -->|"loads model and scaler"| node_model_artifacts
node_ranker -->|"produces ranking"| node_results
node_ranker -->|"writes CSV"| node_csv
node_user -->|"starts training"| node_trainer
node_trainer -->|"generates examples"| node_synthetic_data
node_trainer -->|"computes features"| node_similarity
node_trainer -->|"builds features"| node_features
node_trainer -->|"saves artifacts"| node_model_artifacts

click node_ranker "https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/rank_candidates.py"
click node_parser "https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/parse_resume.py"
click node_features "https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/extract_features.py"
click node_utils "https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/utils.py"
click node_similarity "https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/similarity.py"
click node_trainer "https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/train_model.py"
click node_model_artifacts "https://github.com/bot041/resumescreening-agent-ml-model/tree/main/models"

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_ranker,node_jd,node_resume_files,node_results,node_csv toneBlue
class node_parser,node_features,node_utils,node_similarity,node_embedding_model toneAmber
class node_trainer,node_synthetic_data toneMint
class node_model_artifacts toneRose
class node_user toneIndigo
```

## Components

### Ranking workflow

- [Ranker / CLI](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/rank_candidates.py): `src/rank_candidates.py`
- **Job description**
- **Resume files**
- **Ranked results**
- **CSV output**

### Resume analysis

- [Resume parser](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/parse_resume.py): `src/parse_resume.py`
- [Feature extraction](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/extract_features.py): `src/extract_features.py`
- [Text and taxonomy](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/utils.py): `src/utils.py`
- [Similarity scorer](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/similarity.py): `src/similarity.py`
- **Sentence-BERT model**

### Model training

- [Training pipeline](https://github.com/bot041/resumescreening-agent-ml-model/blob/main/src/train_model.py): `src/train_model.py`
- **Synthetic examples**

### Model artifacts

- [Model and scaler](https://github.com/bot041/resumescreening-agent-ml-model/tree/main/models): `models`

### Other components

- **Recruiter / caller**

## Connections

- Recruiter / caller → Ranker / CLI: invokes
- Recruiter / caller → Job description: provides
- Recruiter / caller → Resume files: provides
- Ranker / CLI → Resume parser: parses folder
- Resume files → Resume parser: reads files
- Resume parser → Ranker / CLI: returns text
- Ranker / CLI → Similarity scorer: scores pairs
- Similarity scorer → Sentence-BERT model: encodes text
- Ranker / CLI → Feature extraction: extracts features
- Feature extraction → Text and taxonomy: extracts metadata
- Job description → Ranker / CLI: supplies text
- Ranker / CLI → Model and scaler: loads model and scaler
- Ranker / CLI → Ranked results: produces ranking
- Ranker / CLI → CSV output: writes CSV
- Recruiter / caller → Training pipeline: starts training
- Training pipeline → Synthetic examples: generates examples
- Training pipeline → Similarity scorer: computes features
- Training pipeline → Feature extraction: builds features
- Training pipeline → Model and scaler: saves artifacts
