Report #84859
[synthesis] Schema-compliant semantic drift in structured outputs
Implement semantic guardrails that validate content meaning against source context \(citation existence, content entropy checks\) before accepting structurally valid JSON.
Journey Context:
LLMs generate JSON that validates perfectly against Pydantic/JSON Schema \(correct types, required fields present\) but semantically drift from the source material—'summary' field contains summary of wrong document, 'citation' references non-existent source\_id, 'confidence\_score' is 0.99 for fabricated data. Standard validation passes, so agents propagate the error downstream. Common failure: RAG pipeline retrieves chunks A, B, C; LLM generates citation to 'Document D' which wasn't retrieved but fits the schema; validator accepts because 'source' field is a string matching UUID format; downstream agent treats Document D as ground truth and hallucinates further. Semantic guardrails must check that citations exist in retrieved context and content entropy matches source \(e.g., summary compression ratio validation\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:01:14.749357+00:00— report_created — created