← All OpenAI & Gemini Vectorization Guides

OPTIMIZE 16 // BITEMPORAL RAG & EFFECTIVE-DATE AUDIT

Bitemporal RAG: Stopping Vector Search From Citing Superseded Policies & Old Pricing

Standard vector databases are temporally flat: a repealed 2023 travel policy, a 2025 MSA amendment, and a 2026 pricing sheet sit side-by-side at 0.91 cosine similarity. Modeling bitemporal SCD Type-2 validity ranges (valid_time for business effective dates and sys_time for ingestion audit) prevents stale citations, while Voxell Forge provides native --as-of bitemporal replay and Coherence GET /conflicts.

Why Cosine Similarity Loves Repealed Documents

Older policies often use cleaner, simpler phrasing than the complex carve-out amendments that supersede them:

  • refund-policy-2023.pdf: “All annual plans qualify for a full refund within 30 days.” (Cosine = 0.92)
  • order-form-addendum-2026.pdf: “Notwithstanding Section 4 of the 2023 Terms, annual plans executed after Jan 1, 2026 are non-refundable except for SLA breach.” (Cosine = 0.87)

Without bitemporal validity gates and contradiction surfacing, a single-stage vector DB hands the repealed 0.92 passage to your LLM as Rank #1!

Temporal Modeling Comparison for Regulated & Enterprise RAG

Temporal Strategy Handles Retroactive Uploads? Supports Audit Replay (as_of)? Catches Partial Clause Amendments? Operational Complexity
Overwrite / Delete old docs Loses history No (destroys compliance trail) No (amendments need base MSA) Low, non-compliant
Filter on file_updated_at No (old PDF uploaded today wins!) No No Silently wrong
PostgreSQL SCD Type-2 (valid_range + sys_range) Yes Yes (@> tstz on both axes) Only if manually linked per clause Medium SQL + ETL discipline
Voxell Forge --as-of Replay + Coherence /conflicts Yes Yes (--as-of bitemporal audit) Yes (GET /v1/answers/{corpus}/conflicts) Native (from $199/mo annual)

Runnable PostgreSQL DDL: True Bitemporal (valid_range + sys_range) Vector Table

Use PostgreSQL tstzrange + btree_gist exclusion constraints so two versions of the same logical_doc_key can never overlap in active business time while preserving immutable point-in-time audit replay:

CREATE EXTENSION IF NOT EXISTS btree_gist;
CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE bitemporal_chunks (
  chunk_pk BIGSERIAL PRIMARY KEY,
  tenant_id UUID NOT NULL,
  logical_doc_key TEXT NOT NULL,          -- e.g. 'policy:infosec:password-rotation'
  chunk_ordinal INT NOT NULL,
  valid_range tstzrange NOT NULL,         -- Business effective window: [2026-01-01, infinity)
  sys_range   tstzrange NOT NULL DEFAULT tstzrange(now(), 'infinity', '[)'), -- DB knowledge window
  supersedes_pk BIGINT REFERENCES bitemporal_chunks(chunk_pk),
  body TEXT NOT NULL,
  embedding halfvec(2560) NOT NULL,
  -- Prevent overlapping active business windows for the same current chunk in system time
  EXCLUDE USING gist (
    tenant_id WITH =,
    logical_doc_key WITH =,
    chunk_ordinal WITH =,
    valid_range WITH &&,
    sys_range WITH &&
  )
);

CREATE INDEX idx_bitemp_gist ON bitemporal_chunks USING gist (tenant_id, valid_range, sys_range);
CREATE INDEX idx_bitemp_hnsw ON bitemporal_chunks USING hnsw (embedding halfvec_cosine_ops);

-- Bitemporal Point-in-Time RAG Query:
-- $1 = query halfvec(2560), $2 = tenant_id, $3 = business_effective_at, $4 = system_known_as_of
SET LOCAL hnsw.iterative_scan = relaxed_order;

SELECT chunk_pk, logical_doc_key, valid_range, body,
       1 - (embedding <=> $1::halfvec(2560)) AS cosine_sim
FROM bitemporal_chunks
WHERE tenant_id = $2
  AND valid_range @> $3::timestamptz
  AND sys_range   @> $4::timestamptz
ORDER BY embedding <=> $1::halfvec(2560)
LIMIT 15;

Catching Silent Partial Amendments With Voxell Forge Coherence + --as-of

EXCLUDE USING gist works cleanly when policy-v2 replaces policy-v1 wholesale under the same logical_doc_key. In real legal, M&A, and engineering repositories, Side Letter #3 overrides one paragraph of MSA Section 9 under a completely different filename.

