F7 · Floor 7 · Knowledge Hub

Vector & Embedding Weaknesses: The Open Library

An intern asked the company bot about bonuses. It told him everyone's. In this lesson you investigate the incident, reproduce the attack yourself, then fix it.

Vector & Embedding Weaknesses in brief

Vector and embedding weaknesses cover the risks in retrieval-augmented generation: a shared index that ignores permissions, poisoned documents that steer answers, data leaking between tenants, and embeddings that can be turned back into text.

What you'll learn

  • Enforce the source documents' permissions at retrieval time, before anything reaches the model.
  • Keep customers, teams or tenants in separate indexes, or strictly enforced partitions.
  • Control what gets indexed: owners, provenance, review and scanning for hidden instructions.
  • Treat embeddings as being as sensitive as the text they came from.
  • Asking the model to "keep secrets" doesn't work once a secret is in its context.

Why it matters

Companies rolling out enterprise AI assistants have found them surfacing salary files, HR cases and board papers to staff who could never open the originals, usually because files were overshared at the source or the index ignored permissions. Researchers have also shown that text can be reconstructed from embeddings with surprising accuracy.

Building a RAG system that respects permissions

Carry access metadata (owner, groups, tenant, sensitivity label) with every chunk, and filter on it inside the vector query, using the identity of the person asking rather than the bot's service account. Re-sync permissions when source permissions change, and delete chunks when their source is deleted.

Separate indexes for customers and tenants. Use an ingestion pipeline with review: who uploaded this, is it allowed in the index, does it contain hidden or instruction-like text? Keep an audit log of which chunks were retrieved for which user.

Embeddings are derived personal data in many legal regimes. Encrypt them, restrict access, and don't ship them to third parties without the same review you'd give the documents.

Key terms

Further reading