|
| 1 | +# ADR: Vision Embedding Rollout (Flag-Gated) |
| 2 | + |
| 3 | +- Status: Accepted |
| 4 | +- Date: 2026-02-16 |
| 5 | + |
| 6 | +## Context |
| 7 | + |
| 8 | +STACKIT published a vision-capable embedder. We want to integrate image-native retrieval into the existing RAG pipeline without destabilizing production traffic. |
| 9 | + |
| 10 | +The current platform already supports `IMAGE` as a content type, but image ingestion/retrieval behavior is not yet consistently routed through a dedicated vision lane end-to-end. |
| 11 | + |
| 12 | +## Decision |
| 13 | + |
| 14 | +Roll out vision support behind explicit feature flags that default to `false`: |
| 15 | + |
| 16 | +- `VISION_IMAGE_LANE_ENABLED=false` |
| 17 | +- `VISION_EMBEDDING_ENABLED=false` |
| 18 | +- `VISION_IMAGE_RETRIEVER_ENABLED=false` |
| 19 | + |
| 20 | +Flags are exposed via Helm values and config maps for backend, admin-backend, and extractor. |
| 21 | + |
| 22 | +## Consequences |
| 23 | + |
| 24 | +### Positive |
| 25 | + |
| 26 | +- No behavior change on merge while flags stay off. |
| 27 | +- Safe staged rollout with reversible steps. |
| 28 | +- Easier incident response by disabling a specific lane. |
| 29 | + |
| 30 | +### Negative |
| 31 | + |
| 32 | +- Temporary configuration overhead while both legacy and vision paths exist. |
| 33 | +- Additional test matrix during rollout. |
| 34 | + |
| 35 | +## Rollout Notes |
| 36 | + |
| 37 | +- Keep all three flags `false` until the final rollout PR is merged and staging is validated. |
| 38 | +- Enable in sequence on staging: |
| 39 | + 1. `VISION_IMAGE_LANE_ENABLED` |
| 40 | + 2. `VISION_EMBEDDING_ENABLED` |
| 41 | + 3. `VISION_IMAGE_RETRIEVER_ENABLED` |
| 42 | +- Promote to production only after mixed-modality retrieval checks pass. |
| 43 | + |
| 44 | +## Telemetry Baseline (No Behavior Change in This ADR) |
| 45 | + |
| 46 | +Track these counters from the first behavior PR onward: |
| 47 | + |
| 48 | +- `vision.image_documents_ingested_total` |
| 49 | +- `vision.image_embeddings_written_total` |
| 50 | +- `vision.image_retrieval_hits_total` |
| 51 | +- `vision.image_retrieval_errors_total` |
| 52 | + |
| 53 | +This ADR only defines the rollout contract; metric instrumentation is introduced in later PRs. |
0 commit comments