nbertagnolli/counsel-chat
Viewer โข Updated โข 2.78k โข 1.63k โข 70
Cross-encoder fine-tuned from 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.
Built from nbertagnolli/counsel-chat
using a three-tier pair construction strategy:
Training pairs: 3,832 | Val: 479 | Test: 480 Groq-scored ambiguous pairs: 0
| 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 |
from sentence_transformers import CrossEncoder
reranker = CrossEncoder("AmiruMallawarachchi/mindlens-rag-reranker")
query = "I feel completely hopeless and can't stop crying"
passages = [...] # top-20 from ChromaDB
scores = reranker.predict([[query, p] for p in passages])
top3_indices = scores.argsort()[::-1][:3]
top3_passages = [passages[i] for i in top3_indices]
Zheng, L. et al. (2023). Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena. NeurIPS 2023. Nogueira, R. & Cho, K. (2019). Passage Re-ranking with BERT.