SlideShare a Scribd company logo
Data Con LA 2022 - Using Google trends data to build product recommendations
Presented by: Mike Limcaco
Contributions: Lexi Flynn & Bryan Rutkowski
2022 August 13
DataCon LA 2022
Trends To Recommendations
Using Google trends data to build product recommendations
https://www.themoviedb.org/
https://developer.apple.com/design/human-interface-guidelines/components/system-experiences/top-shelf/
Featured Content
How can we tap into what’s trending &
continuously promote new, interesting and
relevant content?
1. Aggregate trending search interest
2. Turn these into smart searches against our product catalog(s)
3. Filter, sort and rank to further refine results
Leverage Google-Unique Data & APIs
To Drive Personalized Discovery
Data Signals
Aggregated search trend data across
geographic focus areas
Retail Search
Power your ecommerce site or
application with Google-quality
search capabilities
Vertex AI Matching Engine
Use innovative semantic matching
features to improve search results
Data Signals
Aggregated search trend data across
geographic focus areas
Retail Search
Power your ecommerce site or
application with Google-quality
search capabilities
Vertex AI Matching Engine
Use innovative semantic matching
features to improve search results
Leverage Google-Unique Data & APIs
To Drive Personalized Discovery
What is BigQuery Data Signals?
Google Trends
Data Signals
BigQuery Public
Datasets
Program
Insights for Everyone
Marketing
How do I optimize my paid media spend
when it comes to search term bidding?
Merchandising & Demand Forecasting
How can I understand demand trends to
make better assortment planning decisions?
Executives
How is the business performing across all of
our markets? Against competitors?
Supply Chain
How do I manage supply chain logistics and
distribute inventory better?
https://datasignals.looker.com/embed/dashboards/11
Data Signals
Aggregated search trend data across
geographic focus areas
Retail Search
Power your ecommerce site or
application with Google-quality
search capabilities
Vertex AI Matching Engine
Use innovative semantic matching
features to improve search results
Leverage Google-Unique Data & APIs
To Drive Personalized Discovery
Assistant
Text search
Google Cloud Retail Search
High-Quality Product Search Results as a Service
Typeahead
Product Catalog
User Events, Logs
Custom LTR Models
Query Understanding
Web + Structured Index
Pricing Updates
Business / Config Rules
Your
Team
Retail
Search
Data Signals
Aggregated search trend data across
geographic focus areas
Retail Search
Power your ecommerce site or
application with Google-quality
search capabilities
Vertex AI Matching Engine
Use innovative semantic matching
features to improve search results
Leverage Google-Unique Data & APIs
To Drive Personalized Discovery
Google Cloud Vertex AI: Matching Engine
Scalable & cost-effective Vector similarity matching service
Low Latency
Find nearest neighbors in milliseconds
Scalable
Scales to billions of vectors
Cost Effective
Requires fewer VMs to serve the same workload
● 1/4th the CPU consumption of faiss
● 1/3rd the memory consumption of nmslib Google’s technology (labelled ScaNN) compared
with popular ANN services
Scalable Nearest Neighbors
https://ai.googleblog.com/2020/07/announcing-scann-efficient-vector.html
1. Training Data
Labeled Pairs
Query:
“Shakespeare
Tragedy”
Putting it all together
Signal
Gather trending search
data (Trends) via Google
Cloud BigQuery
Enrich
Leverage AI / NLP
services to enrich the
term (entity processing)
Search
Search your product
catalog with enriched
terms
Refine
Refine results by scoring
against additional
semantic relevance
Putting it all together
Signal
Gather trending search
data (Trends) via Google
Cloud BigQuery
Enrich
Leverage AI / NLP
services to enrich the
term (entity processing)
Search
Search your product
catalog with enriched
terms
Refine
Refine results by scoring
against additional
semantic relevance
BigQuery Vertex AI / Retail Search Vertex AI
Natural Language
Google Data Signals (BQ)
Search Term 1 | Location | DateTime
Search Term 2 | Location | DateTime
Search Term ...
Extract entities
Salience
Wikipedia / KG
BigQuery
Filter &
Enrichment
Refine
End User or
App Experience
Product Catalog
1B 3
Catalog-ID 1 | Title | Description
Catalog-ID 2 | Title | Description
. ..
Terms
Enriched
Terms
Enriched Search (Example Only):
select Catalog-ID from Catalog where
Metadata like ‘<Search Term>’ and
Genre = “<Genre>”
Semantically Relevant
Video Watch List
Search
Retail AI
Search
2
Natural
Language API
Vertex AI
Vector Similarity
1A
Putting it all together
Example
Example: Man United
Wikipedia: Manchester United Football Club, commonly referred to as Man United, or
simply United, is a professional football club based in the Old Trafford area of
Manchester, England. The club competes in the Premier League, the top division in
the English football league system.
https://trends.google.com/trends/explore?geo=US-CA-803&q=man%20united
https://en.wikipedia.org/wiki/Manchester_United_F.C.
Trending in Los Angeles
“Manchester United”
Retail
Ticketing & Live Events
Video / OTT Streaming
You might like …
Video / OTT: Trends Influencing Top Shelf
1. Respond to community search trends / interest in “Man United”
○ Sports team touring and visiting Los Angeles
2. Generate search candidates against sample Catalog
(movielens.org)
○ Return Movies & Products involving Manchester United FC
3. Create a tailored “Recommended / Hot” Shelf on App Landing page
○ Filter to include Products that are thematically related (sports,
football / soccer, documentary, action etc)
Enrich Search
Signal Refine
Enrich Search
Signal Refine
SELECT
*
FROM
`bigquery-public-data.google_trends.top_terms`
WHERE
refresh_date = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) and
dma_name = 'Los Angeles CA'
ORDER BY
week DESC,
rank ASC
https://cloud.google.com/bigquery/docs/sandbox
https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/google-search-trends
Data Con LA 2022 - Using Google trends data to build product recommendations
Data Con LA 2022 - Using Google trends data to build product recommendations
Data Con LA 2022 - Using Google trends data to build product recommendations
Enrich Search
Signal Refine
Search
Signal Refine
Enrich
Optional: Enrich the Catalog Search
$ gcloud ml language analyze-entities --content="Man United vs. Liverpool"
{
"entities": [
{
…
"metadata": {
"mid": "/m/050fh",
"wikipedia_url": "https://en.wikipedia.org/wiki/Manchester_United_F.C."
},
"name": "Man United",
"salience": 0.8100557,
"type": "ORGANIZATION"
}...
"metadata": {
"mid": "/m/04ltf",
"wikipedia_url": "https://en.wikipedia.org/wiki/Liverpool_F.C."
}..
https://cloud.google.com/sdk/gcloud/reference/ml
Search
Signal Refine
Enrich
Enrich
Signal Refine
Search
{
"id": "103661",
"title": "United",
"description": "United is based on the true story of Manchester United's
legendary Busby Babes, the youngest side ever to win the
Football League and the 1958 Munich Air Crash that claimed
eight of the their number. …."
"tags": [... "football (soccer)", "manchester united",
"historical event", "sports documentary"]
. . ..
}
Example catalog (extract)
https://movielens.org/
https://www.themoviedb.org/
https://console.cloud.google.com/ai/retail
my-bucket/movies/catalog/data.json
https://console.cloud.google.com/ai/retail
“Man United”
https://console.cloud.google.com/ai/retail
”Man United” related video
content & movies where core
metadata matches (token
match) but there is content
here that is potentially
thematically “distant”
https://console.cloud.google.com/ai/retail
Enrich
Signal Refine
Search
Enrich Search
Signal Refine
"United is based on the true story of Manchester
United's legendary Busby Babes”
"Iron Man and Captain America battle to keep the
Red Skull and his triggerman, Taskmaster, from
unleashing an army”
"The Invincible Iron Man and the Incredible Hulk
must join forces to save the Earth from its
greatest threat yet”
Encoder
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
[-2.70270444e-02, -3.13250013e-02, 6.68615196e-03 …]
[8.240270444e-03, -5.11250213e-02, 7.68615196e-03 …]
[-7.60240444e-01, 4.28360013e-03, 7.68615196e-03 …]
"United is based on the true story of Manchester
United's legendary Busby Babes”
"Iron Man and Captain America battle to keep the
Red Skull and his triggerman, Taskmaster, from
unleashing an army”
"The Invincible Iron Man and the Incredible Hulk
must join forces to save the Earth from its
greatest threat yet”
Encoder
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
Input: Catalog Text Fragments (60K)
● Movie Title
● Movie Description
● Genres
● Tags
1
"United is based on the true story of Manchester
United's legendary Busby Babes”
"Iron Man and Captain America battle to keep the
Red Skull and his triggerman, Taskmaster, from
unleashing an army”
"The Invincible Iron Man and the Incredible Hulk
must join forces to save the Earth from its
greatest threat yet”
Encoder
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
Input: Catalog Text Fragments (60K)
● Movie Title
● Movie Description
● Genres
● Tags
[-2.70270444e-02, -3.13250013e-02, 6.68615196e-03 …]
[8.240270444e-03, -5.11250213e-02, 7.68615196e-03 …]
[-7.60240444e-01, 4.28360013e-03, 7.68615196e-03 …]
Output: Embeddings (Vectors)
● Example: Leverage sentence-t5-base
● 60K Vectors @ 768 Dimensions
NLP Model (Transformer)
Prebuilt (HuggingFace, TFHub)
Custom (Two Tower, Swivel)
1 2
"United is based on the true story of Manchester
United's legendary Busby Babes”
"Iron Man and Captain America battle to keep the
Red Skull and his triggerman, Taskmaster, from
unleashing an army”
"The Invincible Iron Man and the Incredible Hulk
must join forces to save the Earth from its
greatest threat yet”
Encoder
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
Input: Catalog Text Fragments (60K)
● Movie Title
● Movie Description
● Genres
● Tags
[-2.70270444e-02, -3.13250013e-02, 6.68615196e-03 …]
[8.240270444e-03, -5.11250213e-02, 7.68615196e-03 …]
[-7.60240444e-01, 4.28360013e-03, 7.68615196e-03 …]
Output: Embeddings (Vectors)
● Example: Leverage sentence-t5-base
● 60K Vectors @ 768 Dimensions
NLP Model (Transformer)
Prebuilt (HuggingFace, TFHub)
Custom (Two Tower, Swivel)
1 2
3
Vertex AI
Matching
Engine
Index & Deploy!
Data Con LA 2022 - Using Google trends data to build product recommendations
from google.cloud import aiplatform
aiplatform.init()
my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>)
from sentence_transformers import SentenceTransformer
NLP_MODEL = 'sentence-transformers/sentence-t5-base'
model = SentenceTransformer(NLP_MODEL)
search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase
query_sentences = [search_term]
embedding = model.encode(query_sentences)
DEPLOYED_INDEX_ID = "my_movielens_ndx_001"
response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID,
queries=embedding,
num_neighbors=10)
print(response)
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
Python >= 3.6
from google.cloud import aiplatform
aiplatform.init()
my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>)
from sentence_transformers import SentenceTransformer
NLP_MODEL = 'sentence-transformers/sentence-t5-base'
model = SentenceTransformer(NLP_MODEL)
search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase
query_sentences = [search_term]
embedding = model.encode(query_sentences)
DEPLOYED_INDEX_ID = "my_movielens_ndx_001"
response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID,
queries=embedding,
num_neighbors=10)
print(response)
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
Python >= 3.6
from google.cloud import aiplatform
aiplatform.init()
my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>)
from sentence_transformers import SentenceTransformer
NLP_MODEL = 'sentence-transformers/sentence-t5-base'
model = SentenceTransformer(NLP_MODEL)
search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase
query_sentences = [search_term]
embedding = model.encode(query_sentences)
DEPLOYED_INDEX_ID = "my_movielens_ndx_001"
response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID,
queries=embedding,
num_neighbors=10)
print(response)
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
Python >= 3.6
from google.cloud import aiplatform
aiplatform.init()
my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>)
from sentence_transformers import SentenceTransformer
NLP_MODEL = 'sentence-transformers/sentence-t5-base'
model = SentenceTransformer(NLP_MODEL)
search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase
query_sentences = [search_term]
embedding = model.encode(query_sentences)
DEPLOYED_INDEX_ID = "my_movielens_ndx_001"
response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID,
queries=embedding,
num_neighbors=10)
print(response)
https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine
Python >= 3.6
[[MatchNeighbor(id='movielens-68194', distance=0.16755491495132446),
MatchNeighbor(id='movielens-185867', distance=0.16838324069976807),
MatchNeighbor(id='movielens-195337', distance=0.1685701608657837),
MatchNeighbor(id='movielens-145921', distance=0.17106527090072632),
MatchNeighbor(id='movielens-81676', distance=0.17208701372146606),
MatchNeighbor(id='movielens-103661', distance=0.17541170120239258),
MatchNeighbor(id='movielens-183153', distance=0.18686127662658691),
MatchNeighbor(id='movielens-147436', distance=0.1904624104499817),
MatchNeighbor(id='movielens-176405', distance=0.1911325454711914),
MatchNeighbor(id='movielens-6618', distance=0.1932288408279419)]]
Cosine Distance = 1 — Cosine Similarity
Man United
Iron Men
Search: Gather Candidates
Refine: Semantic Match & Add
Add Candidate Title
● Semantic Match = YES
Delete Candidate Title
● Semantic Match = NO
Data Con LA 2022 - Using Google trends data to build product recommendations
Discussion
Commentary & Summary
1. Overall Strategy
a. Trending Data Signals (Search) to “seed” Content Recommendations
b. Search Engine (Google Cloud Retail Search AI) to gather candidates
c. Vector Similarity (Google Cloud Vertex AI) to rank sort candidates
2. Part of larger solution!
a. Ex: Use collaborative filtering (or other) to gauge user interest / engagement
b. Good for cold-start or content-heavy approach
3. More details available
a. https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/google-search-trends
b. https://cloud.google.com/solutions/retail-product-discovery
c. https://cloud.google.com/vertex-ai/docs/matching-engine/overview
Thank You
https://cloud.google.com/contact

