πŸ“„ Pop QaΒΆ

Dataset Card for PopQA Dataset Summary PopQA is a large-scale open-domain question answering (QA) dataset, consisting of 14k entity-centric QA pairs. Each question is created by converting a knowledge tuple retrieved from Wikidata using a template. Each question come with the original subject_entitiey, object_entityand relationship_type annotation, as well as Wikipedia monthly page views. Languages The dataset contains samples in English only.… See the full description on the dataset page: https://huggingface.co/datasets/akariasai/PopQA.

Tags: croissant:True, region:us

Note

ID: cards.pop_qa | Type: TaskCard

{
    "__description__": "Dataset Card for PopQA\nDataset Summary\nPopQA is a large-scale open-domain question answering (QA) dataset, consisting of 14k entity-centric QA pairs. Each question is created by converting a knowledge tuple retrieved from Wikidata using a template. Each question come with the original subject_entitiey, object_entityand relationship_type annotation, as well as Wikipedia monthly page views.\nLanguages\nThe dataset contains samples in English only.… See the full description on the dataset page: https://huggingface.co/datasets/akariasai/PopQA.",
    "__tags__": {
        "croissant": true,
        "region": "us"
    },
    "loader": {
        "path": "akariasai/PopQA",
        "type": "load_hf"
    },
    "preprocess_steps": [
        {
            "page_size": 14267,
            "type": "shuffle"
        },
        {
            "field": "possible_answers",
            "type": "load_json"
        }
    ],
    "task": {
        "inputs": [
            "question",
            "prop",
            "subj"
        ],
        "metrics": [
            "metrics.accuracy"
        ],
        "outputs": [
            "possible_answers"
        ],
        "type": "task"
    },
    "templates": {
        "items": [
            {
                "input_format": "Answer to the following question. There is no need to explain the reasoning at all. Simply state just the answer in few words. No need for full answer. No need to repeat the question or words from the question. The answer text should be partial and contain only {prop}. Do not use full sentence. \nQuestion: {question}\nThe {prop} of {subj} is:",
                "postprocessors": [
                    "processors.take_first_non_empty_line",
                    "processors.lower_case"
                ],
                "references_field": "possible_answers",
                "type": "multi_reference_template"
            }
        ],
        "type": "templates_list"
    },
    "type": "task_card"
}

Explanation about TaskCardΒΆ

TaskCard delineates the phases in transforming the source dataset into a model-input, and specifies the metrics for evaluation of model-output.

Attributes:

loader: specifies the source address and the loading operator that can access that source and transform it into a unitxt multistream.

preprocess_steps: list of unitxt operators to process the data source into a model-input.

task: specifies the fields (of the already (pre)processed instance) making the inputs, the fields making the outputs, and the metrics to be used for evaluating the model output.

templates: format strings to be applied on the input fields (specified by the task) and the output fields. The template also carries the instructions and the list of postprocessing steps, to be applied to the model output.

Explanation about ShuffleΒΆ

Shuffles the order of instances in each page of a stream.

Args (of superclass):

page_size (int): The size of each page in the stream. Defaults to 1000.

Explanation about TaskΒΆ

FormTask packs the different instance fields into dictionaries by their roles in the task.

Attributes:
inputs (Union[Dict[str, str], List[str]]):

Dictionary with string names of instance input fields and types of respective values. In case a list is passed, each type will be assumed to be Any.

outputs (Union[Dict[str, str], List[str]]):

Dictionary with string names of instance output fields and types of respective values. In case a list is passed, each type will be assumed to be Any.

metrics (List[str]): List of names of metrics to be used in the task. prediction_type (Optional[str]):

Need to be consistent with all used metrics. Defaults to None, which means that it will be set to Any.

The output instance contains three fields:

β€œinputs” whose value is a sub-dictionary of the input instance, consisting of all the fields listed in Arg β€˜inputs’. β€œoutputs” – for the fields listed in Arg β€œoutputs”. β€œmetrics” – to contain the value of Arg β€˜metrics’

References: processors.lower_case, metrics.accuracy, processors.take_first_non_empty_line

Read more about catalog usage here.