Dataset Viewer
Auto-converted to Parquet Duplicate
query-id
stringlengths
2
7
corpus-id
stringlengths
2
7
score
int64
1
1
q488
c488
1
q489
c489
1
q490
c490
1
q491
c491
1
q492
c492
1
q493
c493
1
q494
c494
1
q495
c495
1
q496
c496
1
q497
c497
1
q498
c498
1
q499
c499
1
q500
c500
1
q501
c501
1
q502
c502
1
q503
c503
1
q504
c504
1
q505
c505
1
q506
c506
1
q507
c507
1
q508
c508
1
q509
c509
1
q510
c510
1
q511
c511
1
q512
c512
1
q513
c513
1
q514
c514
1
q515
c515
1
q516
c516
1
q517
c517
1
q518
c518
1
q519
c519
1
q520
c520
1
q521
c521
1
q522
c522
1
q523
c523
1
q524
c524
1
q525
c525
1
q526
c526
1
q527
c527
1
q528
c528
1
q529
c529
1
q530
c530
1
q531
c531
1
q532
c532
1
q533
c533
1
q534
c534
1
q535
c535
1
q536
c536
1
q537
c537
1
q538
c538
1
q539
c539
1
q540
c540
1
q541
c541
1
q542
c542
1
q543
c543
1
q544
c544
1
q545
c545
1
q546
c546
1
q547
c547
1
q548
c548
1
q549
c549
1
q550
c550
1
q551
c551
1
q552
c552
1
q553
c553
1
q554
c554
1
q555
c555
1
q556
c556
1
q557
c557
1
q558
c558
1
q559
c559
1
q560
c560
1
q561
c561
1
q562
c562
1
q563
c563
1
q564
c564
1
q565
c565
1
q566
c566
1
q567
c567
1
q568
c568
1
q569
c569
1
q570
c570
1
q571
c571
1
q572
c572
1
q573
c573
1
q574
c574
1
q575
c575
1
q576
c576
1
q577
c577
1
q578
c578
1
q579
c579
1
q580
c580
1
q581
c581
1
q582
c582
1
q583
c583
1
q584
c584
1
q585
c585
1
q586
c586
1
q587
c587
1
End of preview. Expand in Data Studio
Gated dataset

You have been granted access to this dataset

NASA Code Retrieval Benchmark v0.1

This dataset provides a code retrieval benchmark based on code from 7 programming languages (Python, C, C++, Java, JavaScript, Fortran, and Matlab) sourced from NASA's GitHub repositories. It serves as the held-out test set for evaluating information retrieval models trained on NASA science code. The primary task is to retrieve a relevant code snippet (from the corpus) given a natural language query, which can be a docstring or a code identifier (e.g., function or class name).

Source Data & Training

This benchmark is the official test set corresponding to the following training and validation datasets.


Dataset Statistics

  • Total unique corpus entries: 117,950
  • Total unique query entries: 119,720

Dataset Structure

The dataset follows a standard Information Retrieval format with three main components: a corpus, a set of queries, and query-relevance judgments (qrels).

Data Fields

  • corpus.jsonl: A collection of all unique code snippets (functions and classes) from all languages.

    • _id: A unique string identifier for the code snippet.
    • text: The raw source code.
  • queries.jsonl: A collection of all unique queries (docstrings and identifiers).

    • _id: A unique string identifier for the query.
    • text: The natural language query.
  • qrels/: A directory containing Tab-Separated Values (TSV) files that map queries to their relevant code snippets. This is the ground truth for evaluation. Each file has the format query-id corpus-id score.

Qrels (Query-Relevance Pairs)

The dataset provides several qrels files to evaluate performance across different programming languages and query types.

By Programming Language

Qrels File Description Size
python.tsv All query-corpus pairs for the Python dataset. 64,110
c.tsv All query-corpus pairs for the C dataset. 17,149
c++.tsv All query-corpus pairs for the C++ dataset. 14,975
java.tsv All query-corpus pairs for the Java dataset. 14,088
javascript.tsv All query-corpus pairs for the JavaScript dataset. 5,159
fortran.tsv All query-corpus pairs for the Fortran dataset. 3,586
matlab.tsv All query-corpus pairs for the Matlab dataset. 653

By Query Type

Qrels File Description Size
nasa_science_function_code_docstring_heldout.tsv Pairs where the query is a function docstring. 61,083
nasa_science_function_code_identifier_heldout.tsv Pairs where the query is a function name (identifier). 32,742
nasa_science_class_code_docstring_heldout.tsv Pairs where the query is a class docstring. 13,355
nasa_science_class_code_identifier_heldout.tsv Pairs where the query is a class name (identifier). 12,540

Downloads last month
3

Collection including nasa-impact/nasa-science-code-benchmark-v0.1