More Related Content

PPTX
Jeremy cabral search marketing summit - scraping data-driven content (1)
PPT
Web Search And Mining (Ntuim)
PPT
Search enginebasics
PPT
Data Cloud - Yury Lifshits - Yahoo! Research
PPTX
Data Feed SEO for Affiliates by Will Critchlow
PPT
Seo Mar09 Intnl
PPT
Information Update Feb 2008
PPTX
Google Tools & services
Jeremy cabral search marketing summit - scraping data-driven content (1)
Web Search And Mining (Ntuim)
Search enginebasics
Data Cloud - Yury Lifshits - Yahoo! Research
Data Feed SEO for Affiliates by Will Critchlow
Seo Mar09 Intnl
Information Update Feb 2008
Google Tools & services

Similar to Data Con LA 2022 - Using Google trends data to build product recommendations (20)

PPTX
SEO (SEARCH ENGINE OPTIMIZATION) AND DIGITAL MARKETING.pptx
PDF
Tom Critchlow - Data Feed SEO & Advanced Site Architecture
PPT
Ps Appliance Overview
PPTX
Search engine
PPT
search engine optimisation
PDF
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
PPT
Attention Allocation - from Search to Social
PPT
Google A Wonderfull World 20586
PDF
Elasticsearch : petit déjeuner du 13 mars 2014
PDF
Big data on_aws in korea by abhishek sinha (lunch and learn)
PPTX
Door Of Internet
PPT
Oxford Seo.Com Presentation
PDF
Real-time big data analytics based on product recommendations case study
PDF
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...
PPT
Introduction To Search - SEO 101
PPT
Mashups & Data Visualizations: The New Breed of Web Applications
PDF
SEOMoz The Beginners Guide To SEO
PPT
Data Strategy
ODP
Web2.0.2012 - lesson 8 - Google world
PDF
10 Things You Don't Know about Structured Data
SEO (SEARCH ENGINE OPTIMIZATION) AND DIGITAL MARKETING.pptx
Tom Critchlow - Data Feed SEO & Advanced Site Architecture
Ps Appliance Overview
Search engine
search engine optimisation
Séminaire Big Data Alter Way - Elasticsearch - octobre 2014
Attention Allocation - from Search to Social
Google A Wonderfull World 20586
Elasticsearch : petit déjeuner du 13 mars 2014
Big data on_aws in korea by abhishek sinha (lunch and learn)
Door Of Internet
Oxford Seo.Com Presentation
Real-time big data analytics based on product recommendations case study
Graphs & Big Data - Philip Rathle and Andreas Kollegger @ Big Data Science Me...
Introduction To Search - SEO 101
Mashups & Data Visualizations: The New Breed of Web Applications
SEOMoz The Beginners Guide To SEO
Data Strategy
Web2.0.2012 - lesson 8 - Google world
10 Things You Don't Know about Structured Data
Ad

