Engineering
Validate skill outputs in three layers
Check shape, domain invariants, and evidence before accepting a structured result.
A model response that conforms to a schema has passed the first acceptance test. A downstream consumer may still receive a nonexistent record identifier, an amount with the wrong unit, or a formally valid claim that the input never supports. Each failure needs a check at the layer that can observe it.
Validate the response contract
Use provider-supported schema constraints to express required fields, enumerations, and basic types. Test refusal, interruption, and missing-result handling as distinct runtime paths. Keep a representative fixture for providers or models that expose different subsets of the schema language.
Check the domain invariants
Application code can verify that referenced records exist, ranges make sense, and mutually dependent fields agree. For example, a scheduling result titled confirmed must carry a valid reservation ID obtained from that tenant’s service. A convenient status string is insufficient on its own.
Attach evidence at the field level
For extracted facts, consider storing the source location alongside the value. Review checks can then inspect the exact input span when the system is uncertain. If the evidence supporting a field is absent, route to a typed unknown value or a missing-evidence outcome instead of inventing a default for the next consumer.