DynamicMetric
utilizes the evaluateDynamic
function to conduct this detailed analysis.
evaluateDynamic
Functioninput
: The original input question or statement provided to the model.actualOutput
: The actual output generated by the model in response to the input.expectedOutput
: The expected output that ideally should be generated from the input.criteria
: An array of criteria used to evaluate the output. Each criterion details an aspect of the evaluation such as accuracy or relevance.DynamicMetric
ClassDynamicMetric
leverages the evaluateDynamic
function to provide a comprehensive evaluation of the model’s output compared to the expected output.
input
: The original input provided to the model.actualOutput
: The actual output from the model.expectedOutput
: The expected output ideally generated from the input.criteria
: The evaluation criteria.evaluateSteps
method processes the evaluation and returns an overall score based on the average scores across the specified criteria, along with detailed reasons for each criterion’s score.