https://github.com/shivsharcode/shl-assessment-recommender
RAG based assessment Recommender
https://github.com/shivsharcode/shl-assessment-recommender
pydantic python rag streamlit transformers uvicorn
Last synced: about 2 months ago
JSON representation
RAG based assessment Recommender
- Host: GitHub
- URL: https://github.com/shivsharcode/shl-assessment-recommender
- Owner: shivsharcode
- Created: 2025-05-04T21:05:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-05T13:19:33.000Z (about 1 year ago)
- Last Synced: 2025-06-05T00:22:53.766Z (about 1 year ago)
- Topics: pydantic, python, rag, streamlit, transformers, uvicorn
- Language: Jupyter Notebook
- Homepage: https://shl-assignment-shivamsharma.streamlit.app/
- Size: 1.82 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SHL Assessment Recommendation System
This project is a recommendation system for SHL assessments. It uses a combination of web crawling, vectorization, and a backend API to recommend assessments based on user queries. The system is built using Python, FastAPI, and machine learning models for semantic search.
## LINKS
#### BACKEND API ENDPOINTS (hosted on render)
1. activate : https://shl-backend-api-1.onrender.com/
2. health : https://shl-backend-api-1.onrender.com/health
3. recommend : https://shl-backend-api-1.onrender.com/recommend
#### DEMO FRONTEND WORKING -- CONNECTED WITH BACKEND API
Link : https://shl-assignment-shivamsharma.streamlit.app/
---
## 🚀 Project Setup Guide: SHL Assessment Recommender
Follow the steps below to set up and run the project locally.
### 1. Clone the Repository
```bash
git clone https://github.com/shivsharcode/shl-assessment-recommender.git
cd shl-assessment-recommender
```
### 2. Install Dependencies
```bash
pip install -r requirements.txt
```
### 3. Start the Backend API
The backend is hosted locally, but you can also use the production version hosted on Render.
To run the backend locally:
```bash
cd 4.BACKEND-API
uvicorn main:app --reload
```
### 4. Start the Frontend
In a **new terminal**, return to the root project directory:
```bash
cd ..
streamlit run app_streamlit.py
```
---
### 🔗 Note
Render may put the backend API to sleep after periods of inactivity.
Before clicking **Recommend**, visit this URL once to wake the API:
[https://shl-backend-api-1.onrender.com/](https://shl-backend-api-1.onrender.com/)
---
## Project Structure
The project is organized into the following directories:
### 1. Web Crawler
- **Purpose**: Crawls SHL's website to collect assessment data.
### 2. Vectorization
- **Purpose**: Converts assessment descriptions into vector embeddings for semantic search.
### 3. Evaluation
- **Purpose**: Evaluates the performance of the recommendation system.
### 4. Backend API
- **Purpose**: Provides an API for querying the recommendation system.
## Key Features
1. **Web Crawling**: Extracts assessment data from SHL's website.
2. **Vectorization**: Uses `SentenceTransformer` to generate embeddings for semantic search.
3. **Recommendation API**: Provides endpoints to query assessments based on user input.
4. **Evaluation**: Measures the accuracy and performance of the recommendation system.
## API Endpoints
### Base URL
`https://shl-backend-api-1.onrender.com/`
### Endpoints
- **`GET /`**: Returns a welcome message.
- **`GET /health`**: Returns the health status of the API.
- **`POST /recommend`**: Accepts a query and returns a list of recommended assessments.
#### Example Request
```json
POST /recommend
{
"query": "I am hiring for Java developers who can also collaborate effectively with my business teams. Looking for an assessment(s) that can be completed in 40 minutes"
}
```
#### Example Response
```json
{
"results": [
{
"url": "https://www.shl.com/products/product-catalog/view/python-new/",
"adaptive_support": "No",
"description": "Multi-choice test that measures the knowledge of Python programming, databases, modules and library.",
"duration": 11,
"remote_support": "Yes",
"test_types": ["Knowledge & Skills"]
}
]
}
```