Dataset Viewer
Auto-converted to Parquet Duplicate
query_id
int64
1
1.19M
query
stringlengths
5
429
query_type
stringclasses
5 values
answers
listlengths
1
6
well_formed_answers
listlengths
0
53
passage_text
listlengths
1
27
passage_url
listlengths
1
27
passage_is_selected
listlengths
1
27
selected_passage
stringlengths
25
1.31k
query_emb
list
1,185,869
)what was the immediate impact of the success of the manhattan project?
DESCRIPTION
[ "The immediate impact of the success of the manhattan project was the only cloud hanging over the impressive achievement of the atomic researchers and engineers is what their success truly meant; hundreds of thousands of innocent lives obliterated." ]
[]
[ "The presence of communication amid scientific minds was equally important to the success of the Manhattan Project as scientific intellect was. The only cloud hanging over the impressive achievement of the atomic researchers and engineers is what their success truly meant; hundreds of thousands of innocent lives ob...
[ "http://www.pitt.edu/~sdb14/atombomb.html", "http://www.osti.gov/accomplishments/manhattan_story.html", "http://www.123helpme.com/impact-of-the-manhattan-project-preview.asp?id=177337", "http://www.answers.com/Q/How_did_the_Manhattan_Project_impact_on_society", "https://www.osti.gov/manhattan-project-histor...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
The presence of communication amid scientific minds was equally important to the success of the Manhattan Project as scientific intellect was. The only cloud hanging over the impressive achievement of the atomic researchers and engineers is what their success truly meant; hundreds of thousands of innocent lives obliter...
[ 0.0075583565048873425, 0.0285850428044796, 0.028926409780979156, 0.020753007382154465, 0.038475729525089264, 0.01680334471166134, -0.01660912111401558, 0.04562230780720711, -0.1376190185546875, -0.019157428294420242, 0.04127737134695053, 0.07701030373573303, 0.022430630400776863, 0.0479383...
1,185,868
_________ justice is designed to repair the harm to victim, the community and the offender caused by the offender criminal act. question 19 options:
DESCRIPTION
[ "Restorative justice that fosters dialogue between victim and offender has shown the highest rates of victim satisfaction and offender accountability." ]
[]
[ "group discussions, community boards or panels with a third party, or victim and offender dialogues, and requires a skilled facilitator who also has sufficient understanding of sexual assault, domestic violence, and dating violence, as well as trauma and safety issues.", "punishment designed to repair the damage ...
[ "https://www.justice.gov/ovw/file/926101/download", "https://quizlet.com/1128245/criminal-justice-exam-1-flash-cards/", "http://restorativejustice.org/restorative-justice/about-restorative-justice/tutorial-intro-to-restorative-justice/", "https://www.ojjdp.gov/pubs/implementing/accountability.html", "http:/...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
The approach is based on a theory of justice that considers crime and wrongdoing to be an offense against an individual or community, rather than the State. Restorative justice that fosters dialogue between victim and offender has shown the highest rates of victim satisfaction and offender accountability.
[ -0.007920908741652966, 0.095800019800663, 0.009709893725812435, -0.07098580151796341, 0.006384302396327257, 0.11638998985290527, 0.008502942509949207, 0.04810020327568054, -0.11067294329404831, 0.07925602793693542, 0.04231252521276474, 0.028185974806547165, -0.07507313042879105, 0.01737147...
1,185,854
why did stalin want control of eastern europe
DESCRIPTION
[ "The reasons why Stalin wanted to control Eastern Europe are Russia has historically no secure border and they wanted to set up satellite countries." ]
[]
[ "Western betrayal. The concept of Western betrayal refers to the view that the United Kingdom and France failed to meet their legal, diplomatic, military and moral obligations with respect to the Czech and Polish nations during the prelude to and aftermath of the Second World War.", "The Tuvan People's Republic, ...
[ "https://en.wikipedia.org/wiki/Western_betrayal", "https://en.wikipedia.org/wiki/Satellite_state", "https://en.wikipedia.org/wiki/Satellite_state", "https://brainly.com/question/1017368", "https://www.theatlantic.com/international/archive/2012/10/how-communism-took-over-eastern-europe-after-world-war-ii/263...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
There are 3 main reasons why Stalin wanted to control Eastern Europe. 1.) Russia has historically no secure border. 2.) They wanted to set up satellite countries. 3.)
[ -0.06405764818191528, 0.0914248451590538, -0.035563282668590546, 0.03138798475265503, 0.018028711900115013, -0.02959858812391758, 0.07999741286039352, -0.004376992583274841, -0.03578544035553932, -0.017776934430003166, -0.02969149872660637, 0.027436640113592148, -0.09089847654104233, 0.058...
1,185,755
why do nails get rusty
DESCRIPTION
[ "Nails rust in water because water allows the iron to react with any oxygen present, which forms iron oxide. Nails rust due to presence of some impurities in the water, particularly salts, which speeds up the transfer of electrons from iron to oxygen." ]
[]
[ "what to Do If I Stepped on Rusty Nail: Prevent Getting Tetanus. What to do if you step on a nail and are afraid to get Tetanus? Tetanus vaccines are available to help the body fight off the bacteria that causes this infection. Patients as young as two months are able to receive a tetanus shot.", "Just asked! See...
[ "http://www.healthcare-online.org/Stepped-On-Rusty-Nail.html", "https://socratic.org/questions/how-to-explain-the-law-of-conservation-of-mass-using-a-nail-rusting-in-air", "https://www.reference.com/beauty-fashion/nails-rust-water-a757692adb7c0eb4", "http://www.healthcare-online.org/Stepped-On-Rusty-Nail.html...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ]
A: Nails rust in water because water allows the iron to react with any oxygen present, which forms iron oxide, known as rust. In order to cause rust quickly, there must be some impurities in the water, particularly salts, since these speed up the transfer of electrons from iron to oxygen.
[ -0.09105702489614487, 0.003785940119996667, 0.013629382476210594, 0.038855407387018204, 0.021152185276150703, -0.0377110056579113, 0.040161360055208206, 0.0031491885893046856, -0.02350717782974243, -0.036830104887485504, -0.03876149654388428, -0.00899719912558794, 0.04805959761142731, -0.0...
1,184,773
depona ab
DESCRIPTION
[ "Depona Ab is a library in Vilhelmina, Sweden." ]
[]
[ "A preview of what LinkedIn members have to say about Göran: Göran är en mycket duktig och noggrann säljare och ledare. Under görans ledning och stöd byggde vi en effektiv och stark sälj/marknads organisation för outsourcing av dokumenthanteringstjänster i stor skala. Jag jobbar gärna med Göran närsomhelst och reko...
[ "https://www.linkedin.com/in/goranaxelsson", "https://www.kauppalehti.fi/yritykset/yritys/depona+oy/21527338", "http://www.standardbolag.com/about-us/", "https://www.linkedin.com/in/martin-townsend-7b4b8026", "http://www.depona.lv/kapec-depona/", "https://www.bloomberg.com/profiles/companies/5175594Z:SS-d...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
Depona Ab is a library in Vilhelmina, Sweden. The company is located at Slggatan 1. This private company was founded in 1999 (about 16 years ago). A typical library has between 4 and 80 employees, meaning that Depona Ab, with a reported 5 employees, employs a typical amount of people for the industry within Sweden.
[ -0.038954559713602066, 0.046078070998191833, -0.01714886538684368, -0.026949694380164146, -0.11032232642173767, -0.03200438246130943, 0.09371180832386017, 0.06912287324666977, 0.025548376142978668, 0.05334607511758804, 0.06331073492765427, -0.07891331613063812, -0.03203671798110008, -0.052...
1,174,762
is the atlanta airport the busiest in the world
LOCATION
[ "No Answer Present." ]
[]
[ "While Chicago O’Hare in 2014 was briefly the world’s busiest in flight counts, Atlanta has had the most flights for the past two years. Hartsfield-Jackson had a 1.8 percent increase in flights in 2016, while Chicago O’Hare had a 0.9 percent decline.", "More than 104 million travelers passed through Atlanta's air...
[ "http://www.ajc.com/travel/hartsfield-jackson-retains-title-world-busiest-airport/1QbkFE3E6DBckQMPhMtROJ/", "https://www.cnbc.com/2017/12/17/atlanta-airport-the-worlds-busiest-reports-power-outage.html", "https://en.wikipedia.org/wiki/World%27s_busiest_airports_by_passenger_traffic", "http://www.dailymail.co....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
null
[ 0.060584187507629395, -0.03277411311864853, -0.02180362306535244, 0.09932153671979904, -0.0008423842955380678, -0.06826598197221756, 0.11078731715679169, -0.0007136211497709155, 0.0195298008620739, 0.05959879606962204, -0.07875244319438934, 0.0631134882569313, -0.01453731581568718, 0.01544...
467,556
nyu tuition cost
NUMERIC
[ "$43,746 for the 2014-2015 academic year." ]
[]
[ "the cost of attending new york university is comparable to that of other selective private institutions new york university charges tuition and registration fees on a per unit basis for 2015 2016 the tuition rate is expected to be $ 1616 per unit plus registration and service feesthe estimated total tuition for th...
[ "http://cusp.nyu.edu/tuition-and-fees/", "http://www.collegecalc.org/colleges/new-york/new-york-university/", "http://www.collegecalc.org/colleges/new-york/new-york-university/", "http://socialwork.nyu.edu/admissions/msw/tuition-fees.html", "http://www.collegecalc.org/colleges/new-york/new-york-university/"...
[ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
tuition for new york university is $ 43746 for the 2014 2015 academic year this is 73 % more expensive than the national average private non profit four year college tuition of $ 25240he net out of pocket total cost you end up paying or financing though student loans is known as the net price the reported new york univ...
[ 0.05409286543726921, -0.006679571233689785, 0.024776464328169823, 0.038981642574071884, 0.02099209651350975, 0.007149785757064819, -0.039297543466091156, -0.02385617420077324, 0.06271382421255112, 0.054192665964365005, 0.07249479740858078, 0.0551222562789917, -0.06962457299232483, 0.008850...
28,213
at what age do kids start to hold memories
NUMERIC
[ "Before the age of 2–4 years." ]
[]
[ "In an effort to better understand how children form memories, the researchers asked 140 kids between the ages of 4 and 13 to describe their earliest memories and then asked them to do the same thing two years later.", "Conversely, a third of the children who were age 10 to 13 during the first interview described...
[ "http://www.webmd.com/parenting/news/20110511/when-do-kids-form-their-first-memories", "http://www.webmd.com/parenting/news/20110511/when-do-kids-form-their-first-memories", "https://en.wikipedia.org/wiki/Childhood_amnesia", "https://en.wikipedia.org/wiki/Memory_development", "http://www.webmd.com/parenting...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
Childhood amnesia, also called infantile amnesia, is the inability of adults to retrieve episodic memories before the age of 2–4 years, as well as the period before age 10 of which adults retain fewer memories than might otherwise be expected given the passage of time.
[ 0.02778811939060688, 0.020821500569581985, -0.014007767662405968, 0.009749340824782848, -0.041326865553855896, 0.07658512145280838, -0.01870620809495449, -0.020134124904870987, 0.08135446906089783, -0.008655036799609661, 0.040461789816617966, 0.09005409479141235, -0.0038146525621414185, 0....
44,588
average teeth brushing time
NUMERIC
[ "Americans brush for just under the two minutes on average." ]
[]
[ "Your dentist or oral surgeon may use one of three types of anesthesia, depending on the expected complexity of the wisdom tooth extraction and your comfort level. Local anesthesia. Your dentist or oral surgeon administers local anesthesia with one or more injections near the site of each extraction.", "Your dent...
[ "http://www.mayoclinic.org/tests-procedures/wisdom-tooth-extraction/basics/what-you-can-expect/PRC-20020652", "http://www.mayoclinic.org/tests-procedures/wisdom-tooth-extraction/basics/what-you-can-expect/PRC-20020652", "https://www.deltadental.com/Public/NewsMedia/NewsReleaseDentalSurveyFindsShortcomings_20140...
[ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
On average, Americans brush for just under the two minutes recommended by dental professionals. African Americans brush 18 seconds longer than Americans as a whole, while younger adults ages 18 to 24 spend 16 seconds longer than average brushing. Nearly six of 10 Americans brush their teeth at bedtime and as soon as th...
[ 0.004951197188347578, -0.04225192219018936, -0.0006780250696465373, -0.02570004016160965, -0.08119191974401474, -0.041898567229509354, -0.07828767597675323, 0.06856059283018112, -0.031096573919057846, 0.03374350443482399, -0.052507735788822174, -0.015251368284225464, -0.01944497786462307, ...
410,717
is funner a word?
DESCRIPTION
[ "Yes, funner is a word." ]
[]
[ "Taken from Wiktionary: Funnest is a regular superlative of the adjective fun. However, the use of fun as an adjective is itself still often seen as informal or casual and to be avoided in formal writing, and this would apply equally to the superlative form.", "adjective, funnier, funniest. 1. providing fun; caus...
[ "https://english.stackexchange.com/questions/4066/is-funnest-a-word", "http://www.dictionary.com/browse/funnier", "http://unenlightenedenglish.com/2009/05/why-is-funner-not-a-word/", "https://english.stackexchange.com/questions/137907/is-funner-a-word", "https://english.stackexchange.com/questions/137907/is...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 ]
Funner is, of course, a word in the same sense that ponyfraggis is a word, if word is defined as a pronounceable sequence of letters delimited by whitespace. In terms of usage, the frequency of use of More fun vs funner in formal writing suggest that funner is spoken slang. Naturally it is a word, too.
[ 0.031283169984817505, -0.04458744078874588, -0.038587555289268494, 0.014223582111299038, -0.05585481971502304, -0.06176036596298218, 0.08700615167617798, 0.002189174061641097, -0.01575450971722603, 0.042740605771541595, 0.10412126779556274, -0.04879346862435341, 0.02374984882771969, 0.0449...
620,830
what direction does phloem flow
DESCRIPTION
[ "No Answer Present." ]
[]
[ "Phloem is a conductive (or vascular) tissue found in plants. Phloem carries the products of photosynthesis (sucrose and glucose) from the leaves to other parts of the plant. … The corresponding system that circulates water and minerals from the roots is called the xylem.", "Phloem and xylem are complex tissues t...
[ "http://www.answers.com/Q/Which_direction_does_phloem_flow", "http://www.diffen.com/difference/Phloem_vs_Xylem", "http://www.diffen.com/difference/Phloem_vs_Xylem", "http://www.answers.com/Q/Which_direction_does_phloem_flow", "http://www.answers.com/Q/Phloem_moves_the_food_in_what_direction", "http://www....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
null
[ 0.04725565388798714, -0.04875387251377106, -0.02148260548710823, -0.0021657205652445555, 0.04482949152588844, 0.002844723407179117, -0.03398057818412781, 0.005301510915160179, 0.02018260583281517, 0.03827882185578346, 0.013075632974505424, -0.005113162565976381, -0.05868305265903473, 0.030...
728,808
what is ce certified
DESCRIPTION
[ "An abbreviation of Conformite Conformité, europeenne Européenne Meaning. european conformity." ]
[]
[ "CE Certification. CE Certification is required for all recreational boats entering or being sold in the European Union. Manufacturers must test and document to ensure conformity to all applicable European directives and requirements. CE certification is obtained from Notified Bodies, organizations that are recogni...
[ "http://www.nmma.org/certification/ce-certification", "http://www.nmma.org/certification/ce-certification", "https://en.wikipedia.org/wiki/CE_marking", "https://www.pilz.com/en-AU/company/news/articles/072298", "https://en.wikipedia.org/wiki/CE_marking", "https://www.certification-experts.com/", "https:...
[ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 ]
The CE marking is the manufacturer's declaration that the product meets the requirements of the applicable EC directives. Officially, CE is an abbreviation of Conformite Conformité, europeenne Européenne Meaning. european conformity
[ -0.0370895192027092, -0.06406919658184052, -0.005613381043076515, -0.008544635958969593, 0.03576631471514702, -0.007580331992357969, 0.038985684514045715, 0.055252835154533386, 0.036743972450494766, 0.01704612374305725, -0.0030839061364531517, -0.12694182991981506, 0.08313032984733582, 0.0...
27,022
artin chicken mcdonalds calories
NUMERIC
[ "No Answer Present." ]
[]
[ "McDonald's USA Nutrition Facts for Popular Menu Items. We provide a nutrition analysis of our menu items to help you balance your McDonald's meal with other foods you eat. Our goal is to provide you with the information.", "Which brings us to the combatants in today’s fast-food fight between two fairly new respe...
[ "http://nutrition.mcdonalds.com/usnutritionexchange/nutritionfacts.pdf", "http://theconcourse.deadspin.com/chicken-fight-mcdonalds-artisan-grilled-vs-taco-bells-1700758166", "http://theconcourse.deadspin.com/chicken-fight-mcdonalds-artisan-grilled-vs-taco-bells-1700758166", "http://theconcourse.deadspin.com/c...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
null
[ -0.06964754313230515, -0.06275823712348938, 0.029167592525482178, -0.003254096722230315, 0.03089967556297779, -0.05970696359872818, 0.10818971693515778, -0.0292190108448267, 0.036414798349142075, 0.003115395549684763, 0.010730701498687267, -0.028492968529462814, -0.12391065806150436, -0.00...
420,332
is panglao island safe
DESCRIPTION
[ "No Answer Present." ]
[]
[ "Panglao is an island in the north Bohol Sea, located in the Central Visayas Region of the Visayas island group, in the south-central Philippines.he airport is very close to Tagbilaran Airport which currently serves as the gateway to Panglao Island and the rest of Bohol for domestic air travelers. It also is less t...
[ "https://en.wikipedia.org/wiki/Panglao_Island", "http://goasia.about.com/od/Destinations-in-the-Philippines/fl/Panglao-Island-Philippines.htm", "https://en.wikipedia.org/wiki/Panglao_Island", "http://goasia.about.com/od/Destinations-in-the-Philippines/fl/Panglao-Island-Philippines.htm", "https://en.wikipedi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
null
[ 0.003344745608046651, 0.056294653564691544, -0.05031394585967064, -0.013823755085468292, 0.04033997282385826, -0.048698656260967255, -0.00059589120792225, 0.025672880932688713, -0.10088910162448883, 0.05318081006407738, 0.010112343356013298, -0.015024273656308651, -0.049392323940992355, 0....
727,194
what is calomel powder used for?
DESCRIPTION
[ "No Answer Present." ]
[]
[ "Synonyms for calomel in the sense of this definition. mercurous chloride (calomel is a kind of ...) any compound containing a chlorine atom. chloride (calomel is made of the substance ...) a heavy silvery toxic univalent and bivalent metallic element; the only metal that is liquid at ordinary temperatures. atomic ...
[ "http://www.wordfocus.com/word/calomel/", "http://www.wordfocus.com/word/calomel/", "https://en.wikipedia.org/wiki/Calomel", "https://www.webmd.com/drugs/2/drug-76432/calomel-bulk/details", "https://www.webmd.com/drugs/2/drug-76432/calomel-bulk/details", "http://www.wordfocus.com/word/calomel/", "https:...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
null
[ -0.03450858220458031, -0.012345838360488415, -0.036437105387449265, 0.020142219960689545, 0.09223189949989319, 0.02892560139298439, 0.1099095344543457, 0.053916726261377335, 0.07252295315265656, 0.0009333829511888325, 0.01282709650695324, 0.02834242954850197, -0.007250305265188217, 0.04109...
End of preview. Expand in Data Studio

YAML Metadata Warning:The task_categories "lance" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

MS MARCO v2.1 QA (Lance Format)

A Lance-formatted version of MS MARCO v2.1 — Microsoft's machine-reading-comprehension benchmark built from anonymized Bing query logs. Each row is one user query, the up-to-10 candidate passages Bing retrieved for it with relevance flags, and the human-written reference answers, with MiniLM query embeddings stored inline and pre-built ANN/FTS indices, available directly from the Hub at hf://datasets/lance-format/ms-marco-v2.1-lance/data.

Key features

  • Self-contained passage-ranking rows — each query carries up to 10 candidate passages in parallel passage_text / passage_url / passage_is_selected columns, alongside the human-written answers and well_formed_answers.
  • First relevant passage promoted to its own field in selected_passage, so RAG / answer-evaluation workflows can read the gold context without indexing into the parallel passage lists.
  • Pre-computed 384-dim query embeddings (query_emb, sentence-transformers/all-MiniLM-L6-v2, cosine-normalized) with a bundled IVF_PQ index for semantic query lookup.
  • One columnar dataset — scan query metadata cheaply, defer the heavy passage text reads to the rows that matter.

Splits

Split Rows
train.lance 808,731
validation.lance 101,093

Schema

Column Type Notes
query_id int64 MS MARCO query id
query string The user's natural-language query
query_type string One of DESCRIPTION, NUMERIC, ENTITY, LOCATION, PERSON
answers list<string> Human-written reference answers
well_formed_answers list<string> Reference answers re-written as full sentences
passage_text list<string> Up to 10 candidate passages
passage_url list<string> Source URLs for each candidate
passage_is_selected list<int8> 1 if Bing labelled the passage relevant
selected_passage string? First relevant passage (null if none)
query_emb fixed_size_list<float32, 384> MiniLM query embedding

Pre-built indices

  • IVF_PQ on query_emb — semantic query lookup (cosine)
  • INVERTED (FTS) on query and selected_passage — keyword and hybrid search
  • BTREE on query_id — stable lookup by identifier
  • BITMAP on query_type — cheap predicate evaluation for query class

Why Lance?

  1. Blazing Fast Random Access: Optimized for fetching scattered rows, making it ideal for random sampling, real-time ML serving, and interactive applications without performance degradation.
  2. Native Multimodal Support: Store text, embeddings, and other data types together in a single file. Large binary objects are loaded lazily, and vectors are optimized for fast similarity search.
  3. Native Index Support: Lance comes with fast, on-disk, scalable vector and FTS indexes that sit right alongside the dataset on the Hub, so you can share not only your data but also your embeddings and indexes without your users needing to recompute them.
  4. Efficient Data Evolution: Add new columns and backfill data without rewriting the entire dataset. This is perfect for evolving ML features, adding new embeddings, or introducing moderation tags over time.
  5. Versatile Querying: Supports combining vector similarity search, full-text search, and SQL-style filtering in a single query, accelerated by on-disk indexes.
  6. Data Versioning: Every mutation commits a new version; previous versions remain intact on disk. Tags pin a snapshot by name, so retrieval systems and training runs can reproduce against an exact slice of history.

Load with datasets.load_dataset

You can load Lance datasets via the standard HuggingFace datasets interface, suitable when your pipeline already speaks Dataset / IterableDataset or you want a quick streaming sample.

import datasets

hf_ds = datasets.load_dataset("lance-format/ms-marco-v2.1-lance", split="validation", streaming=True)
for row in hf_ds.take(3):
    print(row["query"], "->", row["answers"])

Load with LanceDB

LanceDB is the embedded retrieval library built on top of the Lance format (docs), and is the interface most users interact with. Each .lance file in data/ is a table — open by name (train, validation). The same handle is used by the Search, Curate, Evolve, Versioning, and Materialize-a-subset sections below.

import lancedb

db = lancedb.connect("hf://datasets/lance-format/ms-marco-v2.1-lance/data")
tbl = db.open_table("validation")
print(len(tbl))

Load with Lance

pylance is the Python binding for the Lance format and works directly with the format's lower-level APIs. Reach for it when you want to inspect dataset internals — schema, scanner, fragments, the list of pre-built indices.

import lance

ds = lance.dataset("hf://datasets/lance-format/ms-marco-v2.1-lance/data/validation.lance")
print(ds.count_rows(), ds.schema.names)
print(ds.list_indices())

Tip — for production use, download locally first. Streaming from the Hub works for exploration, but heavy random access and ANN search are far faster against a local copy:

hf download lance-format/ms-marco-v2.1-lance --repo-type dataset --local-dir ./ms-marco-v2.1-lance

Then point Lance or LanceDB at ./ms-marco-v2.1-lance/data.

Search

The bundled IVF_PQ index on query_emb makes nearest-neighbour query lookup a single call. In production you would encode an incoming user query through the same 384-dim MiniLM encoder used at ingest and pass the resulting vector to tbl.search(...). The example below uses the embedding from row 42 as a runnable stand-in so the snippet works without loading a model.

import lancedb

db = lancedb.connect("hf://datasets/lance-format/ms-marco-v2.1-lance/data")
tbl = db.open_table("validation")

seed = (
    tbl.search()
    .select(["query_emb", "query"])
    .limit(1)
    .offset(42)
    .to_list()[0]
)

hits = (
    tbl.search(seed["query_emb"], vector_column_name="query_emb")
    .metric("cosine")
    .where("query_type = 'NUMERIC'", prefilter=True)
    .select(["query_id", "query", "selected_passage", "answers"])
    .limit(10)
    .to_list()
)
for r in hits:
    print(r["query"], "->", (r["selected_passage"] or "")[:120])

The result set carries only the projected columns; the 384-d query_emb is never read on the result side, and the full passage_text list is left untouched, keeping the working set small even when the underlying scan touches every row of the validation split.

Because the dataset also ships an INVERTED index on both query and selected_passage, the same query can be issued as a hybrid search that combines the dense vector with a keyword query against the gold passage. LanceDB merges the two result lists and reranks them in a single call, which is useful when a phrase must literally appear in the relevant passage but the dense side still does most of the ranking.

hybrid_hits = (
    tbl.search(query_type="hybrid")
    .vector(seed["query_emb"])
    .text("determinant matrix")
    .select(["query", "selected_passage", "answers"])
    .limit(10)
    .to_list()
)
for r in hybrid_hits:
    print(r["query"])

Tune metric, nprobes, and refine_factor on the vector side to trade recall against latency for your workload.

Curate

A typical curation pass over MS MARCO starts by combining metadata filters with structural predicates over the parallel passage lists before any heavy text gets read. Lance evaluates the filter inside a single scan, so the candidate set comes back already filtered, and the bounded .limit(1000) keeps the output small enough to inspect. The example below assembles a set of numeric questions for which Bing labelled at least one passage relevant and the annotators produced a well-formed reference answer.

import lancedb

db = lancedb.connect("hf://datasets/lance-format/ms-marco-v2.1-lance/data")
tbl = db.open_table("train")

candidates = (
    tbl.search()
    .where(
        "query_type = 'NUMERIC' "
        "AND selected_passage IS NOT NULL "
        "AND array_length(well_formed_answers) > 0 "
        "AND length(query) >= 30",
        prefilter=True,
    )
    .select(["query_id", "query", "answers", "well_formed_answers"])
    .limit(1000)
    .to_list()
)
print(f"{len(candidates)} candidates; first: {candidates[0]['query']}")

The result is a plain list of dictionaries, ready to inspect, persist as a manifest of query_ids, or hand to the Evolve and Train sections below. Neither passage_text nor query_emb is read by this scan, so a 1000-row curation pass against the Hub moves only kilobytes of metadata.

Evolve

Lance stores each column independently, so a new column can be appended without rewriting the existing data. The lightest form is a SQL expression: derive the new column from columns that already exist, and Lance computes it once and persists it. The example below adds a query_length column and a num_selected count over the parallel passage_is_selected list, either of which can then be used directly in where clauses without recomputing the predicate on every query.

Note: Mutations require a local copy of the dataset, since the Hub mount is read-only. See the Materialize-a-subset section at the end of this card for a streaming pattern that downloads only the rows and columns you need, or use hf download to pull the full corpus.

import lancedb

db = lancedb.connect("./ms-marco-v2.1-lance/data")  # local copy required for writes
tbl = db.open_table("train")

tbl.add_columns({
    "query_length": "length(query)",
    "num_selected": "array_length(passage_is_selected)",
    "has_well_formed": "array_length(well_formed_answers) > 0",
})

If the values you want to attach already live in another table (cross-encoder reranker scores, generated-answer judgments, alternate embeddings from a stronger model), merge them in by joining on query_id:

import pyarrow as pa

reranker_scores = pa.table({
    "query_id": pa.array([1185869, 9083, 524332], type=pa.int64()),
    "reranker_top1_score": pa.array([0.91, 0.47, 0.83]),
})
tbl.merge(reranker_scores, on="query_id")

The original columns and indices are untouched, so existing code that does not reference the new columns continues to work unchanged. New columns become visible to every reader as soon as the operation commits. For column values that require a Python computation (e.g., running a different encoder over the query text), Lance provides a batch-UDF API — see the Lance data evolution docs.

Train

Projection lets a training loop read only the columns each step actually needs. LanceDB tables expose this through Permutation.identity(tbl).select_columns([...]), which plugs straight into the standard torch.utils.data.DataLoader so prefetching, shuffling, and batching behave as in any PyTorch pipeline. For a reader-style QA model the natural projection is the query plus the gold passage and the answer; for a query-encoder retraining loop the precomputed embedding is enough on its own.

import lancedb
from lancedb.permutation import Permutation
from torch.utils.data import DataLoader

db = lancedb.connect("hf://datasets/lance-format/ms-marco-v2.1-lance/data")
tbl = db.open_table("train")

train_ds = Permutation.identity(tbl).select_columns(["query", "selected_passage", "answers"])
loader = DataLoader(train_ds, batch_size=32, shuffle=True, num_workers=4)

for batch in loader:
    # batch carries only the projected columns; tokenize, forward, backward...
    ...

Switching feature sets is a configuration change: passing ["query_emb", "passage_text", "passage_is_selected"] to select_columns(...) on the next run reads only those columns, which is the right shape for training a passage reranker on cached query embeddings. Columns added in Evolve cost nothing per batch until they are explicitly projected.

Versioning

Every mutation to a Lance dataset, whether it adds a column, merges labels, or builds an index, commits a new version. Previous versions remain intact on disk. You can list versions and inspect the history directly from the Hub copy; creating new tags requires a local copy since tags are writes.

import lancedb

db = lancedb.connect("hf://datasets/lance-format/ms-marco-v2.1-lance/data")
tbl = db.open_table("train")

print("Current version:", tbl.version)
print("History:", tbl.list_versions())
print("Tags:", tbl.tags.list())

Once you have a local copy, tag a version for reproducibility:

local_db = lancedb.connect("./ms-marco-v2.1-lance/data")
local_tbl = local_db.open_table("train")
local_tbl.tags.create("numeric-v1", local_tbl.version)

A tagged version can be opened by name, or any version reopened by its number, against either the Hub copy or a local one:

tbl_v1 = db.open_table("train", version="numeric-v1")
tbl_v5 = db.open_table("train", version=5)

Pinning supports two workflows. A retrieval system locked to numeric-v1 keeps returning stable passages while the dataset evolves in parallel — newly added reranker scores or labels do not change what the tag resolves to. A training experiment pinned to the same tag can be rerun later against the exact same queries and passages, so changes in metrics reflect model changes rather than data drift. Neither workflow needs shadow copies or external manifest tracking.

Materialize a subset

Reads from the Hub are lazy, so exploratory queries only transfer the columns and row groups they touch. Mutating operations (Evolve, tag creation) need a writable backing store, and a training loop benefits from a local copy with fast random access. Both can be served by a subset of the dataset rather than the full corpus. The pattern is to stream a filtered query through .to_batches() into a new local table; only the projected columns and matching row groups cross the wire, and the bytes never fully materialize in Python memory.

import lancedb

remote_db = lancedb.connect("hf://datasets/lance-format/ms-marco-v2.1-lance/data")
remote_tbl = remote_db.open_table("train")

batches = (
    remote_tbl.search()
    .where(
        "query_type = 'NUMERIC' "
        "AND selected_passage IS NOT NULL "
        "AND array_length(well_formed_answers) > 0"
    )
    .select(["query_id", "query", "query_type", "answers", "well_formed_answers", "selected_passage", "query_emb"])
    .to_batches()
)

local_db = lancedb.connect("./ms-marco-numeric")
local_db.create_table("train", batches)

The resulting ./ms-marco-numeric is a first-class LanceDB database. Every snippet in the Search, Evolve, Train, and Versioning sections above works against it by swapping hf://datasets/lance-format/ms-marco-v2.1-lance/data for ./ms-marco-numeric.

Source & license

Converted from microsoft/ms_marco (v2.1). MS MARCO is released under the MIT license.

Citation

@article{nguyen2016ms,
  title={MS MARCO: A Human Generated MAchine Reading COmprehension Dataset},
  author={Nguyen, Tri and Rosenberg, Mir and Song, Xia and Gao, Jianfeng and Tiwary, Saurabh and Majumder, Rangan and Deng, Li},
  journal={arXiv preprint arXiv:1611.09268},
  year={2016}
}
Downloads last month
73

Paper for lance-format/ms-marco-v2.1-lance