# anaeim/hr-ai-agent architecture

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

- Interactive diagram: https://gitdiagram.com/anaeim/hr-ai-agent
- Repository: https://github.com/anaeim/hr-ai-agent

## Overview

AIAgent is an HR resume-screening workflow: resume PDFs are parsed, candidates receive binary skill checks, then fine-grained experience assessment and proficiency filtering, followed by skill summaries and ranking. The README identifies graph.ipynb as the workflow implementation and documents the major stages; the sampled chains show structured GPT-4o graders and summary generation. The OCR and reranker implementations were not sampled, so their nodes and links rely on README descriptions rather than inspected source. The notebook’s detailed routing and utility usage are not visible here.

Main entry points: [`graph.ipynb`](https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb) (Screening Workflow), [`models/pdf_ocr/ocr_qwen25.ipynb`](https://github.com/anaeim/hr-ai-agent/blob/main/models/pdf_ocr/ocr_qwen25.ipynb) (PDF Extraction), [`chains/skill_grader.py`](https://github.com/anaeim/hr-ai-agent/blob/main/chains/skill_grader.py) (Binary Skill Grader), [`chains/fine_grained_skill_grader.py`](https://github.com/anaeim/hr-ai-agent/blob/main/chains/fine_grained_skill_grader.py) (Fine-Grained Grader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_resume_intake["Resume Intake"]
  node_workflow["Screening Workflow<br/>[graph.ipynb]"]
  node_pdf_extraction["PDF Extraction<br/>[ocr_qwen25.ipynb]"]
end

subgraph group_skill_screening["Skill Screening"]
  node_binary_grader["Binary Skill Grader<br/>[skill_grader.py]"]
  node_binary_filter["Skill-Based Filter<br/>[graph.ipynb]"]
  node_fine_grader["Fine-Grained Grader"]
  node_proficiency_filter["Proficiency Filter<br/>[graph.ipynb]"]
end

subgraph group_candidate_review["Candidate Review"]
  node_summary_writer["Skill Summary Writer"]
  node_reranker["Resume Reranker<br/>[graph.ipynb]"]
  node_ideal_profile["Ideal Candidate Profile<br/>[graph.ipynb]"]
  node_shortlist["Ranked Shortlist<br/>[graph.ipynb]"]
end

subgraph group_workflow_support["Workflow Support"]
  node_file_utils["File Utilities<br/>[utils.py]"]
  node_desired_skills["Desired Skills<br/>[desired_skills.txt]"]
end

node_hr_team(("HR Team"))
node_resume_pdf["Resume PDFs"]
node_qwen_vlm{{"Qwen 2.5 VLM"}}
node_openai{{"GPT-4o"}}
node_qwen_reranker{{"Qwen3 Reranker"}}

node_hr_team -->|"initiates screening"| node_workflow
node_resume_pdf -->|"provides resumes"| node_pdf_extraction
node_workflow -->|"runs extraction"| node_pdf_extraction
node_pdf_extraction -->|"uses vision model"| node_qwen_vlm
node_workflow -->|"runs skill checks"| node_binary_grader
node_binary_grader -->|"requests grading"| node_openai
node_workflow -->|"applies skill criteria"| node_binary_filter
node_workflow -->|"runs detailed assessment"| node_fine_grader
node_fine_grader -->|"requests assessment"| node_openai
node_workflow -->|"applies experience thresholds"| node_proficiency_filter
node_workflow -->|"generates skill summaries"| node_summary_writer
node_summary_writer -->|"requests summary"| node_openai
node_workflow -->|"ranks candidates"| node_reranker
node_ideal_profile -->|"defines ranking target"| node_reranker
node_reranker -->|"uses ranking model"| node_qwen_reranker
node_workflow -->|"produces shortlist"| node_shortlist
node_desired_skills -->|"read as text"| node_file_utils

click node_workflow "https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb"
click node_pdf_extraction "https://github.com/anaeim/hr-ai-agent/blob/main/models/pdf_ocr/ocr_qwen25.ipynb"
click node_binary_grader "https://github.com/anaeim/hr-ai-agent/blob/main/chains/skill_grader.py"
click node_binary_filter "https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb"
click node_fine_grader "https://github.com/anaeim/hr-ai-agent/blob/main/chains/fine_grained_skill_grader.py"
click node_proficiency_filter "https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb"
click node_summary_writer "https://github.com/anaeim/hr-ai-agent/blob/main/chains/skill_summary_writer.py"
click node_reranker "https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb"
click node_ideal_profile "https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb"
click node_shortlist "https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb"
click node_file_utils "https://github.com/anaeim/hr-ai-agent/blob/main/utils.py"
click node_desired_skills "https://github.com/anaeim/hr-ai-agent/blob/main/desired_skills.txt"

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_workflow,node_pdf_extraction toneBlue
class node_binary_grader,node_binary_filter,node_fine_grader,node_proficiency_filter toneAmber
class node_summary_writer,node_reranker,node_ideal_profile,node_shortlist toneMint
class node_file_utils,node_desired_skills toneRose
class node_hr_team,node_resume_pdf,node_qwen_vlm,node_openai,node_qwen_reranker toneIndigo
```

## Components

### Resume Intake

- [Screening Workflow](https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb): `graph.ipynb`
- [PDF Extraction](https://github.com/anaeim/hr-ai-agent/blob/main/models/pdf_ocr/ocr_qwen25.ipynb): `models/pdf_ocr/ocr_qwen25.ipynb`

### Skill Screening

- [Binary Skill Grader](https://github.com/anaeim/hr-ai-agent/blob/main/chains/skill_grader.py): `chains/skill_grader.py`
- [Skill-Based Filter](https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb): `graph.ipynb`
- [Fine-Grained Grader](https://github.com/anaeim/hr-ai-agent/blob/main/chains/fine_grained_skill_grader.py): `chains/fine_grained_skill_grader.py`
- [Proficiency Filter](https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb): `graph.ipynb`

### Candidate Review

- [Skill Summary Writer](https://github.com/anaeim/hr-ai-agent/blob/main/chains/skill_summary_writer.py): `chains/skill_summary_writer.py`
- [Resume Reranker](https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb): `graph.ipynb`
- [Ideal Candidate Profile](https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb): `graph.ipynb`
- [Ranked Shortlist](https://github.com/anaeim/hr-ai-agent/blob/main/graph.ipynb): `graph.ipynb`

### Workflow Support

- [File Utilities](https://github.com/anaeim/hr-ai-agent/blob/main/utils.py): `utils.py`
- [Desired Skills](https://github.com/anaeim/hr-ai-agent/blob/main/desired_skills.txt): `desired_skills.txt`

### Other components

- **HR Team**
- **Resume PDFs**
- **Qwen 2.5 VLM**
- **GPT-4o**
- **Qwen3 Reranker**

## Connections

- HR Team → Screening Workflow: initiates screening (evidence: `README.md`)
- Resume PDFs → PDF Extraction: provides resumes (evidence: `README.md`)
- Screening Workflow → PDF Extraction: runs extraction (evidence: `README.md`)
- PDF Extraction → Qwen 2.5 VLM: uses vision model (evidence: `README.md`)
- Screening Workflow → Binary Skill Grader: runs skill checks (evidence: `README.md`)
- Binary Skill Grader → GPT-4o: requests grading (evidence: `chains/skill_grader.py`)
- Screening Workflow → Skill-Based Filter: applies skill criteria (evidence: `README.md`)
- Screening Workflow → Fine-Grained Grader: runs detailed assessment (evidence: `README.md`)
- Fine-Grained Grader → GPT-4o: requests assessment (evidence: `chains/fine_grained_skill_grader.py`)
- Screening Workflow → Proficiency Filter: applies experience thresholds (evidence: `README.md`)
- Screening Workflow → Skill Summary Writer: generates skill summaries (evidence: `README.md`)
- Skill Summary Writer → GPT-4o: requests summary (evidence: `chains/skill_summary_writer.py`)
- Screening Workflow → Resume Reranker: ranks candidates (evidence: `README.md`)
- Ideal Candidate Profile → Resume Reranker: defines ranking target (evidence: `README.md`)
- Resume Reranker → Qwen3 Reranker: uses ranking model (evidence: `README.md`)
- Screening Workflow → Ranked Shortlist: produces shortlist (evidence: `README.md`)
- Desired Skills → File Utilities: read as text (evidence: `utils.py`)
