ai-resume-screening-agent

πŸ€– AI Resume Screening Agent Explainable NLP-powered candidate screening and ranking system built for automated resume analysis.

An end-to-end AI Resume Screening Agent that evaluates multiple resumes against a given Job Description (JD) using a transparent hybrid scoring approach.

The system combines TF-IDF NLP similarity, technical skill matching, experience relevance, and education signals to rank candidates and provide explainable screening recommendations.

πŸš€ Project Overview Recruiters often need to evaluate a large number of resumes against a single Job Description. Manually comparing candidates can be time-consuming and inconsistent.

This project provides a lightweight and explainable solution that can:

πŸ“„ Parse resumes from TXT, PDF, and DOCX formats πŸ” Analyze resumes against a Job Description 🧠 Calculate TF-IDF cosine similarity πŸ› οΈ Detect and compare relevant technical skills πŸ’Ό Evaluate experience relevance πŸŽ“ Identify education signals πŸ“Š Generate an overall candidate score πŸ† Rank candidates automatically πŸ’‘ Provide transparent reasoning for each recommendation πŸ“ Export results to CSV and JSON 🌐 Provide an interactive Streamlit web interface ⚑ Process 10+ resumes in a single run 🎯 Key Features Feature Description πŸ“„ Multi-format Resume Parsing Supports TXT, PDF and DOCX resumes πŸ”Ž NLP Similarity Uses TF-IDF + cosine similarity πŸ› οΈ Skill Matching Identifies matched and missing skills πŸ’Ό Experience Analysis Extracts years of experience using lightweight heuristics πŸŽ“ Education Analysis Detects relevant degree and education signals πŸ† Candidate Ranking Sorts candidates using a weighted scoring model πŸ’‘ Explainable Results Provides reasoning behind candidate scores πŸ“Š Structured Outputs Generates CSV and JSON reports 🌐 Streamlit UI Interactive browser-based screening interface πŸ’» CLI Support Run the screening pipeline directly from the terminal πŸ” API-Key Independent Core screening pipeline does not require an external LLM API 🧠 System Architecture The screening pipeline follows:

         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚   Job Description   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚  Resume Collection  β”‚
         β”‚ TXT / PDF / DOCX    β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚   Text Extraction   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚  Feature Extraction β”‚
         β”‚                     β”‚
         β”‚ β€’ Skills            β”‚
         β”‚ β€’ Experience        β”‚
         β”‚ β€’ Education         β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚     NLP Scoring     β”‚
         β”‚ TF-IDF + Cosine     β”‚
         β”‚ Similarity           β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ Hybrid Score Engine β”‚
         β”‚                     β”‚
         β”‚ 55% NLP Similarity  β”‚
         β”‚ 30% Skill Match     β”‚
         β”‚ 10% Experience      β”‚
         β”‚  5% Education       β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ Candidate Ranking   β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚ CSV / JSON / Streamlit UI  β”‚
      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βš™οΈ Scoring Methodology

The project uses a hybrid and explainable scoring framework.

πŸ“ Final Score Final Score = 55% Γ— TF-IDF Semantic Similarity + 30% Γ— Skill Match + 10% Γ— Experience Relevance + 5% Γ— Education Relevance

The final score is normalized to a 0–100 scale.

πŸ”Ή 1. TF-IDF Similarity β€” 55%

The system converts the Job Description and resumes into TF-IDF vectors and calculates cosine similarity.

This provides an NLP-based measure of textual relevance between the candidate’s resume and the job requirements.

πŸ”Ή 2. Skill Match β€” 30%

The system identifies skills from a predefined skill vocabulary and compares:

Job Description Skills ↓ Candidate Skills ↓ Matched Skills + Missing Skills

This makes technical compatibility explicit.

πŸ”Ή 3. Experience Relevance β€” 10%

Experience information is extracted using lightweight regular-expression heuristics.

For the current Junior/Fresher use case:

0–2 years β†’ 100% 3 years β†’ 80% 4–5 years β†’ 55% 5+ years β†’ 30% πŸ”Ή 4. Education Relevance β€” 5%

The system detects relevant degree and education terminology such as:

BTech / B.Tech BE / B.E BSc / B.Sc BCA Computer Science Data Science Information Technology Statistics Mathematics 🏷️ Candidate Recommendations

Candidates are classified according to their final score:

75+ β†’ Strong Shortlist 60–74.99 β†’ Shortlist 45–59.99 β†’ Review Below 45 β†’ Low Match

These thresholds are configurable in app.py.

