I found another way to improve accuracy. Take the following schema snippet:
"properties": {
"recipe_id": {
"type": ["number", "null"],
"description": dedent("""\
<OPTIONAL>
- Usage: The id of the recipe to modify. Either this or current_name must be provided. NEVER infer this, only use it when a recipe id is explicitly provided.
- Format: number
- Examples: 4, 287, 3000
""")
},
"current_name": {
"type": ["string", "null"],
"description": dedent("""\
<OPTIONAL>
- Usage: The name of the recipe to modify. Either this or recipe_id must be provided.
- Format: string
- Examples: "Spicy Apple Joe", "Mean Green Machine", "Sunset Cooler"
""")
},
}
4o-mini doesn’t seem to be a huge fan of co-dependent optionals, meaning one should be set but not both. Instead, using a single required field appears to be working much better in early tests:
"recipe_identifier": {
"type": ["string", "number"],
"description": dedent("""\
- Usage: The name or id of the recipe to modify.
- Format: string or integer
- Examples: "Spicy Apple Joe", "Mean Green Machine", "Sunset Cooler", 3, 482, 28912
""")
}