image taken from Google Cloud ebook on Retail Search Abandonment

Vertex AI Search for Retail — Episode 1

Bassem Zakhary
3 min readSep 27, 2024

--

Have you ever wished that every Search bar on a website works like Google search ?

Many times as you navigate your favourite retailer & search for a product you wish the Search experience to:

  • understand your intent
  • allow for text and/or picture search (multi-modal)
  • personalize the right product that aligns with your shopping history

Unfortunately many of the current search experiences are based on business rules. And when it provide recommendations, it look at similar purchases across a large population & then reference items that are commonly purchased together but disregard the customer’s click/purchase history. That's why Google introduced Vertex AI Search for Retail (formerly known as Discovery AI) to provide Google-quality search, browsing & recommendations.

So how does it work ?

Whether you use recommendations or search, you start by ingesting user event & catalog data then you can serve predictions or search results on your site.

Catalog Data

You can import your catalog data from Merchant Center, Cloud Storage, BigQuery, or specify the data inline in the request. In general the catalog is made up of collection of product objects. Each product includes:

  • required info (name, id, title, categories)
  • attributes (system and/or custom)
  • levels (hierarchy in your catalog: primary & variant)
  • inventory (price, availability, fulfillment)

To ensure the best quality of search & recommendation results, consider the following:

  • Specify which products are primary vs. variants, as the primary items are the one returned in the search/recommendation results, not the variant.
  • Include as much optional info as possible, while avoiding the use of placeholder values & multiple currencies
  • Keep a schedule of regular catalog imports (ideally daily) to ensure that your catalog is current.
  • Leverage Data quality page that continuously evaluate the quality metrics. Sometimes you might need to update the catalog data to improve the search quality and unlock performance tiers.

User Event

Whether its add a product to cart or view a promotion page, there are two ways you can ingest user events: real-time & historical.

You consider the ingestion of historical events to accelerate initial model training as it might take more time to ingest enough real-time user events. Such historical events can be imported from Cloud Storage, BQ, GA360, GA4 or events inline. While for real-time user events, you can use GA4, Tag Manager, JavaScript pixel and/or sending the events directly to the API.

User event types:

  • Add product(s) to cart
  • View cart
  • View homepage, product detail page, or category (special pages, such as sale or promotion pages)
  • Search the catalog

To ensure the best quality of search & recommendation results, consider the following:

  • Do not include synthetic data or duplicate events.
  • Include at least 100 unique visitor IDs for each type of event ingested.
  • Ensure that products included in the events should exist in your catalog of products.
  • Format Visitor IDs to be exactly the same across event import or event recording and in API requests.

Please note that there a common requirements for user events that apply to both search and recommendation. But there is also recommendation & search-specific requirements.

Quick Recap

The real beauty of this solution that the ingestion of both catalog data & user events can be used for both recommendation & search. Hence there is no need to import the same data twice if you use both services.

In the next article I will focus on the next step of serving recommendations & search results.

--

--