πŸ“„ Yes NoΒΆ

Note

ID: templates.grammatical_error_detection.yes_no | Type: InputOutputTemplate

{
    "__type__": "input_output_template",
    "input_format": "Text: {text}",
    "instruction": "You are given a text. Does this text contain any grammatical errors or spelling mistakes? Answer only \"Yes\" or \"No\".\n",
    "output_format": "{label}",
    "postprocessors": [
        "processors.take_first_word",
        "processors.lower_case",
        "processors.yes_no_to_int",
        "processors.cast_to_float_return_nan_if_failed"
    ],
    "target_prefix": "Answer: "
}

Explanation about InputOutputTemplateΒΆ

Generate field β€˜source’ from fields designated as input, and fields β€˜target’ and β€˜references’ from fields designated as output, of the processed instance.

Args specify the formatting strings with which to glue together the input and reference fields of the processed instance into one string (β€˜source’ and β€˜target’), and into a list of strings (β€˜references’).

References: processors.lower_case, processors.take_first_word, processors.yes_no_to_int, processors.cast_to_float_return_nan_if_failed

Read more about catalog usage here.