Users Pricing

forum

Home Forums How should I handle valid JSON with contradictory values from an OpenAI model? – MindStick

How should I handle valid JSON with contradictory values from an OpenAI model?

Katherine Sullivan 63 18 Oct 2026

I’m using an OpenAI model with Structured Outputs to turn customer requests into support tickets. The response can match the JSON schema and still contain a combination of values my application cannot accept.

For example, a ticket might have requires_follow_up set to false while also containing a follow-up deadline and an assigned follow-up owner. Each field is valid individually, but the ticket is inconsistent.

Where should the consistency checks live?

I’m trying to separate schema compliance from business rule validation. Some constraints could potentially be represented through a different schema design; others depend on account settings that are not included in the model request.

  • Should contradictory fields trigger another model request, or should the application reject the result?
  • When is it reasonable to clear dependent fields automatically?
  • How do you preserve the original customer intent if repairing one field changes the meaning of the ticket?

I’d appreciate examples of handling cross-field validation errors in production, especially when a syntactically valid response should still go to a human reviewer.


0 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md