Page MenuHomePhabricator

[L] Display Lexical Results Above Semantic Results in Hybrid Search
Open, Needs TriagePublic3 Estimated Story Points

Description

User Story

As a reader using Hybrid Search, I want to see familiar lexical results first and clearly labeled semantic results below, so that I can trust the results while also exploring content surfaced by meaning-based retrieval.

Description

When a user in the Hybrid Search experiment executes a search (via Enter or tapping an article title), present a two-tier results layout that separates lexical and semantic results while keeping both visible in a single results view.

The layout should:

  • Preserve familiarity and trust by showing top lexical results first
  • Introduce semantic results as a distinct, labeled section below
  • Visually differentiate retrieval methods without overwhelming the user

Requirements

Lexical Results (Top Section)

  • The top of the results page displays up to 3 lexical search results
  • Results are presented in a vertical list
  • Each lexical result includes:
    • Article title
    • Thumbnail image (when one exists)
  • Tapping a lexical result navigates to the article page (existing behavior)
  • Lexical results are based on the same ranking logic as existing search

Semantic Results (Secondary Section)

  • A clearly labeled section appears below the lexical results
  • Semantic section contains exactly 3 results (when available)
  • Each semantic result represents a section-level excerpt returned from semantic retrieval embeddings
  • Semantic results are presented in a horizontal, scrollable list
  • Semantic section contains indicator that it is an experiment and an info icon that leads people to mediawiki to learn more about the experiment
  • Each semantic card MUST includes:
    • Article title
    • Excerpt text
    • Provenance indicator (article and section, when available)
    • Satisfaction affordances
  • Tapping a semantic result navigates to the relevant article section (ideally highlighted)

General Behavior

  • Lexical and semantic results are visually distinct
  • Semantic results do not replace or interleave with lexical results
  • Layout applies only to users in the Hybrid Search experiment
  • Control group retains existing search results layout

Design:

Figma mockup

Gif with interaction:

deep-search-screen-ezgif.com-optimize (1).gif (1×500 px, 3 MB)

Note: I am not sure if this is the right highlight colour - it was in the Figma design system. The suggestion here is to use the standard highlight colour we currently use on Android so we don't have to build anything custom.


Copy and Translation: TBD

Event Timeline

Semantic section contains an indicator that it is an experiment and an info icon that leads people to Mediawiki to learn more about the experiment

@JTannerWMF could you please let me know the responsible for writing the copy? We will probably need a ticket for that if we don't have one already.

I have it as a placeholder in the flow and currently 2 places link to this page:
• if user taps on "learn more" on onboarding
• if user taps on "i" icon

Dbrant renamed this task from Display Lexical Results Above Semantic Results in Hybrid Search to [XL] Display Lexical Results Above Semantic Results in Hybrid Search.Jan 6 2026, 4:45 PM
Dbrant renamed this task from [XL] Display Lexical Results Above Semantic Results in Hybrid Search to [L] Display Lexical Results Above Semantic Results in Hybrid Search.Mon, Jan 12, 6:23 PM
Dbrant set the point value for this task to 8.
JTannerWMF changed the point value for this task from 8 to 3.Tue, Jan 27, 5:26 PM
JTannerWMF triaged this task as Medium priority.Tue, Jan 27, 5:42 PM
JTannerWMF raised the priority of this task from Medium to Needs Triage.

Hi @TLessa-WMF

This is ready for review, please go to the feature branch
https://github.com/wikimedia/apps-android-wikipedia/pull/6221

Steps to download the APK
Click on "Checks" -> find "Android branch build" -> scroll down and find "Artifacts" -> Download the "app_alpha_release" file

How to test

  1. Make sure you are in the test group 1
  2. You can go to Developer Settings -> make sure "Hybrid Search test group" is 1
  3. hybridSearchOnboardingShown and hybridSearchEnabled are on.
  4. Make sure you have the eligible app languages selected: en, fr, pt

Design QA here: https://docs.google.com/spreadsheets/d/1mMa4eSmKapodADyXH_FzIq4uhru0scbDdqAhoJbSEDg/edit?usp=sharing

  • Remove "x results from x articles" and add a divider like Variant C

{F71694228}

  • + other changes detailed in the spreadsheet - since they are in progress, I am not detailing them here