# MS MARCO (2016)

> A million real Bing queries with candidate web passages and human-written answers when one exists.

Page: https://mralbu.github.io/ai-datasets/d/ms-marco

## Key facts

- Category: Text, Retrieval
- Task: Passage ranking and question answering over web search results
- Creators: Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, Li Deng (Microsoft)
- Size: 1,010,916 queries; 8.8 million passages in the ranking collection
- Splits: train 808,731, validation 101,093, test 101,092
- Input: An anonymized search query and the passages Bing returned for it
- Labels: Which passages answer the query, and an answer written by a person
- License: Non-commercial research use (MS MARCO terms)
- Paper: [MS MARCO: A Human Generated MAchine Reading COmprehension Dataset](https://arxiv.org/abs/1611.09268)
- Homepage: https://microsoft.github.io/msmarco/
- Hugging Face: [microsoft/ms_marco](https://huggingface.co/datasets/microsoft/ms_marco)
- Sampled at Hub revision a47ee7aae8d7d466ba15f9f0bfac3b3681087b3a (2026-11-08)

## Why it matters

SQuAD's questions were written by people looking at a Wikipedia paragraph. MS MARCO's are what people actually typed into Bing, with the messy web passages that came back. Its passage ranking task (2018), finding the right passage among 8.8 million, became the training set of neural search: BERT re-rankers nearly doubled the score of keyword search (BM25) in 2019, and dense retrievers, ColBERT and most text embedding models since were trained or tested on it. Retrieval for RAG systems grew from here.

## Worth knowing

- Usually only one passage per query is marked as relevant, though others often answer it too. The TREC Deep Learning track (2019) re-judged a subset in depth for that reason.
- The ranking score is MRR@10, the reciprocal rank of the first relevant passage in the top ten. BM25 scores about 0.19; the first BERT re-ranker reached 0.36.
- Many queries have no answer in their passages; their answer reads "No Answer Present."
- Queries are typed as numeric, entity, location, person or description; most are descriptions.

## Get the data

```bash
# pip install -U huggingface_hub
hf download microsoft/ms_marco --repo-type dataset \
  --local-dir ms-marco
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("microsoft/ms_marco", "v2.1")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/microsoft/ms_marco@~parquet/v2.1/validation/*.parquet")
print(df.shape)
```

## Related datasets

- [SQuAD](https://huggingface.co/datasets/rajpurkar/squad): 2016, questions written from Wikipedia paragraphs (on this site: https://mralbu.github.io/ai-datasets/d/squad)
- [TREC Deep Learning](https://microsoft.github.io/msmarco/TREC-Deep-Learning): 2019–2023, MS MARCO queries with deep human judgments
- [Natural Questions](https://huggingface.co/datasets/google-research-datasets/natural_questions): 2019, real Google queries answered from Wikipedia (on this site: https://mralbu.github.io/ai-datasets/d/natural-questions)
- [BEIR](https://huggingface.co/datasets/BeIR/msmarco): 2021, 18 retrieval datasets to test models trained on MS MARCO elsewhere
- [MTEB](https://huggingface.co/spaces/mteb/leaderboard): 2022, the text embedding leaderboard; retrieval is one of its tasks
- [HotpotQA](https://huggingface.co/datasets/hotpotqa/hotpot_qa): 2018, multi-hop questions over pairs of Wikipedia paragraphs (on this site: https://mralbu.github.io/ai-datasets/d/hotpotqa)

## Landmark papers

- [Passage Re-ranking with BERT](https://arxiv.org/abs/1901.04085) (2019)
- [ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT](https://arxiv.org/abs/2004.12832) (2020)
- [Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrieval (ANCE)](https://arxiv.org/abs/2007.00808) (2020)

## Papers on this site that use it

- [RAG (2020)](https://mralbu.github.io/ai-datasets/p/rag.md): Let a text generator look things up in Wikipedia before it answers, and give the idea its name.
