# vishavgupta01/resume-screening-ai-agent architecture

> Architecture diagram of the GitHub repository vishavgupta01/resume-screening-ai-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vishavgupta01/resume-screening-ai-agent
- Repository: https://github.com/vishavgupta01/resume-screening-ai-agent

## Overview

##### Project type and purpose
- This is a Python-based resume-screening tool implemented as a Jupyter notebook (Resume_Screening_AI_Agent.ipynb).
- Its purpose is to ingest PDF/DOCX resumes, extract text, compute similarity against a job description, extract years of experience, and produce a ranked list of candidates.

##### File structure
- Top-level:
- README.md – project description and usage instructions
- Resume_Screening_AI_Agent.ipynb – main processing notebook
- Resumes/ – folder containing sample PDF and DOCX resumes
- No separate frontend, backend, or deployment scripts—this is a standalone data-processing pipeline.

##### README for additional insights
- Dependencies: python-docx, PyPDF2, nltk, scikit-learn, docx2txt, pandas, numpy
- Workflow described: drop resumes in folder, set job_description_text, run script, view ranked output

##### Main components and their interactions
a. Resume Ingestion
- Component: File System Reader
- Reads all files in Resumes/ directory (PDF & DOCX)
b. Text Extraction
- Component: PDF Parser (PyPDF2) & DOCX Parser (python-docx or docx2txt)
- Output: raw text per resume
c. Text Preprocessing & Feature Extraction
- Component: NLP Processing (NLTK for tokenization, stop-word removal)
- Component: Vectorizer (scikit-learn TF-IDF or similar)
- Output: numeric vectors for resumes and job description
d. Similarity Scoring
- Component: Similarity Calculator (cosine similarity)
- Inputs: resume vectors, job description vector
- Output: similarity score
e. Experience Extraction
- Component: Experience Parser (regex or NLP rules)
- Output: years of experience per resume
f. Ranking & Output
- Component: Ranking Engine (combines similarity + experience score)
- Output: sorted list printed or saved

##### Relationships & data flow
→ Two parallel branches:
1. similarity scoring ← job_description_text
2. experience extraction
→ Ranking Engine → Final output

##### Architectural patterns & design principles
- Pipeline pattern: linear stages, each stage receives data from previous
- Separation of concerns: distinct modules for I/O, parsing, NLP, scoring, ranking

##### Technologies & libraries
- File I/O: built-in Python file system APIs
- PDF parsing: PyPDF2
- DOCX parsing: python-docx or docx2txt
- NLP: NLTK
- Feature extraction & ML: scikit-learn (TF-IDF, cosine similarity)
- Data handling: pandas, numpy
- Orchestration: Jupyter notebook acts as the driver

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Input Sources
    README["README.md"]:::io
    Notebook["Resume_Screening_AI_Agent.ipynb"]:::io
    ResumesFolder["Resumes/"]:::io
    JobDesc["Job Description Text"]:::io

    %% Ingestion & Parsing Stage
    subgraph "Ingestion & Parsing"
        direction TB
        FileReader["File System Reader"]:::ingestion
        PDFParser["PDF Parser\n(PyPDF2)"]:::ingestion
        DOCXParser["DOCX Parser\n(python-docx/docx2txt)"]:::ingestion
    end

    %% NLP & Feature Extraction Stage
    subgraph "NLP & Feature Extraction"
        direction TB
        NLP["NLP Processing\n(NLTK)"]:::feature
        Vectorizer["TF-IDF Vectorizer"]:::feature
    end

    %% Scoring & Ranking Stage
    subgraph "Scoring & Ranking"
        direction TB
        SimilarityCalc["Similarity Calculator\n(CosineSimilarity)"]:::scoring
        ExperienceParser["Experience Parser"]:::scoring
        Ranking["Ranking Engine"]:::scoring
    end

    %% Final Output
    FinalOutput["Ranked Candidates List"]:::io

    %% Data Flow
    ResumesFolder -->|PDF & DOCX files| FileReader
    FileReader -->|file streams| PDFParser
    FileReader -->|file streams| DOCXParser
    PDFParser -->|raw text| NLP
    DOCXParser -->|raw text| NLP
    NLP -->|cleaned text| Vectorizer
    Vectorizer -->|vectors| SimilarityCalc
    JobDesc -->|vector| SimilarityCalc
    Vectorizer -->|vectors| ExperienceParser
    SimilarityCalc -->|similarity scores| Ranking
    ExperienceParser -->|years exp| Ranking
    Ranking -->|ranked list| FinalOutput

    %% Click Events
    click README "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/README.md"
    click Notebook "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"
    click ResumesFolder "https://github.com/vishavgupta01/resume-screening-ai-agent/tree/main/Resumes/"
    click PDFParser "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"
    click DOCXParser "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"
    click NLP "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"
    click Vectorizer "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"
    click SimilarityCalc "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"
    click ExperienceParser "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"
    click Ranking "https://github.com/vishavgupta01/resume-screening-ai-agent/blob/main/Resume_Screening_AI_Agent.ipynb"

    %% Styles
    classDef io fill:#e1bee7,stroke:#333,stroke-width:1px;
    classDef ingestion fill:#bbdefb,stroke:#333,stroke-width:1px;
    classDef feature fill:#c8e6c9,stroke:#333,stroke-width:1px;
    classDef scoring fill:#ffe0b2,stroke:#333,stroke-width:1px;
```
