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.
Can you answer this question?
Write Answer0 Answers