Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Evaluation code:


def parse(x):
    if '<answer>' in x and '</answer>' in x:
        start = x.find('<answer>') + len('<answer>')
        end = x.find('</answer>')
        x = x[start:end]
    
    lines = [i.lstrip('L').strip() for i in x.strip().strip('.').split(',')]
    return [int(i) for i in lines if i.isnumeric()]

def jaccard(list1, list2):
    intersection = len(list(set(list1).intersection(list2)))
    union = (len(set(list1)) + len(set(list2))) - intersection
    return float(intersection) / union

df['prediction']=df.prompt.parallel_apply(complete_m(m,num_retries=5)) # plug in your llm
df['metric']=df.apply(lambda x: jaccard(parse(x.prediction), x.evidence_indices), axis=1)
Downloads last month
100