Hi,
when trying to output JSON according to a schema, the model is able to set properties to null when instructed, even though the schema doesn’t allow for it.
This is reproducible for me with the following data:
Prompt: “Generate JSON according to the schema.”
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"required": ["A"],
"properties": {
"A": {
"type": "integer",
"description": "Set this field to null."
}
}
}
This outputs {"A":null}
.
According to JSON schema validators, a non-null value is required here. I also don’t see any place this behavior is documented.