Design Permission-Aware Enterprise Search

AI ProductsSearch OpenAI

Design enterprise search for an AI assistant at a large company. Employees ask questions; the assistant searches the company's documents across Google Drive, Slack, Confluence and email and answers with citations. Every employee may only get answers from documents they are allowed to open.

Functional:

  • Connect to each source and index its documents and their access lists.
  • Answer a question using only documents the asking employee can access, with citations.
  • Reflect permission changes: when someone loses access to a document, they stop seeing it in answers.
  • Let admins exclude sources or folders.

Non-functional:

  • A permission removal takes effect within 10 minutes.
  • Answers start streaming within 2 seconds.
  • A bug in one connector must not leak another source's private documents.
  • 50,000 employees, 200 million documents, 5 TB of text.
  • 1 million document changes and 200,000 permission changes a day.
  • 30,000 questions a day, peaks of 20 per second.

The assistant's model, the chat UI, and connector authentication flows.

System design
Loading editor...