Views
No views yet
cross-encoder/ms-marco-MiniLM-L-6-v2 (pre-trained on MS MARCO passage
ranking) on mental-health domain query-passage pairs to re-rank ChromaDB
retrieval results before passage injection into the Groq therapy-response
generator. This is Model 5 in the MindLens five-model NLP pipeline.nbertagnolli/counsel-chat
using a three-tier pair construction strategy:| Metric | Score | Interpretation |
|---|---|---|
| NDCG@3 | 1.0000 | Ranking quality of top-3 results |
| MRR | 1.0000 | How quickly the first relevant passage is found |
| Precision@3 | 0.5833 | Fraction of top-3 results that are relevant |
1from sentence_transformers import CrossEncoder
2
3reranker = CrossEncoder("AmiruMallawarachchi/mindlens-rag-reranker")
4
5query = "I feel completely hopeless and can't stop crying"
6passages = [...] # top-20 from ChromaDB
7
8scores = reranker.predict([[query, p] for p in passages])
9top3_indices = scores.argsort()[::-1][:3]
10top3_passages = [passages[i] for i in top3_indices]