allenai / ir_datasets

Provides a common interface to many IR ranking datasets.
https://ir-datasets.com/
Apache License 2.0
321 stars 43 forks source link

MS MARCO v2.1 and v2.1 segmented for TREC 2024 RAG #267

Open mam10eks opened 4 months ago

mam10eks commented 4 months ago

Dataset Information:

It would be awesome to have the document corpus (and the segmented counterpart) used in TREC RAG 2024 as integration to ir_datasets. From the description on the web page, it should be no problem to add this, random access to documents should also be very efficient as the file and byte offset are already encoded in the document identifiers, so I think there should be no problem.

The only question that I would have is: As the document identifiers contain the offsets in the file where a document starts (but not the end), is there maybe already a functionality that seeks to the start and readys the json entry until the closing bracket? If not, I could add this as well with unit tests, should be no problem.

Links to Resources:

Dataset ID(s) & supported entities:

Checklist

Mark each task once completed. All should be checked prior to merging a new dataset.

Additional comments/concerns/ideas/etc.

mam10eks commented 4 months ago

Dear all, I would be open to make a first proposal for an implementation here.

mam10eks commented 3 months ago

Dear all, I started a draft pull request (only to indicate that there is some progress): https://github.com/allenai/ir_datasets/pull/269

Mainly documentation todos are pending, but as the deadline is close, this might be already useful for others even when the documentation is not yet finalized.

I.e., the main thing for iterating over documents could be already done via (e.g., as covered in the unit tests):

for doc in ir_datasets.load('msmarco-document-v2.1/segmented').docs_iter():
    print(doc)
    break
seanmacavaney commented 3 months ago

Awesome, thanks! I'll take a look at it tomorrow and see if I can tick some of the other tasks :)