加载中…
加载中…
A sentence-embedding model for finding the passages of a scientific paper that answer a question. It is sentence-transformers/all-MiniLM-L6-v2 fine-tuned on the train split of QASPER, built for the dense half of the hybrid search in Enterprise RAG System. It produces 384-dimensional, unit-length embeddings, like the base model.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("gouneji/all-MiniLM-L6-v2-qasper")
embeddings = model.encode(
[
"How large is the training set?",
"The training set contains 12,000 annotated sentences.",
]
)
In the application, set RAG_EMBEDDING_MODEL=gouneji/all-MiniLM-L6-v2-qasper and upload your documents again: stored vectors from another model are not comparable.
The test split has 416 papers, none of them in the train or dev splits; its 1,351 questions with evidence paragraphs are scored. Each question is answered against its own paper, split into chunks of at most 200 tokens, and a chunk is relevant when its paragraph was marked as evidence by an annotator.
The embedder decides which chunks reach the reranker: hybrid search keeps 20 candidates.
| Embedder | Candidate recall@20 | MRR@10 with the base reranker | MRR@10 with the fine-tuned reranker |
|---|---|---|---|
| all-MiniLM-L6-v2 | 93.3% | 0.544 | 0.637 |
| this model | 95.8% | 0.549 | 0.642 |
Candidate recall@20 is the share of questions with an evidence chunk among the 20 candidates; the gain is +2.4 points (paired bootstrap 95% CI +1.5 to +3.5). Most of the end-to-end gain comes from the reranker, which reorders those candidates.
QASPER: Pradeep Dasigi, Kyle Lo, Iz Beltagy, Arman Cohan, Noah A. Smith, Matt Gardner. A Dataset of Information-Seeking Questions and Answers Anchored in Research Papers. NAACL 2021. The dataset is licensed under CC BY 4.0.