The lengths of some passages in your dataset are longer than the max sequence length of the embedding model all-mpnet-base-v2
Hi authors,
Thank you for releasing the LinearRAG code and dataset.
While reproducing your work, I noticed that the embedding model used in your implementation is all-mpnet-base-v2, whose maximum sequence length is 384 tokens.
However, when inspecting the passages in your released dataset, I found that a non-trivial portion of passages exceed 384 tokens. At the same time, in your source code, passages are directly fed into the embedding model without any explicit chunking.
This raises a few questions:
-
For passages longer than 384 tokens, does LinearRAG rely on SentenceTransformer’s automatic truncation behavior?
-
If truncation occurs, wouldn’t this:
- drop a portion of the passage information,
- and potentially affect retrieval quality and fairness of comparison?
Hi,
Thank you for your interest in our work!
For efficiency, we chose all-mpnet-base-v2 as it is a lightweight model. As shown in Table 5 of our paper, we evaluated several embedding models and found that it offers a good balance between performance and efficiency.
We agree that using longer-context embedding models could potentially improve retrieval quality. Thanks for raising this insightful question and we plan to update our repository with comprehensive results across different retrievers.
Thanks again for your feedback!