Embeddings can leak properties of their source and should be governed as derived data, not anonymous noise. Protect connections with verified TLS, encrypt storage and backups, minimize source and vector access, keep credentials in a secret manager, define retention and deletion, and audit sensitive actions. Security controls apply equally to chunks, embeddings, logs, caches, evaluation sets, and exports.
Trace raw sources, normalized text, chunks, vectors, lexical indexes, query text, model requests, outputs, caches, traces, evaluation labels, backups, replicas, and exports. For each, record owner, purpose, sensitivity, region, provider, retention, encryption, access, and deletion method.
Do not assume an embedding cannot reveal personal or proprietary information merely because humans cannot read its coordinates.
Use distinct migration, runtime, ingestion, read-only analytics, backup, and emergency roles. Runtime roles should not create extensions or schemas. Ingestion may write derived records but should not administer roles. Rotate credentials and prefer short-lived identity where the platform supports it.
Record actor identity, tenant, action, object type/ID, policy decision, model/config version, timestamp, outcome, and trace ID. Avoid vectors, full prompts, source text, tokens, and secrets. Audit log access and retention need their own controls.
Test TLS certificate validation, expired credentials, revoked roles, backup encryption, deletion across primary/replicas/caches, log redaction, and audit reconstruction of one request. Run a secret scan on source and artifacts. Review external provider data use against policy.
Produce a data-protection review for this pgvector architecture [paste]. Inventory every copy and derivative, classify it, define lawful purpose/consent as applicable, TLS/storage/backup controls, roles, secrets, retention, deletion, logging, audit, provider boundaries, and verification tests.
Verification contract: Trace one test subject through every store and prove correction/deletion behavior under the approved retention policy.