More from Data Con LA (20)

PPTX
Data Con LA 2022 Keynotes
PPTX
Data Con LA 2022 Keynotes
PDF
Data Con LA 2022 Keynote
PPTX
Data Con LA 2022 - Startup Showcase
PPTX
Data Con LA 2022 Keynote
PPTX
Data Con LA 2022 - AI Ethics
PDF
Data Con LA 2022 - Improving disaster response with machine learning
PDF
Data Con LA 2022 - What's new with MongoDB 6.0 and Atlas
PDF
Data Con LA 2022 - Real world consumer segmentation
PPTX
Data Con LA 2022 - Modernizing Analytics & AI for today's needs: Intuit Turbo...
PPTX
Data Con LA 2022 - Moving Data at Scale to AWS
PDF
Data Con LA 2022 - Collaborative Data Exploration using Conversational AI
PDF
Data Con LA 2022 - Why Database Modernization Makes Your Data Decisions More ...
PDF
Data Con LA 2022 - Intro to Data Science
PDF
Data Con LA 2022 - How are NFTs and DeFi Changing Entertainment
PPTX
Data Con LA 2022 - Why Data Quality vigilance requires an End-to-End, Automat...
PPTX
Data Con LA 2022-Perfect Viral Ad prediction of Superbowl 2022 using Tease, T...
PPTX
Data Con LA 2022- Embedding medical journeys with machine learning to improve...
PPTX
Data Con LA 2022 - Data Streaming with Kafka
PPTX
Data Con LA 2022 - Building Field-level Lineage from Scratch for Modern Data ...
Data Con LA 2022 Keynotes
Data Con LA 2022 Keynotes
Data Con LA 2022 Keynote
Data Con LA 2022 - Startup Showcase
Data Con LA 2022 Keynote
Data Con LA 2022 - AI Ethics
Data Con LA 2022 - Improving disaster response with machine learning
Data Con LA 2022 - What's new with MongoDB 6.0 and Atlas
Data Con LA 2022 - Real world consumer segmentation
Data Con LA 2022 - Modernizing Analytics & AI for today's needs: Intuit Turbo...
Data Con LA 2022 - Moving Data at Scale to AWS
Data Con LA 2022 - Collaborative Data Exploration using Conversational AI
Data Con LA 2022 - Why Database Modernization Makes Your Data Decisions More ...
Data Con LA 2022 - Intro to Data Science
Data Con LA 2022 - How are NFTs and DeFi Changing Entertainment
Data Con LA 2022 - Why Data Quality vigilance requires an End-to-End, Automat...
Data Con LA 2022-Perfect Viral Ad prediction of Superbowl 2022 using Tease, T...
Data Con LA 2022- Embedding medical journeys with machine learning to improve...
Data Con LA 2022 - Data Streaming with Kafka
Data Con LA 2022 - Building Field-level Lineage from Scratch for Modern Data ...
Ad

