Enforcing Schema Requirements in Prism Structured Output
The Problem
We encountered an issue within the devlog-ist/landing project where the Gemini AI model, when used with Prism, was not consistently returning a required field (mermaid_diagram) in its structured output. This inconsistency caused downstream processing errors and required a solution to ensure data integrity across all Prism schemas.
The Approach
To address this, we modified