Structured outputs
Gemini returns the note as typed JSON that matches the template's sections and fields, so every sentence keeps its citation and nothing is lost in parsing.
A clinical note is not free text to Terra. Each template defines sections, typed fields and instructions, and each drafted sentence has to carry the IDs of the sources it relies on.
Gemini's structured output mode lets Terra hand the model a response schema and receive JSON that conforms to it. Sections arrive in order, fields arrive typed, and citations arrive as arrays of source IDs that Terra verifies against the transcript and chart before showing the draft.

