Skip to content

StructuredOutputJudge

StructuredOutputJudge(config?): Judge<StructuredOutputJudgeOptions>

Creates a deterministic judge that compares structured output fields.

StructuredOutputJudgeConfig = {}

Matching behavior shared by every assessment from this judge.

Judge<StructuredOutputJudgeOptions>

describeEval("refund agent", {
harness: refundHarness,
judges: [StructuredOutputJudge()],
}, (it) => {
it("returns the expected decision", async ({ run }) => {
await run("Refund invoice inv_123", {
metadata: {
expected: { status: "approved" },
},
});
});
});