New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Chroma vector database collections via REST API, validating HNSW distance space metrics before cosine/L2 mismatches corrupt RAG retrieval precision.
This blueprint monitors vector similarity search integrity across Chroma vector database clusters. Scheduled daily at 07:00 UTC, it audits collection metadata across all registered vector stores via the Chroma REST API, verifying that HNSW distance space metrics (cosine, l2, ip) align with production embedding models, and alerting AI platform engineers on Slack before distance formula mismatches corrupt semantic search accuracy.
daily_collection_audit schedule trigger (io.kestra.plugin.core.trigger.Schedule) initiates the audit daily at 07:00 UTC.audit_chroma_collections task (io.kestra.plugin.scripts.python.Script) queries /api/v1/collections, inspecting metadata for hnsw:space configuration across active vector stores.check_metric_mismatches flowable task (io.kestra.plugin.core.flow.If) evaluates whether any collection uses a distance metric differing from expected_distance_metric.notify_slack_metric_mismatch (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) delivers an incident briefing card to the AI engineering channel.log_collections_nominal records confirmed status.export_collection_manifest task tags the execution with searchable status labels.flowchart TD
A[Schedule: Daily at 07:00 UTC] --> B[audit_chroma_collections: Query Chroma Collections API]
B --> C{Distance Space Mismatch Detected?}
C -- Yes --> D[notify_slack_metric_mismatch: Slack Webhook]
C -- No --> E[log_collections_nominal: Log Nominal State]
D --> F[export_collection_manifest: Execution Labels]
E --> F
| Name | Type | Default | Description |
|---|---|---|---|
chroma_endpoint |
STRING | http://chroma.internal:8000 |
Base REST API URL of the target Chroma vector database server. |
expected_distance_metric |
STRING | cosine |
Required HNSW distance space metric for vector collections (cosine, l2, or ip). |
slack_channel |
STRING | #ai-vector-store-alerts |
Slack channel destination for vector database configuration and distance metric alerts. |
{{ outputs.audit_chroma_collections.vars.total_collections_scanned }}: Total count of vector collections inspected.{{ outputs.audit_chroma_collections.vars.mismatched_count }}: Count of collections failing distance metric validation.{{ outputs.audit_chroma_collections.vars.has_distance_metric_mismatch }}: Boolean flag indicating if any misconfigured collections exist.{{ outputs.audit_chroma_collections.outputFiles['chroma_audit_report.json'] }}: Structured JSON report detailing collection names and configured metrics.CHROMA_AUTH_TOKEN: Bearer token for Chroma API authentication.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL.CHROMA_AUTH_TOKEN and SLACK_WEBHOOK_URL in your Kestra namespace secrets.chroma_endpoint.hnsw:space is omitted when creating a collection in Chroma, it defaults to l2; explicitly define metadata during initialization to prevent silent divergence.