Code verifiers
Score a response against the expected answer with a deterministic check.
Use a verifier when the final destination is known. This grader reads the expected queue from the example and compares it with the attempt. For a simple field comparison you can also select the built-in content grader. Code verifiers
javascript
export function verify({ output, expectedOutput }) {
if (typeof expectedOutput?.queue !== "string") {
throw new Error("A verified queue is required.");
}
const passed = output.text?.trim() === expectedOutput.queue;
return {
passed,
score: passed ? 1 : 0,
feedback: passed ? "Matched" : "Different queue",
};
}Save this verifier with the grader, run it on labeled examples, and publish a checked binding. Use that binding in the Model configuration. Model setup