PROFESSIONAL-CLOUD-DATABASE-ENGINEER · Question #188
You have a Cloud SQL for MySQL instance with a table of product information including a column of product descriptions. Your application development team is building a customer facing chatbot and…
The correct answer is B. Create and populate a column of product description embeddings on the product table and. By precomputing embeddings for each product description and storing them in your table, you can turn a freeform customer query into an embedding and then run an approximate nearest- neighbor search to find the semantically closest products. This approach delivers much more…
Question
You have a Cloud SQL for MySQL instance with a table of product information including a column of product descriptions. Your application development team is building a customer facing chatbot and would like to find the product that most closely matches a freeform text description provided by the customer. How should you enable this functionality-
Options
- ACreate a stored procedure that uses a regular expression to match the customer's search text to
- BCreate and populate a column of product description embeddings on the product table and
- CUse the LIKE operator to match the customer's search text to the product description and return
- DCreate a SQL script that compares the product description and the customer's search text by using
How the community answered
(36 responses)- A3% (1)
- B75% (27)
- C14% (5)
- D8% (3)
Explanation
By precomputing embeddings for each product description and storing them in your table, you can turn a freeform customer query into an embedding and then run an approximate nearest- neighbor search to find the semantically closest products. This approach delivers much more relevant matches than regex, LIKE, or SOUNDEX without overloading the database with expensive text-processing on every query.
Topics
Community Discussion
No community discussion yet for this question.