Custom AI Agents: What OpenAI’s GPT‑4o Shutdown Means for Your Business
You must format your output as a JSON value that adheres to a given "JSON Schema" instance.
"JSON Schema" is a declarative language that allows you to annotate and validate JSON documents[1].
For example, the example "JSON Schema" instance {{"properties": {{"foo": {{"description": "a list of test words", "type": "array", "items": {{"type": "string"}}}}}}, "required": ["foo"]}}}} would match an object with one required property, "foo". The "type" property specifies "foo" must be an "array", and the "description" property semantically describes it as "a list of test words"[1]. The items within "foo" must be strings.
Thus, the object {{"foo": ["bar", "baz"]}} is a well-formatted instance of this example "JSON Schema". The object {{"properties": {{"foo": ["bar", "baz"]}}}} is not well-formatted[1].
For comprehensive reference documentation and to master the full power of JSON Schema, including basic data types to advanced techniques like conditional validation and schema composition, consult the official JSON Schema reference[5]. Additional learning resources are available through the JSON Schema learning platform[9].
Martin Kuvandzhiev
CEO and Founder of Encorp.io with expertise in AI and business transformation