This project implements an AI-powered recommendation system for SHL assessments. It uses a Two-Stage RAG Pipeline (Sentence-Transformers + Cross-Encoders) to retrieve relevant assessments based on natural language job descriptions.
main.py: The unified entry point.- Validates the model on
Train-Set(calculates Recall@10, MRR). - Generates predictions for
Test-Set.
- Validates the model on
huggingface/app.py: A Gradio/FastAPI web server exposing a JSON API.data/shl_assessments.json: The complete catalog of 443 assessments (Merged Type 1 + Missing Solution Packages).scraper/: Contains the scraping logic (shl_smart_scraper.py) used to build the dataset.
-
Clone the repository:
git clone https://github.com/moksha-hub/GenAI-Task-Build-an-SHL-Assessment-Recommendation-System.git cd GenAI-Task-Build-an-SHL-Assessment-Recommendation-System -
Install Dependencies:
pip install -r huggingface/requirements.txt
Execute the main script to reproduce validation metrics and generate test predictions:
python main.pyOutputs:
Mokshagna_K.csv: Training set metrics (Recall, Precision, MRR).Mokshagna_K_Test_Predictions.csv: Top-10 predictions for the 9 Test-Set queries.
Start the local API server:
python huggingface/app.py- GUI: Open
http://localhost:7860in your browser. - API Endpoint:
- URL:
http://localhost:7860/recommend - Method:
GET - Param:
query(e.g.,?query=java developer&max_results=5) - Response: JSON.
- URL:
- Assessments Indexed: 443 (Complete coverage)
- Mean Recall@10: ~0.37 (Optimized Baseline)
- Approach: Hybrid Search (Dense Retrieval + Cross-Encoder Reranking) + Query Expansion.
Mokshagna K