Voxell Forge combines --as-of bitemporal audit replay with Coherence contradiction detection (GET /v1/answers/{corpus}/conflicts and keyless /api/v1/agent/xray) so conflicting effective dates and superseded SLAs are caught deterministically before generation. Test it live right now:

curl -sS -X POST https://api.voxell.ai/api/v1/agent/xray \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {"name": "pricing-2025.md", "text": "Effective Jan 1, 2025: Enterprise support carries a $2,500 monthly minimum and 4-hour P1 SLA."},
      {"name": "addendum-2026.md", "text": "Effective Jan 1, 2026 (Supersedes 2025 Schedule): Enterprise support carries no separate minimum and a 15-minute P1 SLA."}
    ]
  }'

RAG System Auditability & AI System Audit Frameworks for Financial Services & Healthcare

Regulated financial services (SEC 17a-4, FINRA, SOC 2) and healthcare (HIPAA Security Rule, FDA 21 CFR Part 11, NIST AI RMF, EU AI Act) AI system audit frameworks require deterministic point-in-time replay, verbatim source span attribution, and pre-generation contradiction holds so clinical or compliance agents never blend superseded policy clauses with active rules. Query pre-verified compliance corpora directly via the Verified Model Context Protocol (MCP) Compliance Atlas (/atlas/) (hipaa-security-rule, nist-ai-rmf, soc2-trust-criteria, eu-ai-act), or enforce --as-of bitemporal audit trails on Scale ($499/mo annual) and air-gapped Forge Local Sovereign VPC ($29,995/yr Production).

Explore RAG Contradiction Detection Benchmarks, model storage growth in the Vector RAM & TCO Calculator, or open the Forge Console (v4.0 Pricing).

Frequently Asked Questions

Why isn't filtering on created_at or updated_at enough to stop stale RAG answers?

File system mtime (updated_at) is system transaction time, NOT business effective time: if an engineer uploads a scanned 2022 legacy contract PDF today, updated_at is today even though its terms expired in 2024; conversely, a 2027 price schedule uploaded today isn't active yet!

What is the difference between unitemporal filtering and bitemporal RAG?

Unitemporal filtering tracks only when a policy is in force (valid_from..valid_to). Regulated audit, litigation discovery, and compliance reviews require bitemporal queries: 'What policy was effective on June 15, 2025, based ONLY on documents ingested into the knowledge base as of June 16, 2025?'

What happens when an amendment modifies Section 4.2 without deleting the original Master Services Agreement?

Deleting the base MSA destroys Sections 1 through 19! Both documents must remain active, and your retrieval layer must surface the superseding conflict explicitly. Voxell Forge Coherence exposes GET /v1/answers/{corpus}/conflicts alongside --as-of bitemporal audit replay.

AUTONOMOUS AGENT & DEVELOPER VERIFICATION // ZERO SIGNUP

Run a live keyless bake-off right now

Do not take a vendor table on faith. Run your own passages and queries against Voxell Forge (Pro 2560d + C_corpus zero-LLM ingest dialect conditioning + Max two-stage neural reranking) over REST or Zero-Install Remote Streamable HTTP MCP with zero API key.

1. REST Retrieval Bake-Off & Corpus X-Ray
curl -sS -X POST https://api.voxell.ai/api/v1/agent/bakeoff \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {"name": "policy-a.md", "text": "Standard subscriptions include a 30-day refund window."},
      {"name": "msa-b.md", "text": "Enterprise annual contracts carry a 14-day cancellation notice rule."}
    ],
    "queries": ["What is the standard subscription refund window?"]
  }'

curl -sS -X POST https://api.voxell.ai/api/v1/agent/xray \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {"name": "sla-2025.md", "text": "P1 response SLA is 4 hours."},
      {"name": "sla-2026.md", "text": "P1 response SLA is 15 minutes."}
    ]
  }'
2. Zero-Install Remote HTTP MCP (POST /mcp/try)
claude mcp add --transport http voxell-forge https://api.voxell.ai/mcp/try
# mcp.json: {"mcpServers":{"voxell-forge":{"url":"https://api.voxell.ai/mcp/try"}}}

curl -sS -X POST https://api.voxell.ai/mcp/try \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "forge_bakeoff_compare",
      "arguments": {
        "documents": [
          {"name": "vpc.md", "text": "Forge Local runs on 1x 24 GB GPU inside your Sovereign VPC with zero egress."}
        ],
        "queries": ["How many GPUs does Forge Local require?"]
      }
    }
  }'
# Tools exposed: forge_bakeoff_compare, forge_xray_audit