Who Is More Honest with JSON: ChatGPT, Gemini or xAI?

Habr developers ran adversarial tests of Structured Outputs from OpenAI, Gemini and xAI to see how faithfully each follows JSON Schema. They asked the models to deliberately break the response format and watched where each provider holds the line. The results were unexpected: the restrictions on anyOf, oneOf, allOf and strict: true differ across all three. The takeaway: for production systems that use several providers, this is critical.

AI-processed from Habr AI; edited by Hamidun News
Who Is More Honest with JSON: ChatGPT, Gemini or xAI?
Source: Habr AI. Collage: Hamidun News.
Listen to article

Habr developers ran a study of how Structured Outputs work at three leading LLM providers: ChatGPT (OpenAI), Gemini and xAI.

How did they test honesty in JSON handling?

The authors used adversarial testing. They built prompts designed to push the model into violating the JSON Schema, then checked where each provider holds the line and where it gives way.

Story
ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…