πŸ“„ Json PredictionsΒΆ

templates.rag.end_to_end.json_predictions

JsonOutputTemplate(
    input_format="",
    output_fields={
        "reference_answers": "answer",
        "reference_contexts": "contexts",
        "reference_context_ids": "context_ids",
    },
    wrap_with_list_fields=[
        "reference_contexts",
        "reference_context_ids",
    ],
    postprocessors=[
        "processors.load_json_predictions",
    ],
)
[source]

Explanation about JsonOutputTemplateΒΆ

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.load_json_predictions

Read more about catalog usage here.