Streamlit URL : https://recommendcandidate.streamlit.app/
- Type in or copy paste the job description.
- Upload or drag and drop at least 1 resume.
- Click on "Process Resumes" button.
- Wait for few seconds for the results to appear.
- The results will include a similarity score and an AI generated summary indicating how well the resume content fits the description for each of the top 5 candidates.
This system provides an automated solution for screening and ranking job candidates based on resume content and job descriptions. It uses advanced natural language processing and machine learning techniques to analyze resumes, calculate semantic similarity with job requirements, and generate AI-powered summaries for each candidate.
-
File Processing Service (
file_service.py)- Handles multiple file format support (PDF, DOCX)
- Extracts text content using specialized libraries
- Manages temporary file operations safely
-
Similarity Analysis Service (
similarity_service.py)- Generates semantic embeddings using transformer models
- Calculates cosine similarity between job descriptions and resumes
- Provides AI-powered candidate summaries
-
Upload Handler (
upload.py)- FastAPI endpoint for file uploads and job description input
- Orchestrates the analysis pipeline
- Returns structured results with top candidates
- Embedding Model: BAAI/bge-small-en-v1.5 (BGE - Beijing Academy of Artificial Intelligence)
- Similarity Metric: Cosine similarity between normalized embeddings
- Ranking Strategy: Top 5 candidates by similarity score
- Document Loading:
- PDF: pdfplumber for robust text extraction
- DOCX: Docx2txtLoader from LangChain community
- Embedding Generation: Sentence-level semantic representations
- Similarity Calculation: Vector space comparison using cosine similarity
- AI Summarization: LLM-powered candidate analysis
-
File Format Support
- Only PDF and DOCX formats are supported
- Files contain extractable text (not image-based PDFs)
- Resume content is in English
-
Model Selection
- BGE-small-en-v1.5 provides optimal balance of performance and speed
- Cosine similarity is sufficient for ranking candidates
- Normalized embeddings ensure consistent similarity scores
-
Processing Limitations
- Maximum file size limits are handled by FastAPI defaults
- Temporary file system has sufficient space for processing
- Network connectivity available for model downloads
-
Candidate Ranking
- Top 5 candidates provide sufficient screening results
- Semantic similarity correlates with job fit
- Resume content accurately represents candidate capabilities
-
Job Description Quality
- Job descriptions contain sufficient detail for meaningful comparison
- Requirements are clearly articulated in natural language
- Job descriptions are comprehensive and not just bullet points
-
Resume Standards
- Resumes follow standard formatting conventions
- Relevant experience and skills are explicitly mentioned
- Candidate names can be inferred from filenames
- Multi-format Support: Handles both PDF and DOCX files seamlessly
- Semantic Understanding: Goes beyond keyword matching to understand context and meaning
- AI-Powered Insights: Provides detailed summaries explaining candidate fit
- Scalable Architecture: Asynchronous processing supports multiple file uploads
- Error Handling: Robust exception management and fallback mechanisms
- File Format Restrictions: Limited to PDF and DOCX formats
- Model Dependency: Requires internet connection for initial model download
- Processing Time: Large files or many candidates may impact response time
HUGGING_FACE_API_BASE=<HuggingFace API endpoint>
HF_API_KEY=<HuggingFace API key>sentence-transformers: For embedding generationpdfplumber: PDF text extractionlangchain-community: DOCX processingopenai: AI summary generationfastapi: Web frameworknumpy: Numerical computations
- Upload: Submit resume files (PDF/DOCX) and job description
- Processing: System extracts text from all resume files
- Analysis: Generates embeddings and calculates similarity scores
- Ranking: Sorts candidates by relevance to job requirements
- Summarization: Creates AI-powered insights for each top candidate
- Results: Returns top 5 matches with scores and summaries
- Caching: Models are cached locally to improve subsequent processing speed
- Batch Processing: Multiple files processed in sequence for memory efficiency
- Temporary File Management: Automatic cleanup prevents disk space issues
- Error Resilience: Individual file processing failures don't affect other candidates
- Temporary files are automatically cleaned up after processing
- No permanent storage of uploaded resume content
- API key management for external service integration
- Input validation and sanitization for job descriptions
This system provides a foundation for AI-powered recruitment screening while maintaining flexibility for future enhancements and customizations.
Note:
- Backend is deployed on AWS EC2 t3.small instance.
- Sample resumes and sample Job Description have been provided in data/temp folder.
- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
2. Start the backend:
cd backend
uvicorn main:app --reload
3. Start the frontend
cd frontend
streamlit run app.py