Dataset Viewer
Auto-converted to Parquet Duplicate
query-id
stringlengths
2
6
corpus-id
stringlengths
2
6
score
int64
1
1
q0
c0
1
q1
c1
1
q2
c2
1
q3
c3
1
q4
c4
1
q5
c5
1
q6
c6
1
q7
c7
1
q8
c8
1
q9
c9
1
q10
c10
1
q11
c11
1
q12
c12
1
q13
c13
1
q14
c14
1
q15
c15
1
q16
c16
1
q17
c17
1
q18
c18
1
q19
c19
1
q20
c20
1
q21
c21
1
q22
c22
1
q23
c23
1
q24
c24
1
q25
c25
1
q26
c26
1
q27
c27
1
q28
c28
1
q29
c29
1
q30
c30
1
q31
c31
1
q32
c32
1
q69
c69
1
q70
c70
1
q71
c71
1
q72
c72
1
q83
c83
1
q84
c84
1
q85
c85
1
q86
c86
1
q87
c87
1
q88
c88
1
q89
c89
1
q90
c90
1
q91
c91
1
q92
c92
1
q93
c93
1
q94
c94
1
q95
c95
1
q96
c96
1
q97
c97
1
q98
c98
1
q99
c99
1
q100
c100
1
q101
c101
1
q102
c102
1
q103
c103
1
q104
c104
1
q105
c105
1
q106
c106
1
q107
c107
1
q108
c108
1
q109
c109
1
q110
c110
1
q111
c111
1
q112
c112
1
q113
c113
1
q114
c114
1
q115
c115
1
q116
c116
1
q117
c117
1
q118
c118
1
q119
c119
1
q120
c120
1
q121
c121
1
q122
c122
1
q123
c123
1
q124
c124
1
q125
c125
1
q126
c126
1
q127
c127
1
q128
c128
1
q129
c129
1
q130
c130
1
q131
c131
1
q132
c132
1
q133
c133
1
q134
c134
1
q135
c135
1
q136
c136
1
q137
c137
1
q138
c138
1
q139
c139
1
q140
c140
1
q141
c141
1
q142
c142
1
q143
c143
1
q144
c144
1
q145
c145
1
End of preview. Expand in Data Studio

NASA Code Retrieval Benchmark v0.1.1

This repository is an updated version of the NASA Code Retrieval Benchmark. It provides a code retrieval benchmark based on code from 7 programming languages sourced from NASA's GitHub repositories.

What's New in v0.1.1?

v0.1.1 introduces a hierarchical structure and official Hugging Face dataset configurations. This allows you to evaluate models specifically by language or by query category without data redundancy in the file system.


Dataset Structure

The ground-truth relationships (qrels) are organized into two primary configurations:

nasa-science-code-benchmark-v0.1.1/
β”œβ”€β”€ corpus.jsonl
β”œβ”€β”€ queries.jsonl
└── qrels/
    β”œβ”€β”€ division/                 # Evaluation by NASA Science Division
    β”‚   β”œβ”€β”€ astrophysics_division.tsv
    β”‚   β”œβ”€β”€ biological_and_physical_sciences_division.tsv
    β”‚   β”œβ”€β”€ earth_science_division.tsv
    β”‚   β”œβ”€β”€ heliophysics_division.tsv
    β”‚   β”œβ”€β”€ planetary_science_division.tsv
    β”‚   └── not_a_nasa_division.tsv
    β”œβ”€β”€ programming_language/     # Evaluation by language
    β”‚   β”œβ”€β”€ c++.tsv
    β”‚   β”œβ”€β”€ c.tsv
    β”‚   β”œβ”€β”€ fortran.tsv
    β”‚   β”œβ”€β”€ java.tsv
    β”‚   β”œβ”€β”€ javascript.tsv
    β”‚   β”œβ”€β”€ matlab.tsv
    β”‚   └── python.tsv
    └── query_type/               # Evaluation by query intent
        β”œβ”€β”€ nasa_science_class_code_docstring_heldout.tsv
        β”œβ”€β”€ nasa_science_class_code_identifier_heldout.tsv
        β”œβ”€β”€ nasa_science_function_code_docstring_heldout.tsv
        └── nasa_science_function_code_identifier_heldout.tsv

How to Use

1. Load by Programming Language

Use this to evaluate model performance on specific languages.

from datasets import load_dataset

ds = load_dataset(
    "nasa-impact/nasa-science-code-benchmark-v0.1.1", 
    name="programming_language"
)

2. Load by Query Type

Use this to evaluate performance based on the nature of the query (e.g., nasa_science_class_code_docstring_heldout, nasa_science_class_code_identifier_heldout).

from datasets import load_dataset

ds = load_dataset(
    "nasa-impact/nasa-science-code-benchmark-v0.1.1", 
    name="query_type"
)

3. Load by Division

Use this to evaluate performance based on the nasa division (e.g., astrophysics_division, biological_and_physical_sciences_division).

from datasets import load_dataset

ds = load_dataset(
    "nasa-impact/nasa-science-code-benchmark-v0.1.1", 
    name="division"
)

Evaluation Categories

Programming Languages

File Language
python.tsv Python
c.tsv C
c++.tsv C++
java.tsv Java
javascript.tsv JavaScript
fortran.tsv Fortran
matlab.tsv Matlab

Query Types

File Description
nasa_science_function_code_docstring_heldout.tsv Query is a function's documentation/comment.
nasa_science_function_code_identifier_heldout.tsv Query is the specific function name.
nasa_science_class_code_docstring_heldout.tsv Query is a class's documentation/comment.
nasa_science_class_code_identifier_heldout.tsv Query is the specific class name.
Downloads last month
104