Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Resume Screener Agent πŸ€–

A multi-agent resume screening system powered by LangGraph, Groq LLM, and FastAPI that automatically analyzes and ranks resumes against job descriptions.

**RESUME_TEST **

RESUME_OUTPUT

Features ✨

  • Intelligent Resume Parsing: Extracts and chunks resume text for detailed analysis
  • Vector Embeddings: Uses HuggingFace embeddings (all-MiniLM-L6-v2) for semantic similarity scoring
  • LLM-Powered Analysis: Groq's llama-3.1-8b-instant model with JSON output for structured analysis
  • Multi-Agent Pipeline: LangGraph state machine with 4 specialized nodes
  • Real-time Feedback: React frontend with visual scoring rings and expandable result cards
  • Logging Infrastructure: Raw LLM output logging for debugging and validation

Architecture πŸ—οΈ

Backend (FastAPI + Python)

Resume Input
    ↓
Parse Node β†’ Extract text, chunk into 500-char segments
    ↓
Score Node β†’ Compute cosine similarity (HuggingFace embeddings)
    ↓
Analyze Node β†’ LLM analysis (Groq with JSON mode)
    ↓
Rank Node β†’ Sort by match_score, format final output
    ↓
JSON Results

Frontend (React)

  • Job description input
  • Drag-and-drop PDF resume upload
  • Real-time screening results with:
    • Match score (0-100) with color-coded ring
    • Recommendation (Strong Match, Good Match, Partial Match, Not Recommended)
    • Strengths and gaps analysis
    • Detailed reasoning

Tech Stack πŸ› οΈ

Backend:

  • FastAPI (HTTP API server)
  • LangGraph (multi-agent orchestration)
  • LangChain (LLM framework)
  • Groq (LLM provider)
  • HuggingFace Transformers (embeddings)
  • PyPDF2 (PDF parsing)
  • FAISS (vector similarity)

Frontend:

  • React 18
  • Axios (HTTP client)
  • CSS Grid/Flexbox

Setup & Installation πŸ“¦

Prerequisites

  • Python 3.11+
  • Node.js 16+
  • Groq API key (free tier available)

Backend Setup

  1. Install Python dependencies:
pip install -r requirements.txt
  1. Create .env file:
GROQ_API_KEY=your_groq_api_key_here
  1. Start FastAPI server:
python -m uvicorn main:app --host 0.0.0.0 --port 8001

Backend will be available at http://localhost:8001

Frontend Setup

  1. Install Node dependencies:
npm install
  1. Start React development server:
npm start

Frontend will open at http://localhost:3000 (or 3001 if 3000 is busy)

Usage πŸš€

  1. Open http://localhost:3000 in your browser
  2. Paste a job description in the textarea
  3. Upload one or more resume PDFs
  4. Click "Run Screening Pipeline"
  5. View detailed analysis results with match scores and recommendations

API Endpoint

POST /screen

Request:

{
  "jd": "Job description text...",
  "resumes": [binary PDF files]
}

Response:

{
  "results": [
    {
      "rank": 1,
      "name": "resume.pdf",
      "match_score": 85,
      "similarity_score": 82.5,
      "recommendation": "Strong Match",
      "strengths": ["Python experience", "FastAPI expertise"],
      "gaps": ["Missing cloud deployment"],
      "reasoning": "Candidate has strong Python background..."
    }
  ]
}

Configuration πŸ”§

LLM Settings (main.py)

  • Model: llama-3.1-8b-instant
  • Temperature: 0.0 (deterministic)
  • JSON Mode: Enabled for structured output
  • Prompt: Explicitly requires JSON format with no markdown

Embeddings

  • Model: all-MiniLM-L6-v2
  • Dimensions: 384
  • Similarity: Cosine distance

Text Chunking

  • Chunk Size: 500 characters
  • Overlap: 0

Project Structure πŸ“

Resume Screener Agent/
β”œβ”€β”€ main.py                 # FastAPI backend + LangGraph pipeline
β”œβ”€β”€ package.json            # React app configuration
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ .gitignore             # Git ignore rules
β”œβ”€β”€ public/
β”‚   └── index.html         # React HTML entry point
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ App.js             # Main React component
β”‚   β”œβ”€β”€ App.css            # Styling
β”‚   └── index.js           # React entry point
└── raw_llm_outputs.log    # LLM output logging (generated)

Debugging πŸ›

View Raw LLM Output

Check raw_llm_outputs.log to see the actual LLM responses:

cat raw_llm_outputs.log

Backend Logs

python -m uvicorn main:app --host 0.0.0.0 --port 8001 --log-level debug

Frontend Logs

Open browser DevTools (F12) and check Console tab

Key Implementation Details πŸ”‘

JSON Mode Enforcement

The backend uses 3-layer enforcement to ensure LLM outputs valid JSON:

  1. Model Config: model_kwargs={"response_format": {"type": "json_object"}}
  2. Temperature: Set to 0.0 for deterministic output
  3. Prompt Engineering: Explicit "ONLY valid JSON" requirement with example

Error Handling

  • Fallback JSON extraction via regex if LLM output is malformed
  • Graceful degradation with default values
  • All errors logged for debugging

Performance Optimizations

  • Text chunking reduces embedding computation
  • Vector similarity precomputed before LLM analysis
  • Async-ready FastAPI for concurrent requests

Known Limitations ⚠️

  • Requires PDF files (TXT supported with minor code changes)
  • LLM analysis limited to context window
  • No resume deduplication
  • Single-threaded screening (FastAPI can handle async)

Future Enhancements 🌟

  • Candidate ranking comparison view
  • Resume parsing improvement (better table extraction)
  • Bulk resume upload with batch processing
  • Dashboard with analytics
  • Support for multiple file formats
  • Cache results for faster re-screening
  • Export results to CSV/PDF

Troubleshooting πŸ”§

"Could not parse detailed analysis" error

  • Check raw_llm_outputs.log for LLM response format
  • Verify GROQ_API_KEY is correct
  • Ensure Groq API is working (test via groq-cli)

Port 8000/8001 already in use

lsof -i :8001  # macOS/Linux
netstat -ano | findstr :8001  # Windows

Embedding model download fails

  • Check internet connection
  • Model will download to ~/.cache/huggingface/ on first run

License πŸ“„

MIT License - feel free to use this for commercial projects


Made with ❀️ using LangGraph, Groq, and React

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages