Dev.to Security ๐Ÿ” Cybersecurity ๐Ÿ‘ 2 ๐Ÿ“– 2 min read

Bitemporal RAG: Stopping Superseded Runbooks and Policy Drift Before Synthesis

Vector similarity has no native concept of time or normative negation. Consider two documents in an enterprise knowledge base: Security_Runbook_2024.md: "Emergency SSH jump-host PermitRootLogin is permitted for SEV-1

Vector similarity has no native concept of time or normative negation. Consider two documents in an enterprise knowledge base:

  • Security_Runbook_2024.md: "Emergency SSH jump-host PermitRootLogin is permitted for SEV-1 triage; SEV-1 breach notification SLA is 72 hours."
  • Security_Policy_2026.md: "SSH PermitRootLogin is strictly prohibited across all jump-hosts; SEV-1 breach notification SLA is 24 hours."

Against the query "What is our SEV-1 breach notification SLA and jump-host root SSH policy?", both chunks score nearly identical cosine similarity (> 0.84). Standard top-k RAG injects both into the prompt. Downstream Model Context Protocol (MCP) coding agents and Agent2Agent (A2A) compliance bots then commit one of three silent errors: they cite the superseded 2024 rule, average incompatible numbers, or hedge without flagging an active compliance conflict.

Two Structural Classes of Enterprise Contradiction

In our open CC-BY-4.0 benchmark (VoxellInc/rag-contradiction-benchmark v1.1.0, 30 collision pairs / 60 documents across enterprise_policy, api_specification, financial_filing, and sre_runbook), silent RAG failures cluster into two mechanisms:

  1. Numeric Drift (numeric_drift): Quantitative thresholds change across effective dates (30 vs 14 day refund window, $18M vs $32M Q1 reserve, 365 vs 90 day KMS key rotation, 60s vs 15s Patroni failover RTO). Dense embeddings map numbers in identical lexical contexts to nearly indistinguishable coordinates.
  2. Modal Polarity Inversion (modal_polarity_inversion): Normative flips (TLS 1.2 is supported vs TLS 1.2 is rejected, GraphQL __schema introspection enabled vs disabled, Valkey allkeys-lru vs noeviction). Single-token negations (not, prohibited, noeviction) shift 2560d-3072d vector angles by less than 0.03 cosine.

Even in public open-source docs, our 108-domain documentation study (voxell.ai/audit) caught live multi-version tag collisions where unarchived v1.40.1 and v1.40.2 pages competed head-to-head in agent retrieval.

Architectural Fix: Bitemporal Metadata + Pre-Synthesis Contradiction Holds

Solving temporal drift requires two layers working together:

  1. Bitemporal Envelope (effective_from, effective_until, recorded_at, supersedes_doc_id): Filter effective_until IS NULL for current operational state while retaining historical intervals for point-in-time audit queries ("What policy governed Q3 2025?").
  2. Pre-Synthesis Coherence Conflict Detection: Unstructured wikis, Slack exports, and vendor PDFs rarely arrive with clean supersedes_doc_id foreign keys. Voxell Forge runs Coherence conflict checks (GET /v1/answers/{corpus}/conflicts and keyless forge_xray_audit) over candidate neighborhoods before answer synthesis, surfacing explicit conflict receipts so MCP and A2A callers fail closed instead of guessing.

Test your own policies or docs right now with zero signup:

claude mcp add --transport http forge-try https://api.voxell.ai/mcp/try

Benchmarks & Guides

๐Ÿ“ฐ Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.