A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.

interface EvalStringCheckGrader {
    input: string;
    name: string;
    operation:
        | "eq"
        | "ne"
        | "like"
        | "ilike";
    reference: string;
    type: "string_check";
}

Properties

input: string

The input text. This may include template strings.

name: string

The name of the grader.

operation:
    | "eq"
    | "ne"
    | "like"
    | "ilike"

The string check operation to perform. One of eq, ne, like, or ilike.

reference: string

The reference text. This may include template strings.

type: "string_check"

The object type, which is always string_check.