CICD-434 · Embedding compatibility testing
Encyclopedia · AI and LLM application pipelines · All snippets
Previous · CICD-433 · Next · CICD-435
1. Where it fits
- Placement CI compatibility gate.
- Prerequisites approved synthetic evaluation data, authorized model artifacts and pinned runtime tools.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
jq -en --slurpfile candidate model/embedding-contract.json --slurpfile live index/embedding-contract.json '$candidate[0] | {model,revision,dimensions,metric,normalized} == ($live[0] | {model,revision,dimensions,metric,normalized})'3. How it works
The two manifests are projected to embedding identity and shape fields. A mismatch means the index and new encoder cannot be assumed compatible.
The deployed index contract and new encoder contract must agree.
flowchart TD
N1["Candidate encoder metadata"]
N2{"Contracts agree"}
N1 --> N2
N3["Existing index metadata"]
N3 --> N2
N4["Reuse index"]
N2 -->|Yes| N4
N5["Review versioned reindex"]
N2 -->|No| N5
classDef trigger fill:#EFF6FF,stroke:#0540F2,color:#0A0A0A
classDef build fill:#CCFBF1,stroke:#0D9488,color:#0A0A0A
classDef test fill:#EEF2FF,stroke:#4F46E5,color:#0A0A0A
classDef gate fill:#FEF3C7,stroke:#D97706,color:#0A0A0A
classDef security fill:#EDE9FE,stroke:#7C3AED,color:#0A0A0A
classDef deploy fill:#D1FAE5,stroke:#059669,color:#0A0A0A
classDef fail fill:#FEE2E2,stroke:#DC2626,color:#0A0A0A
class N1,N3 build
class N2 gate
class N4 deploy
class N5 fail
4. Verify the result
Require a reindex or explicit versioned transition when embedding metadata changes.
Validation syntax-validated (Bash parse). Status definitions.