Define JSON schemas to ensure structured and validated responses from AI models.
schema
key within the prompt’s configuration block (---
). Define the expected JSON structure using standard JSON Schema syntax.
type: object
).properties
: sentiment
, confidence
, and explanation
.sentiment
must be one of the strings in the enum
list.confidence
must be a number
between 0 and 1.explanation
is an optional string
.sentiment
and confidence
are mandatory (required
list).schema
is defined:
schema
property defined in the configuration, it will only be applied to the final response of the Agent, and not any intermediate steps.