GPT-4o doesn't consistently respect JSON schema on tool use - API / Bugs - OpenAI Developer Forum
HOWEVER, I noticed 4o does not consistently respect the JSON schema. For example, if it chooses to return markdown, it will completely ignore the required json schema. GPT-4 Turbo on the other hand does this very consistently, even when returning markdown, it will return the markdown content in the required JSON field. Does anyone else experienced this? Yes, I just experienced that as well - where gpt-4o does not respect the JSON mode requirement. I have similar results, using the same instructions across gpt3.5-1106, gpt4turbo, and gpt4o, only gpt4o is consisently bad at JSON output, I dont use function calling and instead do JSON output schema instructions, and its pretty bad. usually using the json schema instructions itself instead of the intended JSON structure. I used to get this but no more what do your schema instructions look like? This format works for me Where baz an array and bat an enum Im just giving it 2 simple keys like so: { “answer”: string, “sources”: } Note, i also
Explore this link on the map →