AI-powered candidate ranking system.
This project is a hybrid AI-based candidate ranking system designed to process 100,000 candidate profiles and return the Top 100 most relevant candidates for a Senior AI Engineer role.
The system combines:
- Semantic Search using FAISS (HNSW)
- Keyword Matching using BM25
- 23 Redrob Behavioral Signals
- Skill Ontology-Based Reasoning
- Percentile Feature Normalization
- Hybrid Score Fusion with JD-Adaptive Weights
| Parameter | Details |
|---|---|
| Input | candidates.jsonl (100,000 candidate profiles)One Job Description (JD) for Senior AI Engineer role |
| Output | output/CodeFusion.csv β Top 100 ranked candidates with human-readable reasoning |
Due to GitHub file size limitations (100 MB per file), the preprocessed output folder could not be pushed directly to this repository. Please download it separately.
π Download output/ folder from Google Drive
- Size: ~555 MB
- Contents: Contains all necessary preprocessed cache files for immediate ranking execution.
- Ensure
candidates.jsonl(provided by organizers) is in the project root directory. - Download the
output/folder from the link above and place it in the project root. Your project structure must look like this:
redrob-ai-ranker/
βββ rank.py
βββ candidates.jsonl β Provided by organizers
βββ output/ β Downloaded from Drive link
β βββ CodeFusion.csv
β βββ candidate_embeddings.npy
β βββ faiss_hnsw.index
β βββ ... (other cache files)
βββ requirements.txt
βββ README.md
- Open a terminal in the project root directory and run:
python rank.py
- The ranking pipeline will complete in approximately 10 seconds using the preprocessed cache. The final output is saved automatically as
output/CodeFusion.csv.
The preprocessed cache enables immediate, lightweight CPU-only ranking without requiring local GPU access. The
candidates.jsonlfile is identical to the one provided by the hackathon organizers. If you wish to verify the complete preprocessing pipeline from scratch, simply delete theoutput/folder and re-runpython rank.pyβ this will regenerate all cache files (~30 minutes on GPU).
candidates.jsonl (100K)
β
βΌ
BGE-M3 Embeddings (GPU, FP16)
β
ββββββββββββββββββββΌβββββββββββββββββββ
β β β
βΌ βΌ βΌ
FAISS HNSW Index BM25 Index Feature Matrix (9 features)
β β β
ββββββββββββββββββββΌβββββββββββββββββββ
β
βΌ
Skill Ontology + Percentile Normalizer
β
βΌ
Cached Artifacts (~1.2 GB)
Job Description
β
βΌ
1. JD Embedding (BGE-M3, CPU)
β
βΌ
2. JD-Adaptive Weight Generation
β
βΌ
3. FAISS HNSW Retrieval (Top 1000)
β
βΌ
4. BM25 Re-ranking (on FAISS shortlist)
β
βΌ
5. Feature Scoring (23 Redrob Signals)
β
βΌ
6. Skill Ontology Concept Matching
β
βΌ
7. Hybrid Score Fusion + Tie-Breaking
β
βΌ
Top 100 Ranked Candidates with Reasoning
In this documentation:
- Offline Preprocessing refers to one-time computation done before ranking (embedding generation, index building). This is performed once with GPU acceleration.
- Online Ranking refers to the real-time ranking pipeline that runs at query time using pre-computed artifacts. This runs on CPU only.
Both stages operate entirely without internet connectivity. No external API calls, cloud services, or network access are required. The term "online" describes the runtime/live nature of the ranking phase, not internet connectivity.
Final Score = (Ξ± Γ Semantic + Ξ² Γ BM25 + Ξ³ Γ Features)
Γ Skill Boost
Γ Experience Alignment Factor
- Honeypot Penalty
Where:
Ξ±, Ξ², Ξ³ = JD-Adaptive Weights (auto-tuned per JD)
Skill Boost = 0.8x - 1.4x (based on ontology matching)
Experience Penalty = 0.5x - 1.0x (years vs target)
- Final Score (Descending, rounded to 4 decimal places)
- Candidate ID (Ascending, alphabetical)
| Feature | Description |
|---|---|
career_authenticity |
Percentage of career spent in genuine technical engineering roles |
retrieval_specialization |
Deep expertise depth in IR (Information Retrieval) and Search systems |
ai_experience |
AI/ML keyword density mapped throughout professional work experience |
career_progression |
Seniority growth and structural title trajectory over time |
skill_quality |
Skill depth weighted by duration, documented proficiency, and endorsements |
description_consistency |
Mathematical alignment between claimed skills and contextual job descriptions |
education |
Academic baseline relevance with structured tier bonuses for elite institutions |
behavioral |
Composite normalized score metric of all 23 Redrob behavioral signals (0-100) |
experience_years |
Total chronological years of professional workspace experience |
| Category | Integrated Signals & Weights |
|---|---|
| 1. Engagement Signals (3) | recruiter_response_rate (Γ35), interview_completion_rate (Γ30), offer_acceptance_rate (Γ25) |
| 2. Pipeline Conversion (3) | application_to_interview_rate (Γ20), interview_to_offer_rate (Γ25), offer_to_joining_rate (Γ15) |
| 3. Visibility Signals (5) | profile_completeness_score (Γ0.3), saved_by_recruiters_30d (Γ0.8), profile_views_received_30d (Γ0.04), profile_views_7d (Γ0.12), search_appearances_30d (Γ0.15 or -5 penalty if zero) |
| 4. Responsiveness Signals (3) | open_to_work_flag (+10 if true), avg_response_time_hours (tiered), inmail_response_rate (Γ15) |
| 5. Network Strength (3) | connection_acceptance_rate (Γ8), skill_endorsements_count (Γ0.1), recommendations_count (Γ2.0) |
| 6. Activity Signals (2) | profile_update_frequency (tiered), job_search_activity_score (Γ0.1) |
| 7. Job Fit Signals (2) | location_match_score (Γ8), salary_expectation_alignment (Γ12) |
| 8. Administrative (2) | notice_period_days (tiered), visa_sponsorship_needed (-8 penalty or +3 bonus) |
Total: 23/23 Redrob behavioral signals fully integrated into the ranking engine
| Concept | Skills Mapped |
|---|---|
| Fine Tuning | LoRA, QLoRA, PEFT, fine-tuning, finetuning |
| Vector Databases | FAISS, Pinecone, Milvus, Qdrant, Weaviate, ChromaDB |
| Retrieval | BM25, hybrid search, semantic search, dense retrieval |
| Ranking | Learning-to-Rank, NDCG, MRR, MAP |
| Embeddings | Sentence Transformer, BGE, E5, OpenAI Embedding |
| LLM | GPT, Claude, LLaMA, Mistral |
| NLP | Tokenization, NER, Sentiment Analysis |
| ML | Transformers, Deep Learning, CNN, RNN |
| Cloud | AWS, Azure, GCP |
| DevOps | Docker, Kubernetes, Terraform, CI/CD |
π Open Colab Sandbox
- Open the Colab link.
- Click Runtime > Run All.
- Upload
rank.pywhen prompted (available in your GitHub repository root). - Upload a small validation sample of
candidates.jsonlwhen prompted (β€100 entries). - Wait ~1-2 minutes for the pipeline to finish execution.
CodeFusionsandboxdemo.csvdownloads automatically to your system containing the sorted results.
| Component | Sandbox (Colab) | Production (rank.py) |
|---|---|---|
| Model | all-MiniLM-L6-v2 (Lightweight) |
BAAI/bge-m3 (State-of-the-Art) |
| Embedding Dimension | 384 | 1024 |
| Candidate Scope | Max β€100 samples | Full 100,000 dataset profiles |
| Execution Time | <2 minutes | ~10 seconds (Cached) |
| Hardware Device | Standard CPU | GPU (Preprocess) + CPU (Online Ranking) |
| Output Target | CodeFusionsandboxdemo.csv |
output/CodeFusion.csv |
- Python 3.8 or higher
- 16 GB RAM (Recommended baseline)
- NVIDIA GPU with 6GB+ VRAM (Required only if rebuilding raw preprocessing cache)
# Clone the repository
git clone [https://github.com/Revathi2006/redrob-ai-ranker](https://github.com/Revathi2006/redrob-ai-ranker)
cd redrob-ai-ranker
# Create and activate virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On Linux/macOS:
source venv/bin/activate
# Install PyTorch with CUDA support (Optimized for GPU Preprocessing)
pip install torch torchvision torchaudio --index-url [https://download.pytorch.org/whl/cu121](https://download.pytorch.org/whl/cu121)
# Install core system dependencies
pip install sentence-transformers faiss-cpu rank-bm25 scikit-learn pandas numpy tqdm pyyaml
Ensure your downloaded output/ cache folder and candidates.jsonl file are inside the project directory, then run:
python rank.py
- First run (without cache folder): ~30 minutes using GPU-accelerated embedding generation.
- Subsequent runs (with cache folder): ~10 seconds on regular CPU.
- File Destination:
output/CodeFusion.csv - Column Schema:
candidate_id, rank, score, reasoning
candidate_id,rank,score,reasoning
CAND_0018499,1,0.8305,"Senior ML Engineer at Zomato with 7 years experience. strong qlora, milvus, embeddings background relevant to JD requirements. consistent technical career in AI/ML with deep retrieval systems expertise..."
CAND_0039754,2,0.8092,"Senior Applied Scientist at Meta with 16 years experience. strong llms, python, qdrant background relevant to JD requirements. strong senior-level experience exceeds minimum requirements..."
Hardware Environment Specifications: Ryzen 7 7735HS | RTX 4050 (6GB VRAM) | 16GB DDR5 RAM | NVMe SSD | 100K Corpus.
| Stage | Execution Time | Hardware Device |
|---|---|---|
| Embedding Generation | 20-25 min | GPU (FP16 Optimization) |
| FAISS Index Build | 2-3 min | CPU |
| BM25 Index Build | 1-2 min | CPU |
| Feature Computation | 3-5 min | CPU |
| Total One-Time Preprocessing | ~30 min | Mixed Architecture |
| JD Embedding Generation | ~2s | CPU |
| FAISS Shortlist Retrieval | ~1s | CPU |
| BM25 Shortlist Re-ranking | ~6s | CPU |
| Hybrid Score Fusion Matrix | ~1s | CPU |
| Total Query Ranking Pipeline | ~10s | CPU Only |
redrob-ai-ranker/
βββ rank.py # Main ranking pipeline application
βββ candidates.jsonl # Raw input dataset (100K profiles)
βββ requirements.txt # Project environment locks
βββ README.md # Engineering documentation
βββ submission_metadata.yaml # Submission verification manifest
βββ output/ # Generated Artifact Repository
βββ CodeFusion.csv # Final Top 100 Output Report
βββ candidate_embeddings.npy # Precomputed dense vector arrays
βββ faiss_hnsw.index # Serialized HNSW index graph
βββ feature_matrix.npy # Extracted mathematical feature arrays
βββ ... # Secondary lookup metadata cache files
Verify that output files fit structural expectations by launching the native script check:
python validate_submission.py ./output/CodeFusion.csv
Expected Terminal Output:
Submission is valid.
- Exactly 100 target candidates returned.
- Ranks match sequentially starting from index 1.
- Identical edge scores break ties using alphanumeric ascending order on
candidate_id. - Includes all mandatory schema columns (
candidate_id,rank,score,reasoning). - All final internal scores consistently rounded to 4 decimal points.
To guarantee programmatic consistency across any evaluator's environment:
- Fixed Structural Seed:
random_state=42locked throughout theQuantileTransformerprocessing layers. - Deterministic Search Graphs: Fixed operational
efConstructionandefSearchparameters for FAISS HNSW. - File Validation Checks: Real-time SHA-256 validation mapping on input structures blocks mismatched cache data.
- Explicit Score Tie-Breaking: Scores rounded exactly once before triggering downstream sort configurations to assure predictable matching loops.
Created exclusively for the Redrob Hackathon Evaluation. All rights reserved.