The Real Fullstack

The Tenant Leak in Vector Search

The prompt says “only use documents from the user's company”. Why did Acme see Globex's pricing?

مهندس أول9 دقيقةمحاكي التدفّقتحدي الشيفرة
vector-dbragmulti-tenantpython

لم يُترجم هذا التحدي إلى العربية بعد. أنت تقرأ النسخة الإنجليزية.

المهمة:Choose protections that guarantee a user's retrieval only ever returns chunks they are allowed to read, without hurting legitimate answers.السياق · أهداف التعلّم ▾

Wrenly's knowledge assistant stores every customer's documents in one vector index. Retrieval returns the nearest chunks across all tenants; the prompt then asks the model to ignore foreign documents. A customer received a competitor's pricing deck, and an intern got salary data.

المهمة: Choose protections that guarantee a user's retrieval only ever returns chunks they are allowed to read, without hurting legitimate answers.

أهداف التعلّم

  • Enforce tenant isolation and document ACLs in the retrieval query.
  • Understand why prompt instructions are not access control.
  • Avoid filtering after top-k (silently losing results).
المحاكاةمحاكاة
customer employeeassistant backendshared vector indexLLM
تشغيل المحاكاة
hits = index.query(vector=embed(question), top_k=8)          # every tenant's chunksprompt = "Only use documents from the user's company.\n" + render(hits) + question

تبسيط

Five retrieval cases with fixed properties. Some systems use one index per tenant instead of metadata filters. نموذج تعليمي — الأرقام توضّح سلوكًا وليست قياسات أداء.

المفاهيم

تحديات ذات صلة

المراجع