Recently uploaded (20)

PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PPTX
Business Acumen Training GuidePresentation.pptx
PPTX
Computer network topology notes for revision
PPTX
oil_refinery_comprehensive_20250804084928 (1).pptx
PPTX
Global journeys: estimating international migration
PPTX
IB Computer Science - Internal Assessment.pptx
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PDF
Taxes Foundatisdcsdcsdon Certificate.pdf
PPTX
Introduction to Knowledge Engineering Part 1
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPT
Reliability_Chapter_ presentation 1221.5784
PDF
Foundation of Data Science unit number two notes
PDF
Fluorescence-microscope_Botany_detailed content
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PPTX
A Quantitative-WPS Office.pptx research study
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
Business Acumen Training GuidePresentation.pptx
Computer network topology notes for revision
oil_refinery_comprehensive_20250804084928 (1).pptx
Global journeys: estimating international migration
IB Computer Science - Internal Assessment.pptx
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
Business Ppt On Nestle.pptx huunnnhhgfvu
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Taxes Foundatisdcsdcsdon Certificate.pdf
Introduction to Knowledge Engineering Part 1
Introduction-to-Cloud-ComputingFinal.pptx
Reliability_Chapter_ presentation 1221.5784
Foundation of Data Science unit number two notes
Fluorescence-microscope_Botany_detailed content
STUDY DESIGN details- Lt Col Maksud (21).pptx
A Quantitative-WPS Office.pptx research study

Data Con LA 2022 - Using Google trends data to build product recommendations

  • 2. Presented by: Mike Limcaco Contributions: Lexi Flynn & Bryan Rutkowski 2022 August 13 DataCon LA 2022 Trends To Recommendations Using Google trends data to build product recommendations
  • 5. How can we tap into what’s trending & continuously promote new, interesting and relevant content? 1. Aggregate trending search interest 2. Turn these into smart searches against our product catalog(s) 3. Filter, sort and rank to further refine results
  • 6. Leverage Google-Unique Data & APIs To Drive Personalized Discovery Data Signals Aggregated search trend data across geographic focus areas Retail Search Power your ecommerce site or application with Google-quality search capabilities Vertex AI Matching Engine Use innovative semantic matching features to improve search results
  • 7. Data Signals Aggregated search trend data across geographic focus areas Retail Search Power your ecommerce site or application with Google-quality search capabilities Vertex AI Matching Engine Use innovative semantic matching features to improve search results Leverage Google-Unique Data & APIs To Drive Personalized Discovery
  • 8. What is BigQuery Data Signals? Google Trends Data Signals BigQuery Public Datasets Program Insights for Everyone Marketing How do I optimize my paid media spend when it comes to search term bidding? Merchandising & Demand Forecasting How can I understand demand trends to make better assortment planning decisions? Executives How is the business performing across all of our markets? Against competitors? Supply Chain How do I manage supply chain logistics and distribute inventory better?
  • 10. Data Signals Aggregated search trend data across geographic focus areas Retail Search Power your ecommerce site or application with Google-quality search capabilities Vertex AI Matching Engine Use innovative semantic matching features to improve search results Leverage Google-Unique Data & APIs To Drive Personalized Discovery
  • 11. Assistant Text search Google Cloud Retail Search High-Quality Product Search Results as a Service Typeahead Product Catalog User Events, Logs Custom LTR Models Query Understanding Web + Structured Index Pricing Updates Business / Config Rules Your Team Retail Search
  • 12. Data Signals Aggregated search trend data across geographic focus areas Retail Search Power your ecommerce site or application with Google-quality search capabilities Vertex AI Matching Engine Use innovative semantic matching features to improve search results Leverage Google-Unique Data & APIs To Drive Personalized Discovery
  • 13. Google Cloud Vertex AI: Matching Engine Scalable & cost-effective Vector similarity matching service Low Latency Find nearest neighbors in milliseconds Scalable Scales to billions of vectors Cost Effective Requires fewer VMs to serve the same workload ● 1/4th the CPU consumption of faiss ● 1/3rd the memory consumption of nmslib Google’s technology (labelled ScaNN) compared with popular ANN services Scalable Nearest Neighbors https://ai.googleblog.com/2020/07/announcing-scann-efficient-vector.html
  • 16. Putting it all together Signal Gather trending search data (Trends) via Google Cloud BigQuery Enrich Leverage AI / NLP services to enrich the term (entity processing) Search Search your product catalog with enriched terms Refine Refine results by scoring against additional semantic relevance
  • 17. Putting it all together Signal Gather trending search data (Trends) via Google Cloud BigQuery Enrich Leverage AI / NLP services to enrich the term (entity processing) Search Search your product catalog with enriched terms Refine Refine results by scoring against additional semantic relevance BigQuery Vertex AI / Retail Search Vertex AI Natural Language
  • 18. Google Data Signals (BQ) Search Term 1 | Location | DateTime Search Term 2 | Location | DateTime Search Term ... Extract entities Salience Wikipedia / KG BigQuery Filter & Enrichment Refine End User or App Experience Product Catalog 1B 3 Catalog-ID 1 | Title | Description Catalog-ID 2 | Title | Description . .. Terms Enriched Terms Enriched Search (Example Only): select Catalog-ID from Catalog where Metadata like ‘<Search Term>’ and Genre = “<Genre>” Semantically Relevant Video Watch List Search Retail AI Search 2 Natural Language API Vertex AI Vector Similarity 1A Putting it all together
  • 20. Example: Man United Wikipedia: Manchester United Football Club, commonly referred to as Man United, or simply United, is a professional football club based in the Old Trafford area of Manchester, England. The club competes in the Premier League, the top division in the English football league system. https://trends.google.com/trends/explore?geo=US-CA-803&q=man%20united https://en.wikipedia.org/wiki/Manchester_United_F.C.
  • 21. Trending in Los Angeles “Manchester United” Retail Ticketing & Live Events Video / OTT Streaming You might like …
  • 22. Video / OTT: Trends Influencing Top Shelf 1. Respond to community search trends / interest in “Man United” ○ Sports team touring and visiting Los Angeles 2. Generate search candidates against sample Catalog (movielens.org) ○ Return Movies & Products involving Manchester United FC 3. Create a tailored “Recommended / Hot” Shelf on App Landing page ○ Filter to include Products that are thematically related (sports, football / soccer, documentary, action etc)
  • 25. SELECT * FROM `bigquery-public-data.google_trends.top_terms` WHERE refresh_date = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) and dma_name = 'Los Angeles CA' ORDER BY week DESC, rank ASC https://cloud.google.com/bigquery/docs/sandbox https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/google-search-trends
  • 31. Optional: Enrich the Catalog Search $ gcloud ml language analyze-entities --content="Man United vs. Liverpool" { "entities": [ { … "metadata": { "mid": "/m/050fh", "wikipedia_url": "https://en.wikipedia.org/wiki/Manchester_United_F.C." }, "name": "Man United", "salience": 0.8100557, "type": "ORGANIZATION" }... "metadata": { "mid": "/m/04ltf", "wikipedia_url": "https://en.wikipedia.org/wiki/Liverpool_F.C." }.. https://cloud.google.com/sdk/gcloud/reference/ml
  • 34. { "id": "103661", "title": "United", "description": "United is based on the true story of Manchester United's legendary Busby Babes, the youngest side ever to win the Football League and the 1958 Munich Air Crash that claimed eight of the their number. …." "tags": [... "football (soccer)", "manchester united", "historical event", "sports documentary"] . . .. } Example catalog (extract) https://movielens.org/ https://www.themoviedb.org/
  • 39. ”Man United” related video content & movies where core metadata matches (token match) but there is content here that is potentially thematically “distant” https://console.cloud.google.com/ai/retail
  • 42. "United is based on the true story of Manchester United's legendary Busby Babes” "Iron Man and Captain America battle to keep the Red Skull and his triggerman, Taskmaster, from unleashing an army” "The Invincible Iron Man and the Incredible Hulk must join forces to save the Earth from its greatest threat yet” Encoder https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine [-2.70270444e-02, -3.13250013e-02, 6.68615196e-03 …] [8.240270444e-03, -5.11250213e-02, 7.68615196e-03 …] [-7.60240444e-01, 4.28360013e-03, 7.68615196e-03 …]
  • 43. "United is based on the true story of Manchester United's legendary Busby Babes” "Iron Man and Captain America battle to keep the Red Skull and his triggerman, Taskmaster, from unleashing an army” "The Invincible Iron Man and the Incredible Hulk must join forces to save the Earth from its greatest threat yet” Encoder https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine Input: Catalog Text Fragments (60K) ● Movie Title ● Movie Description ● Genres ● Tags 1
  • 44. "United is based on the true story of Manchester United's legendary Busby Babes” "Iron Man and Captain America battle to keep the Red Skull and his triggerman, Taskmaster, from unleashing an army” "The Invincible Iron Man and the Incredible Hulk must join forces to save the Earth from its greatest threat yet” Encoder https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine Input: Catalog Text Fragments (60K) ● Movie Title ● Movie Description ● Genres ● Tags [-2.70270444e-02, -3.13250013e-02, 6.68615196e-03 …] [8.240270444e-03, -5.11250213e-02, 7.68615196e-03 …] [-7.60240444e-01, 4.28360013e-03, 7.68615196e-03 …] Output: Embeddings (Vectors) ● Example: Leverage sentence-t5-base ● 60K Vectors @ 768 Dimensions NLP Model (Transformer) Prebuilt (HuggingFace, TFHub) Custom (Two Tower, Swivel) 1 2
  • 45. "United is based on the true story of Manchester United's legendary Busby Babes” "Iron Man and Captain America battle to keep the Red Skull and his triggerman, Taskmaster, from unleashing an army” "The Invincible Iron Man and the Incredible Hulk must join forces to save the Earth from its greatest threat yet” Encoder https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine Input: Catalog Text Fragments (60K) ● Movie Title ● Movie Description ● Genres ● Tags [-2.70270444e-02, -3.13250013e-02, 6.68615196e-03 …] [8.240270444e-03, -5.11250213e-02, 7.68615196e-03 …] [-7.60240444e-01, 4.28360013e-03, 7.68615196e-03 …] Output: Embeddings (Vectors) ● Example: Leverage sentence-t5-base ● 60K Vectors @ 768 Dimensions NLP Model (Transformer) Prebuilt (HuggingFace, TFHub) Custom (Two Tower, Swivel) 1 2 3 Vertex AI Matching Engine Index & Deploy!
  • 47. from google.cloud import aiplatform aiplatform.init() my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>) from sentence_transformers import SentenceTransformer NLP_MODEL = 'sentence-transformers/sentence-t5-base' model = SentenceTransformer(NLP_MODEL) search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase query_sentences = [search_term] embedding = model.encode(query_sentences) DEPLOYED_INDEX_ID = "my_movielens_ndx_001" response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID, queries=embedding, num_neighbors=10) print(response) https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine Python >= 3.6
  • 48. from google.cloud import aiplatform aiplatform.init() my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>) from sentence_transformers import SentenceTransformer NLP_MODEL = 'sentence-transformers/sentence-t5-base' model = SentenceTransformer(NLP_MODEL) search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase query_sentences = [search_term] embedding = model.encode(query_sentences) DEPLOYED_INDEX_ID = "my_movielens_ndx_001" response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID, queries=embedding, num_neighbors=10) print(response) https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine Python >= 3.6
  • 49. from google.cloud import aiplatform aiplatform.init() my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>) from sentence_transformers import SentenceTransformer NLP_MODEL = 'sentence-transformers/sentence-t5-base' model = SentenceTransformer(NLP_MODEL) search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase query_sentences = [search_term] embedding = model.encode(query_sentences) DEPLOYED_INDEX_ID = "my_movielens_ndx_001" response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID, queries=embedding, num_neighbors=10) print(response) https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine Python >= 3.6
  • 50. from google.cloud import aiplatform aiplatform.init() my_index_endpoint = aiplatform.MatchingEngineIndexEndpoint(index_endpoint_name=<ID Here>) from sentence_transformers import SentenceTransformer NLP_MODEL = 'sentence-transformers/sentence-t5-base' model = SentenceTransformer(NLP_MODEL) search_term = 'Man United' # OPTIONAL: add text data from Enrichment Phase query_sentences = [search_term] embedding = model.encode(query_sentences) DEPLOYED_INDEX_ID = "my_movielens_ndx_001" response = my_index_endpoint.match(deployed_index_id=DEPLOYED_INDEX_ID, queries=embedding, num_neighbors=10) print(response) https://github.com/GoogleCloudPlatform/vertex-ai-samples/tree/main/notebooks/official/matching_engine Python >= 3.6
  • 51. [[MatchNeighbor(id='movielens-68194', distance=0.16755491495132446), MatchNeighbor(id='movielens-185867', distance=0.16838324069976807), MatchNeighbor(id='movielens-195337', distance=0.1685701608657837), MatchNeighbor(id='movielens-145921', distance=0.17106527090072632), MatchNeighbor(id='movielens-81676', distance=0.17208701372146606), MatchNeighbor(id='movielens-103661', distance=0.17541170120239258), MatchNeighbor(id='movielens-183153', distance=0.18686127662658691), MatchNeighbor(id='movielens-147436', distance=0.1904624104499817), MatchNeighbor(id='movielens-176405', distance=0.1911325454711914), MatchNeighbor(id='movielens-6618', distance=0.1932288408279419)]] Cosine Distance = 1 — Cosine Similarity Man United Iron Men
  • 53. Refine: Semantic Match & Add Add Candidate Title ● Semantic Match = YES Delete Candidate Title ● Semantic Match = NO
  • 56. Commentary & Summary 1. Overall Strategy a. Trending Data Signals (Search) to “seed” Content Recommendations b. Search Engine (Google Cloud Retail Search AI) to gather candidates c. Vector Similarity (Google Cloud Vertex AI) to rank sort candidates 2. Part of larger solution! a. Ex: Use collaborative filtering (or other) to gauge user interest / engagement b. Good for cold-start or content-heavy approach 3. More details available a. https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/google-search-trends b. https://cloud.google.com/solutions/retail-product-discovery c. https://cloud.google.com/vertex-ai/docs/matching-engine/overview