nerdexam
Google

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…

Designing and Implementing Database Solutions

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)
  • A
    3% (1)
  • B
    75% (27)
  • C
    14% (5)
  • D
    8% (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

#Database Design#Text Embeddings#Semantic Search#Cloud SQL

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DATABASE-ENGINEER Practice