Views
No views yet
| Model | Accuracy@1 | Recall@10 | MRR |
|---|---|---|---|
| legal-embed-modernbert-v1 | 0.893 | 0.994 | 0.931 |
| nomic-ai/modernbert-embed-base | 0.811 | 0.955 | 0.863 |
1from sentence_transformers import SentenceTransformer
2
3model = SentenceTransformer("bugBug04S/legal-embed-modernbert-v1")
4
5query = "search_query: Can my landlord evict me without notice?"
6docs = [
7 "search_document: A landlord must generally provide written notice and obtain a court order before eviction...",
8 "search_document: Copyright protection begins when a work is fixed in a tangible medium...",
9]
10q = model.encode(query, normalize_embeddings=True)
11d = model.encode(docs, normalize_embeddings=True)
12print((q @ d.T)) # higher = more relevantsearch_query: to questions and search_document: to passages — the model was trained with these prefixes.