This API provides intelligent recommendations for SHL assessments based on user queries using a Retrieval-Augmented Generation (RAG) approach. It uses semantic search over vector embeddings generated from SHL product descriptions.
- 🔍 Streamlit Demo App (User-facing search interface): https://shl-troger.streamlit.app/
- 🔗 API Endpoint (FastAPI): https://shl-api-ut7j.onrender.com
- Interactive docs: https://shl-api-ut7j.onrender.com/docs
- FastAPI – for backend API.
- Streamlit – for frontend demo.
- Sentence Transformers – for embedding queries and SHL products.
- Supabase – as a vector database backend.
- Uvicorn – as the ASGI server.
git clone https://github.com/your-username/shl-recommendation-api
cd shl-recommendation-api
pip install -r requirements.txtStart API:
uvicorn main:app --reloadStart Streamlit Frontend:
streamlit run app.pyPOST /recommend
- Request Body:
{
"query": "Hiring for Python",
"threshold": 0.4,
"top_k": 10
}- Response:
{
"results": [
{
"id": "50e6231d-8f64-4b66-aa39-1ad193826151",
"name": "Python (New)",
"url": "https://www.shl.com/solutions/products/product-catalog/view/python-new/",
"remote_testing": true,
"adaptive_irt": false,
"duration": "11 minutes",
"test_types": "Knowledge & Skills",
"similarity": 0.536763163612078
}
]
}✅ You can also test the API at: https://your-api-url/docs
- The model used is
all-MiniLM-L6-v2from HuggingFace for fast and accurate sentence embeddings. - SHL product embeddings are stored in Supabase with vector indexing and similarity scoring.
- Threshold filtering is applied to ensure relevance of results.
- Ayush Gupta