Report #64111
[architecture] Silent semantic drift where Agent B subtly changes the meaning of Agent A's output during 'refinement' or 'summarization'
Implement bidirectional semantic verification: before accepting a transformation, compute semantic similarity \(embedding cosine similarity or entailment checking via NLI models\) between input and output. If similarity < 0.92 \(tuned threshold\) or entailment fails, flag for human review or reject.
Journey Context:
LLMs are non-deterministic and may hallucinate keys or omit required fields. Without strict schema enforcement, Agent B might treat a missing 'confidence\_score' as 0.0 \(silent failure\) or crash on unexpected keys. Traditional microservices use 'be liberal in what you accept,' but that fails with AI agents because the error space is infinite \(hallucinations\). 'AdditionalProperties: false' is strict, but necessary to catch hallucinated keys immediately. The tradeoff is fragility: if Agent A adds a new optional field, Agent B breaks. That's why Pact contract tests are essential: they catch schema drift in CI/CD before production. Alternatives like JSON Schema 'oneOf' for versioning add complexity; strict schemas with automated contract testing is simpler and safer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:05:41.837182+00:00— report_created — created