Skip to content

Commit 665c15d

Browse files
committed
feat(vision): add rollout ADR and default-off flags
1 parent dd0889e commit 665c15d

File tree

10 files changed

+110
-0
lines changed

10 files changed

+110
-0
lines changed

ADR-vision-embedding-rollout.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.

infrastructure/rag/templates/_admin_backend_and_extractor_helpers.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,18 @@
140140
{{- printf "%s-source-uploader-configmap" .Release.Name | trunc 63 | trimSuffix "-" -}}
141141
{{- end -}}
142142

143+
{{- define "configmap.adminVisionName" -}}
144+
{{- printf "%s-admin-vision-configmap" .Release.Name | trunc 63 | trimSuffix "-" -}}
145+
{{- end -}}
146+
143147
{{- define "configmap.extractorSitemapName" -}}
144148
{{- printf "%s-extractor-sitemap-configmap" .Release.Name | trunc 63 | trimSuffix "-" -}}
145149
{{- end -}}
146150

151+
{{- define "configmap.extractorVisionName" -}}
152+
{{- printf "%s-extractor-vision-configmap" .Release.Name | trunc 63 | trimSuffix "-" -}}
153+
{{- end -}}
154+
147155
# image
148156
{{- define "adminBackend.fullImageName" -}}
149157
{{- $tag := default .Chart.AppVersion .Values.adminBackend.image.tag -}}

infrastructure/rag/templates/_backend_helpers.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ basic-auth
103103
{{- printf "%s-retriever-configmap" .Release.Name | trunc 63 | trimSuffix "-" -}}
104104
{{- end -}}
105105

106+
{{- define "configmap.backendVisionName" -}}
107+
{{- printf "%s-backend-vision-configmap" .Release.Name | trunc 63 | trimSuffix "-" -}}
108+
{{- end -}}
109+
106110
{{- define "configmap.langfuseName" -}}
107111
{{- printf "%s-langfuse-configmap" .Release.Name | trunc 63 | trimSuffix "-" -}}
108112
{{- end -}}

infrastructure/rag/templates/admin-backend/configmap.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,12 @@ data:
4242
{{- range $key, $value := .Values.adminBackend.envs.sourceUploader }}
4343
{{ $key }}: {{ $value | quote }}
4444
{{- end }}
45+
---
46+
apiVersion: v1
47+
kind: ConfigMap
48+
metadata:
49+
name: {{ template "configmap.adminVisionName" . }}
50+
data:
51+
{{- range $key, $value := .Values.adminBackend.envs.vision }}
52+
{{ $key }}: {{ $value | quote }}
53+
{{- end }}

infrastructure/rag/templates/admin-backend/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ spec:
117117
name: {{ template "configmap.keyValueStoreName" . }}
118118
- configMapRef:
119119
name: {{ template "configmap.sourceUploaderName" . }}
120+
- configMapRef:
121+
name: {{ template "configmap.adminVisionName" . }}
120122
- configMapRef:
121123
name: {{ template "configmap.retryDecoratorName" . }}
122124
- configMapRef:

infrastructure/rag/templates/backend/configmap.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ data:
1818
---
1919
apiVersion: v1
2020
kind: ConfigMap
21+
metadata:
22+
name: {{ template "configmap.backendVisionName" . }}
23+
data:
24+
{{- range $key, $value := .Values.backend.envs.vision }}
25+
{{ $key }}: {{ $value | quote }}
26+
{{- end }}
27+
---
28+
apiVersion: v1
29+
kind: ConfigMap
2130
metadata:
2231
name: {{ template "configmap.langfuseName" . }}
2332
data:

infrastructure/rag/templates/backend/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ spec:
109109
name: {{ template "configmap.embedderClassTypesName" . }}
110110
- configMapRef:
111111
name: {{ template "configmap.retrieverName" . }}
112+
- configMapRef:
113+
name: {{ template "configmap.backendVisionName" . }}
112114
- configMapRef:
113115
name: {{ template "configmap.rerankerName" . }}
114116
- configMapRef:

infrastructure/rag/templates/extractor/configmap.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,12 @@ data:
66
{{- range $key, $value := .Values.extractor.envs.sitemap }}
77
{{ $key }}: {{ $value | quote }}
88
{{- end }}
9+
---
10+
apiVersion: v1
11+
kind: ConfigMap
12+
metadata:
13+
name: {{ template "configmap.extractorVisionName" . }}
14+
data:
15+
{{- range $key, $value := .Values.extractor.envs.vision }}
16+
{{ $key }}: {{ $value | quote }}
17+
{{- end }}

infrastructure/rag/templates/extractor/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ spec:
112112
name: {{ template "configmap.s3Name" . }}
113113
- configMapRef:
114114
name: {{ template "configmap.extractorSitemapName" . }}
115+
- configMapRef:
116+
name: {{ template "configmap.extractorVisionName" . }}
115117
- secretRef:
116118
name: {{ template "secret.s3RefName" . }}
117119
{{- $hfCacheDir := include "extractor.huggingfaceCacheDir" . }}

infrastructure/rag/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,10 @@ backend:
196196
RETRIEVER_TABLE_K_DOCUMENTS: 10
197197
RETRIEVER_IMAGE_THRESHOLD: 0.7
198198
RETRIEVER_IMAGE_K_DOCUMENTS: 10
199+
vision:
200+
VISION_IMAGE_LANE_ENABLED: false
201+
VISION_EMBEDDING_ENABLED: false
202+
VISION_IMAGE_RETRIEVER_ENABLED: false
199203
errorMessages:
200204
ERROR_MESSAGES_NO_DOCUMENTS_MESSAGE: "I'm sorry, my responses are limited. You must ask the right questions."
201205
ERROR_MESSAGES_NO_OR_EMPTY_COLLECTION: "No documents were provided for searching."
@@ -390,6 +394,10 @@ adminBackend:
390394
sourceUploader:
391395
# Large sitemap ingestions (per-page summaries) can take > 1 hour.
392396
SOURCE_UPLOADER_TIMEOUT: 3600
397+
vision:
398+
VISION_IMAGE_LANE_ENABLED: false
399+
VISION_EMBEDDING_ENABLED: false
400+
VISION_IMAGE_RETRIEVER_ENABLED: false
393401

394402
extractor:
395403
replicaCount: 1
@@ -448,6 +456,10 @@ extractor:
448456
# Options: "docusaurus" (default), "astro", "generic"
449457
# Note: https://docs.stackit.cloud is built with Astro/Starlight -> use "astro".
450458
SITEMAP_PARSER: docusaurus
459+
vision:
460+
VISION_IMAGE_LANE_ENABLED: false
461+
VISION_EMBEDDING_ENABLED: false
462+
VISION_IMAGE_RETRIEVER_ENABLED: false
451463

452464
adminFrontend:
453465
name: admin-frontend

0 commit comments

Comments
 (0)