πŸ“‚ Project Structure ai-resume-screening-agent/ β”‚ β”œβ”€β”€ πŸ“„ app.py β”œβ”€β”€ πŸ“„ README.md β”œβ”€β”€ πŸ“„ requirements.txt β”œβ”€β”€ πŸ“„ .env.example β”œβ”€β”€ πŸ“„ job_description.txt β”‚ β”œβ”€β”€ πŸ“ sample_data/ β”‚ └── πŸ“ resumes/ β”‚ β”œβ”€β”€ candidate_01.txt β”‚ β”œβ”€β”€ candidate_02.txt β”‚ β”œβ”€β”€ candidate_03.txt β”‚ β”œβ”€β”€ … β”‚ └── candidate_12.txt β”‚ └── πŸ“ outputs/ β”œβ”€β”€ ranked_candidates.csv β”œβ”€β”€ ranked_candidates.json └── sample_run_summary.json πŸ› οΈ Technology Stack Programming & Frameworks 🐍 Python 🌐 Streamlit Machine Learning / NLP πŸ€– Scikit-learn πŸ“Š TF-IDF Vectorization πŸ“ Cosine Similarity πŸ”€ Regex-based information extraction Document Processing πŸ“‘ PyPDF πŸ“ python-docx Data & Output πŸ“‹ CSV πŸ—‚οΈ JSON πŸ’» Installation 1️⃣ Clone the repository git clone https://github.com/YOUR_USERNAME/ai-resume-screening-agent.git cd ai-resume-screening-agent 2️⃣ Create a virtual environment Windows python -m venv .venv .venv\Scripts\activate macOS / Linux python3 -m venv .venv source .venv/bin/activate 3️⃣ Install dependencies pip install -r requirements.txt ▢️ Running the Project πŸ’» CLI Mode

Run the screening pipeline using:

python app.py –jd job_description.txt –resumes sample_data/resumes –top 10

Example output:

=== Resume Screening Agent ===

Processed: 12 resumes JD: job_description.txt

Rank | Candidate | Score | Recommendation

1 | candidate_04 | 52.77 | Review 2 | candidate_02 | 50.77 | Review 3 | candidate_01 | 50.46 | Review 4 | candidate_12 | 50.16 | Review 5 | candidate_08 | 49.43 | Review

Generated files:

outputs/ranked_candidates.csv outputs/ranked_candidates.json 🌐 Streamlit Web Application

Launch the interactive UI with:

streamlit run app.py

Then open:

http://localhost:8501 Streamlit Workflow

  1. Enter Job Description ↓
  2. Upload resumes ↓
  3. Click β€œScreen Candidates” ↓
  4. Process resumes ↓
  5. Calculate candidate scores ↓
  6. Display ranked candidates ↓
  7. Download CSV / JSON results

The interface provides:

πŸ“‹ Job Description input πŸ“€ Resume upload πŸ† Candidate ranking πŸ“Š Score breakdown πŸ› οΈ Matched skills ⚠️ Missing skills πŸ’‘ Candidate reasoning ⬇️ CSV download ⬇️ JSON download πŸ“Š Output Schema

The generated candidate results contain:

rank candidate final_score semantic_similarity skill_match experience_score education_score matched_skills missing_skills recommendation reasoning

Example:

{ β€œcandidate”: β€œcandidate_04”, β€œfinal_score”: 52.77, β€œsemantic_similarity”: 27.63, β€œskill_match”: 78.57, β€œexperience_score”: 100.0, β€œeducation_score”: 80.0, β€œrecommendation”: β€œReview”, β€œrank”: 1 } πŸ§ͺ Sample Dataset

The repository includes 12 synthetic/sample resumes for demonstration and evaluation.

The sample dataset allows the complete screening workflow to be tested without requiring external candidate data.

Example:

python app.py
–jd job_description.txt
–resumes sample_data/resumes
–top 10 πŸ” Explainability

A key design goal of this project is transparent candidate evaluation.

Instead of producing only a single score, the system exposes the underlying signals:

Final Score β”‚ β”œβ”€β”€ TF-IDF Similarity β”œβ”€β”€ Skill Match β”œβ”€β”€ Experience Score └── Education Score

For each candidate, the system also reports:

βœ… Matched skills ❌ Missing skills πŸ“Š Similarity percentage πŸ’Ό Estimated experience πŸŽ“ Education signal πŸ’‘ Screening reasoning

This makes the system easier to inspect and debug than a completely black-box ranking approach.

🎯 Design Philosophy

The project intentionally uses a lightweight, reproducible, and explainable NLP approach rather than requiring a large language model for the core screening pipeline.

Why TF-IDF? ⚑ Fast πŸ’» Runs locally πŸ” No external API dependency πŸ’° No inference cost πŸ” Easy to interpret ♻️ Reproducible Why Hybrid Scoring?

