Views
No views yet
cross-encoder/ms-marco-MiniLM-L-6-v2| Metric | Value | Description |
|---|---|---|
| MSE | 0.100697 | Mean Squared Error (lower is better) |
| MAE | 0.183992 | Mean Absolute Error (lower is better) |
| RMSE | 0.317328 | Root Mean Squared Error (lower is better) |
| R² Score | 0.401894 | Coefficient of determination (higher is better) |
| Pearson Correlation | 0.758721 | Linear correlation (higher is better) |
| Spearman Correlation | 0.709262 | Rank correlation (higher is better) |
pip install sentence-transformers1from sentence_transformers import CrossEncoder
2
3# Load the model
4model = CrossEncoder('OloriBern/trailrag-cross-encoder-scifact-enhanced')
5
6# Example usage
7pairs = [
8 ['What is artificial intelligence?', 'AI is a field of computer science focused on creating intelligent machines.'],
9 ['What is artificial intelligence?', 'Paris is the capital of France.']
10]
11
12# Get similarity scores (continuous values, not binary)
13scores = model.predict(pairs)
14print(scores) # Higher scores indicate better semantic match1from sentence_transformers import CrossEncoder
2
3# Initialize for PathfinderRAG exploration
4cross_encoder = CrossEncoder('OloriBern/trailrag-cross-encoder-scifact-enhanced')
5
6def score_query_document_pair(query: str, document: str) -> float:
7 """Score a query-document pair for relevance."""
8 score = cross_encoder.predict([[query, document]])[0]
9 return float(score)
10
11# Use in document exploration
12query = "Your research query"
13documents = ["Document 1 text", "Document 2 text", ...]
14
15# Score all pairs
16scores = cross_encoder.predict([[query, doc] for doc in documents])
17ranked_docs = sorted(zip(documents, scores), key=lambda x: x[1], reverse=True)1@misc{trailrag-cross-encoder-scifact,
2 title = {TrailRAG Cross-Encoder: SciFact Enhanced},
3 author = {PathfinderRAG Team},
4 year = {2025},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/OloriBern/trailrag-cross-encoder-scifact-enhanced}
7}