Page MenuHomePhabricator

[L] Adopt Hybrid Search API Supporting Lexical and Semantic Retrieval for Android MVP
Open, MediumPublic8 Estimated Story Points

Description

User Story

As the Hybrid Search experiment team, we need to adopt a Search API that supports both lexical and semantic retrieval in a single contract, so that the Android app can reliably run Hybrid Search experiments and compare retrieval approaches.

Description

Adopt (or extend) a Search API that supports lexical search, and semantic retrieval via embeddings, suitable for use in the Android Hybrid Search MVP.

This task establishes the server-side contract required to power all Hybrid Search experiment variants, including:

  • Lexical-first layouts
  • Semantic-first layouts

This task is a blocking dependency for Hybrid Search downstream UX experimentation.

Requirements

API Availability & Contract

  • A Search API endpoint is available to Android that supports:
    • Lexical retrieval
    • Semantic retrieval via embeddings
  • API response includes, at minimum:
    • Result type (lexical or semantic)
    • Article title
    • Section identifier (when applicable) that supports highlighting text
    • Excerpt/snippet text (for semantic results)
    • Provenance metadata sufficient for UI labeling
  • API supports limiting result counts independently for:
    • Lexical results (e.g., top N)
    • Semantic results (e.g., top N excerpts)

Routing & Fallback Behavior

  • API supports or clearly defines:
    • Failure and timeout behavior for semantic retrieval
  • In the event semantic retrieval fails or times out:
    • Lexical results are still returned
    • No API error blocks search execution

Performance & Reliability

  • Median response latency for hybrid requests is documented

Experiment Support

  • API responses include metadata allowing:
    • Experiment variant attribution
    • Retrieval-path logging (including query)
  • API can be safely gated behind feature flags or experiment cohorts

Design: TBA
Copy and Translation: TBA

Event Timeline

Dbrant renamed this task from Adopt Hybrid Search API Supporting Lexical and Semantic Retrieval for Android MVP to [L] Adopt Hybrid Search API Supporting Lexical and Semantic Retrieval for Android MVP.Jan 6 2026, 4:43 PM
Dbrant set the point value for this task to 8.Jan 6 2026, 5:25 PM
JTannerWMF triaged this task as Medium priority.Tue, Jan 27, 5:41 PM
JTannerWMF raised the priority of this task from Medium to Needs Triage.
JTannerWMF triaged this task as Medium priority.