Skip to content

EvalJsonSchemaAssertion

PromptScript API


Defined in: core/src/types/eval.ts:160

Passes when the parsed response matches a JSON Schema.

Extends

Properties

field?

optional field?: string

Defined in: core/src/types/eval.ts:109

Output property the assertion reads; absent means the whole response text

Inherited from

EvalAssertionBase.field


id

id: string

Defined in: core/src/types/eval.ts:107

Assertion id, unique in the suite.

Pattern

^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$

Example

"decision-matches"

Inherited from

EvalAssertionBase.id


kind

kind: "json-schema"

Defined in: core/src/types/eval.ts:161


schema?

optional schema?: Record<string, unknown>

Defined in: core/src/types/eval.ts:163

Inline JSON Schema; absent means the prompt’s output contract