Text similarity alone may not accurately represent candidate suitability.

Therefore, the system combines:

NLP Relevance + Technical Skills + Experience + Education = Candidate Ranking ⚠️ Limitations

This project is designed as a research/portfolio prototype and has several limitations:

TF-IDF is less semantically powerful than transformer-based embeddings. Skill extraction currently uses a predefined dictionary. Unusual or synonymous skill descriptions may not be detected. Experience extraction uses lightweight regex heuristics. Scanned image-only PDFs require OCR and are not currently handled. Education detection is keyword-based. The system should support human recruiting decisions rather than replace human judgment. The current implementation does not perform formal fairness or bias auditing. πŸš€ Future Improvements

Planned research and engineering improvements include:

🧠 Advanced NLP Sentence-BERT / transformer embeddings Semantic search Context-aware skill extraction Resume-to-JD embedding similarity πŸ€– LLM Integration Evidence-grounded candidate summaries Structured interview-question generation Explainable candidate comparisons Strict source-grounded reasoning πŸ“„ Document Intelligence OCR for scanned resumes Improved PDF parsing Section-aware resume extraction Entity extraction for education and experience πŸ“Š Analytics Candidate score distributions Skill-gap visualization Candidate comparison dashboard Hiring pipeline analytics βš–οΈ Responsible AI Fairness auditing Bias detection Explainability evaluation Human-in-the-loop review workflows πŸ§ͺ Engineering Unit testing Integration testing CI/CD with GitHub Actions Improved configuration management Production deployment πŸ” Environment Variables

The current core pipeline does not require an external API key.

An .env.example file is included for potential future LLM integration:

OPENAI_API_KEY=

No API key is required for the current TF-IDF-based screening workflow.

πŸ“Œ Use Cases

This prototype can be extended for:

πŸ‘¨β€πŸ’Ό Recruitment screening πŸ§‘β€πŸ’» Technical hiring πŸŽ“ Campus recruitment πŸ“‹ Resume shortlisting 🏒 HR automation πŸ”Ž Candidate-job matching πŸ“Š Recruitment analytics πŸ§ͺ NLP/AI research experiments βš–οΈ Responsible AI Notice

Resume screening can influence employment decisions.

This project is intended as a decision-support and research prototype, not as an autonomous hiring system.

Human recruiters should review candidate profiles, verify qualifications, and consider factors beyond automated scores.

Automated ranking should not be treated as a definitive measure of a candidate’s ability or suitability.

πŸ“ˆ Project Status Status: 🟒 Working Prototype

βœ” CLI screening pipeline βœ” Streamlit web interface βœ” TXT/PDF/DOCX parsing βœ” TF-IDF similarity βœ” Skill matching βœ” Experience scoring βœ” Education scoring βœ” Candidate ranking βœ” Explainable reasoning βœ” CSV output βœ” JSON output βœ” 10+ resume batch processing πŸ† Challenge Alignment

This project follows an end-to-end AI-agent-style workflow:

INPUT ↓ Job Description + Resumes ↓ RETRIEVE / PARSE ↓ Resume Text Extraction ↓ THINK / SCORE ↓ NLP Similarity + Skills + Experience + Education ↓ RANK ↓ Candidate Shortlist ↓ OUTPUT ↓ CSV + JSON + Streamlit Dashboard

The implementation prioritizes reproducibility, transparency, and local execution.

πŸ‘¨β€πŸ’» Author

Your Name

AI / Machine Learning Researcher Python NLP Generative AI

πŸ“Œ GitHub: https://github.com/YOUR_USERNAME

⭐ Support the Project

If you find this project useful:

⭐ Star the repository 🍴 Fork the project πŸ› Open an issue πŸ’‘ Suggest improvements 🀝 Contribute to the project

πŸ“„ License

Add an appropriate open-source license before public release.

For example:

MIT License πŸ”– Keywords

AI Artificial Intelligence Machine Learning NLP Natural Language Processing Resume Screening Candidate Ranking Recruitment Automation HR Tech TF-IDF Scikit-Learn Python Streamlit Explainable AI Talent Acquisition Job Matching Resume Parser AI Agent

One correction before you publish: your current ZIP contains __pycache__/app.cpython-313.pyc, so make sure that is excluded with .gitignore. Also, your README currently says the Streamlit command is streamlit run app.py -- --ui, but your actual app.py only enters the Streamlit UI when --ui is passed; the command you successfully used in your screenshot was streamlit run app.py, which Streamlit runs correctly because it executes the script in its Streamlit context. For the GitHub README, I therefore recommend the simpler command shown above.