id string | question string | document_title string | document_url string | document_html unknown | short_answers list | num_short_answers int32 | has_short_answer bool | has_long_answer bool | yes_no_answer string | question_emb list |
|---|---|---|---|---|---|---|---|---|---|---|
5225754983651766092 | what purpose did seasonal monsoon winds have on trade | Trade winds | https://en.wikipedia.org//w/index.php?title=Trade_winds&oldid=817251427 | [
60,
33,
68,
79,
67,
84,
89,
80,
69,
32,
104,
116,
109,
108,
62,
10,
60,
72,
84,
77,
76,
32,
99,
108,
97,
115,
115,
61,
34,
99,
108,
105,
101,
110,
116,
45,
106,
115,
32,
118,
101,
45,
110,
111,
116,
45,
97,
118,
97,
10... | [
"enabled European empire expansion into the Americas and trade routes to become established across the Atlantic and Pacific oceans"
] | 1 | true | true | NONE | [
-0.07853327691555023,
0.04611280560493469,
0.07724907249212265,
0.0028307803440839052,
0.03421534597873688,
-0.051832761615514755,
0.06066678836941719,
-0.08851425349712372,
0.002414531074464321,
-0.0028146652039140463,
-0.001159202423878014,
-0.02021697163581848,
0.016522208228707314,
-0.... |
6986236841860957647 | where did they film high school musical two | High School Musical 2 | https://en.wikipedia.org//w/index.php?title=High_School_Musical_2&oldid=833368070 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [] | 0 | false | false | NONE | [0.01664859615266323,0.0014793374575674534,0.06098463013768196,-0.07625432312488556,0.01094524655491(...TRUNCATED) |
-3290814144789249484 | who got the first nobel prize in physics | List of Nobel laureates in Physics | https://en.wikipedia.org//w/index.php?title=List_of_Nobel_laureates_in_Physics&oldid=838175212 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [
"Wilhelm Conrad Röntgen, of Germany",
"Wilhelm Conrad Röntgen"
] | 4 | true | true | NONE | [-0.062158554792404175,0.018238836899399757,0.004047466907650232,0.1510268896818161,0.01677350513637(...TRUNCATED) |
5745452844331879752 | who has the rights to alice in wonderland | Alice in Wonderland (1951 film) | https://en.wikipedia.org//w/index.php?title=Alice_in_Wonderland_(1951_film)&oldid=819153790 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [] | 0 | false | false | NONE | [0.11011487990617752,0.046573616564273834,-0.0074633085168898106,-0.012689981609582901,0.00369335943(...TRUNCATED) |
8851020722386421469 | when is the next deadpool movie being released | Deadpool 2 | https://en.wikipedia.org//w/index.php?title=Deadpool_2&oldid=838535646 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [
"May 18, 2018"
] | 5 | true | true | NONE | [-0.04737701267004013,-0.053297258913517,-0.027981456369161606,-0.052841976284980774,0.0504273809492(...TRUNCATED) |
-909916459264223411 | what is the lowest recorded temperature on mount vinson | Vinson Massif | https://en.wikipedia.org//w/index.php?title=Vinson_Massif&oldid=836064305 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [] | 0 | false | false | NONE | [-0.06362739205360413,0.032448045909404755,-0.034110188484191895,0.01985703781247139,-0.004374480340(...TRUNCATED) |
7524133268429333037 | when is the next tangled the series episode coming out | Tangled: The Series | https://en.wikipedia.org//w/index.php?title=Tangled:_The_Series&oldid=837916932 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [] | 0 | false | false | NONE | [-0.12068630009889603,-0.05222184956073761,-0.022667765617370605,-0.006208768580108881,-0.0352272540(...TRUNCATED) |
-7660771254611710392 | where did the idea of fortnite come from | Fortnite | https://en.wikipedia.org//w/index.php?title=Fortnite&oldid=838517375 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [
"as a cross between Minecraft and Left 4 Dead"
] | 1 | true | true | NONE | [0.04246806353330612,0.009227211587131023,-0.004468461032956839,0.057247333228588104,0.0284167584031(...TRUNCATED) |
3223058827565794274 | texas flip and move how does it work | Texas Flip N Move | https://en.wikipedia.org//w/index.php?title=Texas_Flip_N_Move&oldid=815134751 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [] | 0 | false | false | NONE | [-0.0035262713208794594,-0.04233520105481148,0.0712055191397667,0.00018988009833265096,-0.0240519866(...TRUNCATED) |
8467542931261548456 | global trade during the ming dynasty of china | Economy of the Ming dynasty | https://en.wikipedia.org//w/index.php?title=Economy_of_the_Ming_dynasty&oldid=819567392 | "PCFET0NUWVBFIGh0bWw+CjxIVE1MIGNsYXNzPSJjbGllbnQtanMgdmUtbm90LWF2YWlsYWJsZSIgbGFuZz0iZW4iIGRpcj0ibHR(...TRUNCATED) | [] | 0 | false | true | NONE | [-0.09093639254570007,0.056682080030441284,0.028156742453575134,0.036721330136060715,-0.047591805458(...TRUNCATED) |
End of preview. Expand in Data Studio
Natural Questions — Validation (Lance Format)
Lance-formatted version of the Natural Questions validation split — 7,830 real Google search queries with their full Wikipedia articles and 1–5 annotator labels per question. Sourced from google-research-datasets/natural_questions.
The NQ train split is 143 GB (307,373 rows); it is intentionally not bundled here. Add it via
natural_questions/dataprep.py --splits trainonce disk + bandwidth allow.
Splits
| Split | Rows |
|---|---|
validation.lance |
7,830 |
Schema
| Column | Type | Notes |
|---|---|---|
id |
string |
NQ example id |
question |
string |
Original Google search query |
document_title |
string |
Wikipedia article title |
document_url |
string |
Wikipedia article URL |
document_html |
large_binary |
Full HTML of the article (inline; UTF-8 bytes) |
short_answers |
list<string> |
Deduped short-answer spans across all annotators |
num_short_answers |
int32 |
Total annotator spans (incl. duplicates) |
has_short_answer |
bool |
At least one annotator provided a short-answer span |
has_long_answer |
bool |
At least one annotator selected a long-answer candidate |
yes_no_answer |
string |
YES / NO / NONE — majority vote across annotators |
question_emb |
fixed_size_list<float32, 384> |
sentence-transformers all-MiniLM-L6-v2 (cosine-normalized) |
Pre-built indices
IVF_PQonquestion_emb—metric=cosineINVERTED(FTS) onquestionBTREEonid,document_titleBITMAPonyes_no_answer,has_short_answer,has_long_answer
Quick start
import lance
ds = lance.dataset("hf://datasets/lance-format/natural-questions-val-lance/data/validation.lance")
print(ds.count_rows(), ds.schema.names, ds.list_indices())
Load with LanceDB
These tables can also be consumed by LanceDB, the multimodal lakehouse and embedded search library built on top of Lance, for simplified vector search and other queries.
import lancedb
db = lancedb.connect("hf://datasets/lance-format/natural-questions-val-lance/data")
tbl = db.open_table("validation")
print(f"LanceDB table opened with {len(tbl)} questions")
LanceDB semantic question search
import lancedb
from sentence_transformers import SentenceTransformer
encoder = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2", device="cuda")
q = encoder.encode(["who wrote the declaration of independence"], normalize_embeddings=True)[0]
db = lancedb.connect("hf://datasets/lance-format/natural-questions-val-lance/data")
tbl = db.open_table("validation")
results = (
tbl.search(q.tolist(), vector_column_name="question_emb")
.metric("cosine")
.select(["question", "short_answers", "document_title"])
.limit(5)
.to_list()
)
LanceDB full-text search
import lancedb
db = lancedb.connect("hf://datasets/lance-format/natural-questions-val-lance/data")
tbl = db.open_table("validation")
results = (
tbl.search("declaration of independence")
.select(["question", "document_title"])
.limit(10)
.to_list()
)
Get only questions with short-answer spans
import lance
ds = lance.dataset("hf://datasets/lance-format/natural-questions-val-lance/data/validation.lance")
short = ds.scanner(
filter="has_short_answer = true",
columns=["question", "short_answers", "document_title"],
limit=10,
).to_table().to_pylist()
Filter with LanceDB
import lancedb
db = lancedb.connect("hf://datasets/lance-format/natural-questions-val-lance/data")
tbl = db.open_table("validation")
short = (
tbl.search()
.where("has_short_answer = true")
.select(["question", "short_answers", "document_title"])
.limit(10)
.to_list()
)
Read the full Wikipedia HTML for one question
import lance
ds = lance.dataset("hf://datasets/lance-format/natural-questions-val-lance/data/validation.lance")
row = ds.take([0], columns=["question", "document_html", "document_url"]).to_pylist()[0]
print(row["question"], "->", row["document_url"])
print(row["document_html"][:500].decode("utf-8", errors="replace"))
Source & license
Converted from google-research-datasets/natural_questions. NQ is released under CC BY-SA 3.0 (matching the Wikipedia source).
Citation
@article{kwiatkowski2019natural,
title={Natural Questions: A Benchmark for Question Answering Research},
author={Kwiatkowski, Tom and Palomaki, Jennimaria and Redfield, Olivia and Collins, Michael and Parikh, Ankur and Alberti, Chris and Epstein, Danielle and Polosukhin, Illia and Devlin, Jacob and Lee, Kenton and Toutanova, Kristina and Jones, Llion and Kelcey, Matthew and Chang, Ming-Wei and Dai, Andrew M. and Uszkoreit, Jakob and Le, Quoc and Petrov, Slav},
journal={Transactions of the Association for Computational Linguistics},
year={2019}
}
- Downloads last month
- 49