πŸ“„ Yes NoΒΆ

templates.grammatical_error_detection.yes_no

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

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.cast_to_float_return_nan_if_failed, processors.take_first_word, processors.yes_no_to_int, processors.lower_case

Read more about catalog usage here.