Design an Agentic Search Experience

Read the full interview experience this question came from →

Quick Overview

Design an agentic search experience with clarifying dialogue, structured constraints, grounded retrieval, bounded tool use, and evaluation against conventional search.

Design an Agentic Search Experience

Company: Walmart Labs

Role: Machine Learning Engineer

Category: ML System Design

Difficulty: easy

Interview Round: Onsite

Design an agentic search experience: a user states a goal in natural language, and the system can interpret the request, ask a clarifying question, search, and refine its answer through multiple steps. Focus on the user experience and the major system choices. Explain where an agent adds value, where deterministic search is sufficient, and how the system should behave when it cannot produce a trustworthy answer. ### Constraints & Assumptions - The prompt specifies agentic search but does not prescribe a corpus, traffic level, latency target, model, or vendor API. - Practice clarification: use a read-only catalog as the example corpus. Users may describe requirements conversationally; search results must be grounded in accessible catalog records. - The design does not need to carry out purchases or other external actions. If you propose actions, treat them as a separate extension requiring its own contract. ### Clarifying Questions to Ask - What can users search, and which attributes are structured versus available only in text? - Which user goals require a clarifying turn rather than a ranked result list? - How fresh must results be, and which fields require authoritative checks before display? - How should success balance finding suitable results, factual grounding, response time, and cost? ### Part 1 — Design the Search Interaction Walk through a request from initial intent through clarification, retrieval, comparison, and refinement. Explain how the system distinguishes a hard constraint from a preference and communicates uncertainty or lack of suitable results. #### What This Part Should Cover - A conversational flow that asks only questions that can change the search decision. - Preservation of user constraints across turns and correction when the user changes them. - Results linked to evidence, including a useful fallback for no matches or ambiguous intent. ### Part 2 — Design the Agent and Retrieval System Describe the main components, the tools available to the agent, and the data flow. Explain how you prevent unsupported claims, unbounded tool use, stale results, and retrieved text from changing the agent's operating instructions. #### What This Part Should Cover - A bounded orchestration loop with typed, permission-scoped search and lookup tools. - Retrieval and ranking that enforce hard constraints independently of generated prose. - Grounded answer construction, current-value checks where needed, and a conventional search fallback. - Evaluation of both search quality and the additional failure modes introduced by agent planning. ```hint Separate interpretation from enforcement The agent can propose a search plan, but a separate component can verify that returned records satisfy the user's stated hard constraints. ``` ### What a Strong Answer Covers The architecture should make the proposed interaction possible while keeping the search grounded, bounded, and inspectable. Explain the benefit of each agentic step instead of assuming that every query needs a multistep agent. ### Follow-up Questions - How would the system handle a relevant record whose description contains instructions addressed to the assistant? - What happens when the user relaxes one constraint midway through the conversation? - How would you demonstrate that the agentic experience improves on the same retrieval system with a conventional search interface?

Overview: Design an agentic search experience with clarifying dialogue, structured constraints, grounded retrieval, bounded tool use, and evaluation against conventional search.

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

|Home/ML System Design/Walmart Labs
Walmart Labs logo
Walmart Labs
Oct 4, 2026
easyMachine Learning EngineerOnsiteML System Design
0
0

Design an agentic search experience: a user states a goal in natural language, and the system can interpret the request, ask a clarifying question, search, and refine its answer through multiple steps.

Focus on the user experience and the major system choices. Explain where an agent adds value, where deterministic search is sufficient, and how the system should behave when it cannot produce a trustworthy answer.

Constraints & Assumptions

  • The prompt specifies agentic search but does not prescribe a corpus, traffic level, latency target, model, or vendor API.
  • Practice clarification: use a read-only catalog as the example corpus. Users may describe requirements conversationally; search results must be grounded in accessible catalog records.
  • The design does not need to carry out purchases or other external actions. If you propose actions, treat them as a separate extension requiring its own contract.

Clarifying Questions to Ask Guidance

  • What can users search, and which attributes are structured versus available only in text?
  • Which user goals require a clarifying turn rather than a ranked result list?
  • How fresh must results be, and which fields require authoritative checks before display?
  • How should success balance finding suitable results, factual grounding, response time, and cost?

Part 1 — Design the Search Interaction

Walk through a request from initial intent through clarification, retrieval, comparison, and refinement. Explain how the system distinguishes a hard constraint from a preference and communicates uncertainty or lack of suitable results.

What This Part Should Cover Guidance

  • A conversational flow that asks only questions that can change the search decision.
  • Preservation of user constraints across turns and correction when the user changes them.
  • Results linked to evidence, including a useful fallback for no matches or ambiguous intent.

Part 2 — Design the Agent and Retrieval System

Describe the main components, the tools available to the agent, and the data flow. Explain how you prevent unsupported claims, unbounded tool use, stale results, and retrieved text from changing the agent's operating instructions.

What This Part Should Cover Guidance

  • A bounded orchestration loop with typed, permission-scoped search and lookup tools.
  • Retrieval and ranking that enforce hard constraints independently of generated prose.
  • Grounded answer construction, current-value checks where needed, and a conventional search fallback.
  • Evaluation of both search quality and the additional failure modes introduced by agent planning.

What a Strong Answer Covers Guidance

The architecture should make the proposed interaction possible while keeping the search grounded, bounded, and inspectable. Explain the benefit of each agentic step instead of assuming that every query needs a multistep agent.

Follow-up Questions Guidance

  • How would the system handle a relevant record whose description contains instructions addressed to the assistant?
  • What happens when the user relaxes one constraint midway through the conversation?
  • How would you demonstrate that the agentic experience improves on the same retrieval system with a conventional search interface?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...