Skip to content

About

Resume reviewer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Resume Job Matcher

A Streamlit app that compares a resume against a job description and returns a match score, strengths, skill gaps, and an apply/pass recommendation.

Features

  • Resume input: upload PDF, DOCX, or TXT, or paste resume text
  • Job description: paste the full JD in the app
  • Match score (0–100): weighted blend of skills, semantic similarity, and experience fit
  • Strengths: highlights where your resume aligns well
  • Skills analysis: matched skills, missing skills, and bonus skills
  • Recommendation: Apply, Consider applying, or Pass with a short explanation

Scoring

Component Weight Description
Skills match 50% Overlap between skills found in resume vs job description
Semantic similarity 25% TF-IDF cosine similarity between resume and JD text
Experience fit 25% Resume years of experience vs years required in JD

Recommendation thresholds

Score Verdict
≥ 75% Apply
55–74% Consider applying
< 55% Pass

Project structure

.
├── app.py                 # Streamlit UI
├── analyzer.py            # Analysis logic (extraction, scoring, recommendations)
├── prompts.py             # Model instructions, thresholds, and prompt templates
├── skills_db.json         # Skills dictionary
└── requirements.txt

Setup

  1. Clone the repository (or open the project folder).

  2. Create a virtual environment (recommended):

    python -m venv .venv

    Activate it:

    • Windows: .venv\Scripts\activate
    • macOS/Linux: source .venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

Run

streamlit run app.py

Open the URL shown in the terminal (usually http://localhost:8501).

Usage

  1. Upload a resume file or paste resume text in the left panel.
  2. Paste the job description in the right panel.
  3. Click Analyze Match.
  4. Review the overall score, breakdown, strengths, missing skills, and recommendation.

Customization

  • Add skills: edit skills_db.json with domain-specific technologies or tools.
  • Tune weights & thresholds: adjust constants in prompts.py.
  • Change analysis logic: modify functions in analyzer.py.
  • LLM integration: use SYSTEM_PROMPT and USER_PROMPT_TEMPLATE in prompts.py.

Limitations

  • Skill detection uses keyword matching against a predefined list — synonyms or uncommon phrasing may be missed.
  • PDF text extraction works best on text-based PDFs; scanned images require OCR (not included).
  • Scores are heuristic guides, not hiring decisions.

Requirements

  • Python 3.10+
  • See requirements.txt for package versions

Environment & Configuration

This project supports optional LLM integrations and local deterministic analysis. A .env file at the repo root controls behavior. Example variables (see .env template):

  • GEMINI_API_KEY — Google Gemini API key (optional)
  • GEMINI_MODEL — Gemini model name (default: gemini-pro)
  • OPENAI_API_KEY — OpenAI API key (optional)
  • OPENAI_MODEL — OpenAI model name (default: gpt-4o)
  • MODEL_PROVIDER — Default provider: gemini or openai (default: gemini)
  • TIMEOUT — Request timeout in seconds (default: 30)
  • LOG_LEVEL — DEBUG/INFO/WARNING/ERROR
  • PROGRESS_UI — console or none

Notes:

  • .env is listed in .gitignore; do not commit API keys. Prefer a secrets manager in production.
  • If MODEL_PROVIDER is set but the corresponding API key is missing, the app falls back to the local analyzer (TF‑IDF + keyword matching) and shows a warning.

Internal components

  • config.py — simple env-backed configuration loader (uses python-dotenv if available).
  • progress.py — console spinner utilities for CLI flows. Streamlit UI uses st.spinner for progress.
  • analyzer.py — the deterministic analyzer: skill extraction, TF‑IDF semantic similarity, experience parsing, scoring, and recommendation logic.
  • prompts.py — thresholds, templates, and LLM prompt text (reserved for future LLM-based scoring).

LLM Integration (optional)

The codebase uses a local deterministic analyzer by default. An llm_client.py module is included to support LLM providers with safe fallbacks:

  • Provider selection: controlled by MODEL_PROVIDER and the USE_LLM flag in .env (default: USE_LLM=false).
  • Supported providers in this repo: openai, gemini (wrappers require provider SDKs) and a local mock provider for free testing.
  • If USE_LLM is false, the app always uses the local analyzer (no network calls).
  • If USE_LLM is true and the configured provider is unavailable or the client library is missing, the client falls back to the local analyzer.

Files added:

  • llm_client.py — provider selection, OpenAI & Gemini wrappers (optional), and mock provider.
  • scripts/demo_mock_llm.py — demo script that exercises the mock provider locally (free).

Safe usage notes:

  • Keep USE_LLM=false during development to avoid accidental calls and charges.
  • To enable live calls: install provider SDKs (e.g., pip install openai) and set USE_LLM=true and the corresponding API key in .env.
  • The OpenAI/Gemini wrapper code expects JSON-formatted responses from the LLM; if parsing fails, it falls back to the local analyzer.

Running locally

  1. Create a virtualenv and install dependencies: pip install -r requirements.txt.
    • openai is listed as optional in requirements.txt — install it only if you plan to use OpenAI live.
  2. Copy .env.template to .env and set your keys and USE_LLM=true only when you intend to make live calls.
    • Example: Copy-Item .env.template .env (PowerShell) then edit .env.
  3. Start the app: streamlit run app.py.

To run the free mock demo (no API keys required):

python scripts\demo_mock_llm.py

Security & Cost Guidance

  • Do not store API keys in source control. .env is ignored by default and a .env.template is provided for safe commits.
  • Monitor billing on OpenAI/Gemini accounts; enable budget alerts and quotas in your provider console.
  • Use small prompts, short timeouts, and rate limits when experimenting with live LLMs.

Testing

  • Unit tests are included under tests/ (run with python -m unittest discover -v). Tests currently verify analyzer behavior and the llm_client fallback to local analysis.
  • For CI, mock LLM providers to avoid external calls and costs.

If you want, add CI, end-to-end tests, or enable a production-grade LLM client with stricter rate and cost controls.

About

Resume reviewer

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages