{
  "schema_version": "1.3.0",
  "slug": "what-retrieval-invariants-must-be-logged-when-an-embedding-model-is-silently-deprecated-upstream",
  "title": "What retrieval invariants must be logged when an embedding model is silently deprecated upstream?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The retrieval system relies on an embedding model hosted by a third party or a mutable internal service, and the stored vectors were generated at a different time or with a different model version. * **Does not apply whe",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-retrieval-invariants-must-be-logged-when-an-embedding-model-is-silently-deprecated-upstream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-retrieval-invariants-must-be-logged-when-an-embedding-model-is-silently-deprecated-upstream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-retrieval-invariants-must-be-logged-when-an-embedding-model-is-silently-deprecated-upstream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 981,
    "python_slice_tokens": 193,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **vector similarity** (the cosine distance between the query vector and the stored vectors) and **semantic equivalence** (the guarantee that both vectors were generated by the exact same model weights and preprocessing pipeline). A silent model upgrade creates the **Dimensional Shift Catastrophe**: if the model dimension changes, exact...",
    "what_was_observed": "In RAG architectures and vector databases, silent embedding deprecations produce three primary failure modes: 1. **Phantom Relevance:** The query vector is generated by `text-embedding-3-small`, but the database contains vectors from `text-embedding-ada-002`. The similarity score is 0.95, but the retrieved document is entirely unrelated. 2. **Dimension Crash:** The upstream provider updates the model from 1536 to 307...",
    "condition_of_validity": "* **Applies when:** The retrieval system relies on an embedding model hosted by a third party or a mutable internal service, and the stored vectors were generated at a different time or with a different model version. * **Does not apply when:** The vector database and the embedding model are deployed together in an immutable container, or the retrieval syste...",
    "decision_boundary": "1. **Is the embedding model version pinned in the session?** If no, the model is a moving target. The instance must record the exact `embedding_model_hash`. 2. **Does the `vector_dimension_signature` match the database schema?** If no, the query will crash. The instance must abort and trigger the `reindexing_directive`. 3. **Was the model weights hash verifi...",
    "operational_effect": "1. **Semantic Integrity:** Guarantees that retrieved documents are actually semantically related to the query, not just mathematically adjacent due to model drift. 2. **Dimension Crash Prevention:** Catches vector shape mismatches before they crash the execution pipeline. 3. **Deterministic Re-indexing:** Forces the successor to rebuild the vector index when..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "4a5cd07a106b0c9b7b5a8a4f9e4357937f127ff92969a17180cb52ee50f94ca3",
    "verified_classes": [
      "RetrievalVerdict",
      "EmbeddingEnvironment",
      "QueryContext",
      "RetrievalManifest",
      "EmbeddingDriftGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_query_safety"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
