加载中…
加载中…
This is a fine-tuned cross-encoder model specifically optimized for Multi-hop Question Answering tasks, trained as part of the PathfinderRAG research project.
cross-encoder/ms-marco-MiniLM-L-6-v2| Metric | Value | Description |
|---|---|---|
| MSE | 0.055795 | Mean Squared Error (lower is better) |
| MAE | 0.141847 | Mean Absolute Error (lower is better) |
| RMSE | 0.236209 | Root Mean Squared Error (lower is better) |
| R² Score | 0.648497 | Coefficient of determination (higher is better) |
| Pearson Correlation | 0.875460 | Linear correlation (higher is better) |
| Spearman Correlation | 0.861819 | Rank correlation (higher is better) |
This model can be used with the sentence-transformers library for computing semantic similarity scores between query-document pairs.
pip install sentence-transformers
from sentence_transformers import CrossEncoder
# Load the model
model = CrossEncoder('OloriBern/trailrag-cross-encoder-hotpotqa-enhanced')
# Example usage
pairs = [
['What is artificial intelligence?', 'AI is a field of computer science focused on creating intelligent machines.'],
['What is artificial intelligence?', 'Paris is the capital of France.']
]
# Get similarity scores (continuous values, not binary)
scores = model.predict(pairs)
print(scores) # Higher scores indicate better semantic match
from sentence_transformers import CrossEncoder
# Initialize for PathfinderRAG exploration
cross_encoder = CrossEncoder('OloriBern/trailrag-cross-encoder-hotpotqa-enhanced')
def score_query_document_pair(query: str, document: str) -> float:
"""Score a query-document pair for relevance."""
score = cross_encoder.predict([[query, document]])[0]
return float(score)
# Use in document exploration
query = "Your research query"
documents = ["Document 1 text", "Document 2 text", ...]
# Score all pairs
scores = cross_encoder.predict([[query, doc] for doc in documents])
ranked_docs = sorted(zip(documents, scores), key=lambda x: x[1], reverse=True)
This model was trained using regression metrics (not classification) to predict continuous similarity scores in the range [0, 1]. The training process focused on:
Cross-encoders for information retrieval should predict continuous similarity scores, not binary classifications. This approach:
HotpotQA: Complex reasoning dataset requiring multi-step inference
@misc{trailrag-cross-encoder-hotpotqa,
title = {TrailRAG Cross-Encoder: HotpotQA Enhanced},
author = {PathfinderRAG Team},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/OloriBern/trailrag-cross-encoder-hotpotqa-enhanced}
}
For questions about this model, please open an issue in the PathfinderRAG repository or contact the development team.
This model card was automatically generated using the TrailRAG model card generator with authentic training metrics.