Design Enterprise Search That Combines Ranked Results With AI-Generated Answers

Quick Overview

Design a large-scale enterprise search system that returns ranked results from internal content and also generates AI answers to employee queries. Tests multi-stage retrieval and ranking, search infrastructure under latency and permission constraints, and grounding AI answers in retrieved evidence.

Design Enterprise Search That Combines Ranked Results With AI-Generated Answers

Company: Atlassian

Role: Machine Learning Engineer

Category: ML System Design

Difficulty: medium

Interview Round: Technical Screen

Design a large-scale enterprise information retrieval system with AI capabilities. Employees search across their organization's internal content and receive two things for a query: a ranked list of traditional search results and, where appropriate, an AI-generated answer. The report gives the prompt and this direction but no scale or product details, so settle those with the interviewer. A strong answer treats the classic retrieval and ranking stack and the search infrastructure in as much depth as the AI answer layer; the three parts below follow those areas. ### Clarifying Questions - How many organizations, employees and documents does the system serve, and what is the peak query rate? - Which content sources are in scope, such as documents and wiki pages, tickets, chat, code, or files from third-party tools, and how quickly must new or edited content become searchable? - How are permissions defined in the source systems, and how quickly must a permission change take effect in search? - Does the system serve many customer organizations, and may models trained on one organization's data be used for another? - What latency is acceptable for the result list and for the answer, and may the answer stream in after the results? ### Part 1 — Retrieval and ranking Design how a query becomes a ranked result list: candidate generation, first-stage ranking and second-stage reranking. Say which models and signals you use at each stage, where the training labels come from, and how you evaluate relevance. ```hint Shape the funnel Picture the path from millions of documents down to the ten that are shown, and ask which signals are affordable at each width. ``` #### What This Part Should Cover - Candidate generation that combines lexical and semantic retrieval, and how candidates from several sources are merged - What each ranking stage optimizes, with its model, features and cost - Labels and evaluation when most of the content is private ### Part 2 — Search infrastructure Design the indexing and serving infrastructure, and explain how you balance latency, throughput, relevance and scalability. ```hint Follow one query and one edit Trace where the time goes in a single query, and how long it takes before an edited or newly restricted document is reflected in results. ``` #### What This Part Should Cover - The indexing pipeline, freshness, and how lexical and vector indexes are partitioned and replicated - How permissions are enforced at query time - A latency budget per stage, the main capacity and cost drivers, and graceful degradation ### Part 3 — Integrating AI-generated answers Show how AI-generated answers are combined with the traditional results, rather than built as a separate LLM pipeline. ```hint Share the evidence Decide when an answer should appear at all, and how the answer and the result list can draw on the same retrieved evidence. ``` #### What This Part Should Cover - When to generate an answer, and how it is grounded in the ranked, permission-checked results with citations - Controlling hallucination, leakage through the model, latency and cost - Measuring answer quality and its effect on search success ### What a Strong Answer Covers - Requirements, scale, permission model and latency targets agreed before the design - A layered retrieval and ranking funnel with concrete models and features at each stage - Permission checks that apply to the index, to ranking and to everything placed in the model's context - Explicit trade-offs among latency, throughput, relevance, cost and scalability - AI answers grounded in the same search stack, with a policy for when not to answer - An evaluation and monitoring plan for both result relevance and answer quality ### Follow-up Questions - A document's permissions are tightened. How quickly does search reflect it, and what stops a stale index from leaking the document into an answer? - How do you obtain relevance labels when you cannot read customers' content? - Generating an answer costs far more per query than ranking results. How do you decide which queries get one? - How would you use team and collaboration signals to personalize ranking without overfitting to a few heavy users?

Overview: Design a large-scale enterprise search system that returns ranked results from internal content and also generates AI answers to employee queries. Tests multi-stage retrieval and ranking, search infrastructure under latency and permission constraints, and grounding AI answers in retrieved evidence.

Read the full Atlassian Machine Learning Engineer interview experience this question came from

Atlassian logo
Atlassian
Nov 1, 2026
mediumMachine Learning EngineerTechnical ScreenML System Design
1
0

Design a large-scale enterprise information retrieval system with AI capabilities. Employees search across their organization's internal content and receive two things for a query: a ranked list of traditional search results and, where appropriate, an AI-generated answer. The report gives the prompt and this direction but no scale or product details, so settle those with the interviewer. A strong answer treats the classic retrieval and ranking stack and the search infrastructure in as much depth as the AI answer layer; the three parts below follow those areas.

Clarifying Questions Guidance

  • How many organizations, employees and documents does the system serve, and what is the peak query rate?
  • Which content sources are in scope, such as documents and wiki pages, tickets, chat, code, or files from third-party tools, and how quickly must new or edited content become searchable?
  • How are permissions defined in the source systems, and how quickly must a permission change take effect in search?
  • Does the system serve many customer organizations, and may models trained on one organization's data be used for another?
  • What latency is acceptable for the result list and for the answer, and may the answer stream in after the results?

Part 1 — Retrieval and ranking

Design how a query becomes a ranked result list: candidate generation, first-stage ranking and second-stage reranking. Say which models and signals you use at each stage, where the training labels come from, and how you evaluate relevance.

What This Part Should Cover Guidance

  • Candidate generation that combines lexical and semantic retrieval, and how candidates from several sources are merged
  • What each ranking stage optimizes, with its model, features and cost
  • Labels and evaluation when most of the content is private

Part 2 — Search infrastructure

Design the indexing and serving infrastructure, and explain how you balance latency, throughput, relevance and scalability.

What This Part Should Cover Guidance

  • The indexing pipeline, freshness, and how lexical and vector indexes are partitioned and replicated
  • How permissions are enforced at query time
  • A latency budget per stage, the main capacity and cost drivers, and graceful degradation

Part 3 — Integrating AI-generated answers

Show how AI-generated answers are combined with the traditional results, rather than built as a separate LLM pipeline.

What This Part Should Cover Guidance

  • When to generate an answer, and how it is grounded in the ranked, permission-checked results with citations
  • Controlling hallucination, leakage through the model, latency and cost
  • Measuring answer quality and its effect on search success

What a Strong Answer Covers Guidance

  • Requirements, scale, permission model and latency targets agreed before the design
  • A layered retrieval and ranking funnel with concrete models and features at each stage
  • Permission checks that apply to the index, to ranking and to everything placed in the model's context
  • Explicit trade-offs among latency, throughput, relevance, cost and scalability
  • AI answers grounded in the same search stack, with a policy for when not to answer
  • An evaluation and monitoring plan for both result relevance and answer quality

Follow-up Questions Guidance

  • A document's permissions are tightened. How quickly does search reflect it, and what stops a stale index from leaking the document into an answer?
  • How do you obtain relevance labels when you cannot read customers' content?
  • Generating an answer costs far more per query than ranking results. How do you decide which queries get one?
  • How would you use team and collaboration signals to personalize ranking without overfitting to a few heavy users?