Stay organized with collections
Save and categorize content based on your preferences.
This page describes a Guided Search feature in Vertex AI Search for commerce conversational commerce.
Conversational commerce uses conversational product filtering to provide users with a real-time, ongoing conversational experience, enabling a more interactive search experience.
The conversational commerce feature functions as part of the Guided Search package, benefiting customers by engaging them in a conversation to narrow down search queries faster by presenting them with either relevant products, follow-up questions, or both.
Conversational commerce features
Conversational commerce augments the Vertex AI Search for commerce experience in the following ways:
Narrows user queries faster: Conversational commerce offers a rapid way to filter 10,000 products down to less than 100 products more efficiently, increasing the likelihood that the user decides to make a purchase.
Hyper-personalization: AI agents analyze shoppers' preferences, purchase history, and social media activity to provide truly personalized product recommendations, promotions, and shopping experiences.
Integrated end-to-end journeys: From product discovery to checkout, AI agents accompany the end user along their entire shopping journey with immersive, dynamic, and continuous conversation.
Adapted to commerce use cases: This product covers ecommerce, product discovery, and support use cases.
More immersive user experiences: With the help of AI agents threading user conversations in the background, augmented and virtual reality can be implemented to create virtual try-ons, store tours, and spatial product visualization for users.
Conversational commerce uses search query categories to determine whether or not an LLM-based answer is generated and how user queries are handled by the Conversational and Search APIs for these user scenarios:
View table
User journeys
Classifications and examples
Handling
Irrelevant queries that don't require an LLM answer
Sample Conversational API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"query:"Are there any deals for Thanksgiving?"conversational_filtering_spec{conversational_filtering_mode:ENABLED}visitor_id:"test"
JailBreak — Write a poem to explain the
details of whole milk
ChitChat — How are you?
Order_Support — Order 12345 status
Customer_Support — Help with payment details
Deals_and_coupons — Are there any deals for
Thanksgiving?
Store_relevant — Do we have milk
in stock?
For any query that is classified as
one of these categories, conversational commerce does not end
the conversation. Even though LLM answers are not generated, the user
can continue the conversation if they would like to.
The Conversation
API returns a conversation_id as part of the response. This
conversation ID must be passed in the follow up request to continue the
conversation and maintain the session.
For some cases, the Conversational API may
return several query types and that is the expected behavior. This only
happens for the queries that are blocked or not answered.
Keyword searches that don't require LLM
Sample Conversational API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"query:"show me some monster energy drinks"visitor_id:"test"
Sample Conversational API response
query_types:SIMPLE_PRODUCT_SEARCHconversation_id:"479fd093-c701-4899-bcc3-9e711233bdf9"refined_search{query:"monster energy drinks"}
Sample Search API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"query:"monster energy drinks"visitor_id:"test"
Sample Search API response
results{id:"970126667"product{name:"projects/118220807021/locations/global/catalogs/default_catalog/branches/2/products/970126667"title:"Monster Energy Original - 6 - 12 FZ"}}results{id:"970487257"product{name:"projects/118220807021/locations/global/catalogs/default_catalog/branches/2/products/970487257"title:"Monster Ultra Zero Sugar Energy Drink Variety Pack - 12-16 Fl. Oz."}}...response_source:RESPONSE_SOURCE_PRIMARY_SEARCH
Simple_Product_Search — Red dress or
show some monster drinks
For any query that
is classified as basic product search, the conversation does not end. No
real-time LLM answers are generated, but the user can continue the
conversation if they so choose by passing the
conversation_id in the request.
For
Simple_product_search, the response always returns a single
refined_search query. Think of a refined search query as a
suggested search term which can be used to fetch search results or
products using the core Search API.
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"query:"Compare 1% milk with 2% milk"conversational_filtering_spec{conversational_filtering_mode:ENABLED}visitor_id:"test"
Sample Conversational API response
query_types:PRODUCT_COMPARISONconversational_text_response:"1% milk contains 110 calories, 1.5 g of saturated fat, and 140 mg of sodium per cup. 2% milk is reduced fat with 37% less fat than regular milk and contains vitamins A & D."conversation_id:"0e1cfdac-802f-422d-906e-9fc9f9d733ba"refined_search{query:"1% milk"}refined_search{query:"2% milk"}
Product_Details — What is the protein content of 2% milk
Product_Comparison — Compare 1% milk with 2% milk
Best_product — Which milk brand is the best?
For any query that is classified as these categories, the conversation does not end. Conversational commerce generates real-time LLM answers. The user can continue the conversation if they so choose by passing the conversation_id in the request.
For these query classifications, the response returns the following:
conversation_id: continues the conversation
conversational_text_response: the LLM-generated response
refined_search: one or more suggested search queries that must be used to fetch search results using the core Search API
Intent refinement
Sample Conversational API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"query:"Help me plan a party"conversational_filtering_spec{conversational_filtering_mode:ENABLED}visitor_id:"test"
Sample Conversational API response
query_types:INTENT_REFINEMENTconversational_text_response:"To plan a party, you\'ll need decorations, snacks, party supplies, drinks, and a cake. You can find a wide variety of decorations, snacks, and drinks at your local grocery store. For party supplies, you can find everything from plates and cups to balloons and streamers. And for cake, you can choose from a variety of flavors and sizes."followup_question{followup_question:"What kind of party are you planning?"}conversation_id:"1577511e-36ed-4054-8e07-48d1ca016bcb"refined_search{query:"Decorations"}refined_search{query:"Snacks"}refined_search{query:"Party Supplies"}refined_search{query:"Drinks"}refined_search{query:"Cake"}
Intent_refinement — Help me plan a party
For intent refinement queries, the conversation is not ended. Real-time LLM answers and a follow-up question are generated. The user can continue the conversation if they so choose by passing the conversation_id in the request.
For this query category, the response will always return the following:
conversation_id: continues the conversation
conversational_text: the LLM-generated response
followup_question: follow-up question asked to the user to clarify the intent
refined_search: one or more suggested search queries that must be used to fetch search results using the core Search API
Session maintenance
This section describes how conversational commerce sessions are maintained by the Conversational API.
The Conversational API uses a conversation_id to manage ongoing conversations. To begin a new conversation, the API request omits the conversation_id. The API response includes a conversation_id that is used in subsequent requests to continue the conversation and maintain context. To ensure consistency between LLM answers and search results, subsequent Conversational API requests include SearchParams that mirror the configuration of the core Search API.
View table
Session handling
Description
Conversational API integration
Start a new conversation
To start a new conversation, the client omits the conversation_id from the API request.
Sample API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"query:"Help me plan a party"conversational_filtering_spec{conversational_filtering_mode:ENABLED}visitor_id:"test"
Sample API response
query_types:INTENT_REFINEMENTconversational_text_response:"To plan a party, you\'ll need decorations, snacks, party supplies, drinks, and a cake."followup_question{followup_question:"What kind of party are you planning?"}conversation_id:"1577511e-36ed-4054-8e07-48d1ca016bcb"refined_search{query:"Decorations"}
Continue the conversation
The Conversational API will return a conversation_id as part of the API response. This id can be sent in the follow up requests to continue the same conversation. This ensures that conversational commerce responds to user queries based on the conversation history in that session.
Sample API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"conversation_id:"1577511e-36ed-4054-8e07-48d1ca016bcb"query:"Help me plan a party"conversational_filtering_spec{conversational_filtering_mode:ENABLED}visitor_id:"test"
Sample API response
query_types:INTENT_REFINEMENTconversational_text_response:"To plan a party, you\'ll need decorations, snacks, party supplies, drinks, and a cake."followup_question{followup_question:"What kind of party are you planning?"}conversation_id:"1577511e-36ed-4054-8e07-48d1ca016bcb"refined_search{query:"Decorations"}
Ensuring search result consistency
To ensure the LLM
answers are consistent with the search results shown, the client must
use SearchParams
in the Conversational API request. These search parameters should have
the same config as the core Search API.
Sample API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"conversation_id:"1577511e-36ed-4054-8e07-48d1ca016bcb"query:"Help me plan a party"conversational_filtering_spec{conversational_filtering_mode:ENABLED}visitor_id:"test"search_params{filter:"filter"canonical_filter:"canonical_filter"sort_by:"sort_by"boost_spec{condition_boost_specs{condition:"condition"}}}
Refer to these sections to view code samples of how to integrate the Conversational API using one of these three modes to control conversational product filtering:
Disabled: In this mode, the client only has the query categories, but conversational product filtering is disabled.
Enabled: In the enabled mode, the client has all conversational capabilities. This includes all the query categories and conversational product filtering.
Conversational_filter_only: If chosen, the client only has conversational product filtering. This does not include support for any of the query categories and other default conversational capabilities.
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"query:"show me some monster energy drinks"visitor_id:"test"conversational_filtering_spec{conversational_filtering_mode:DISABLED}
Sample API response
query_types:SIMPLE_PRODUCT_SEARCHconversation_id:"479fd093-c701-4899-bcc3-9e711233bdf9"refined_search{query:"monster energy drinks"}
Enabled mode
Sample API request
placement:"projects/118220807021/locations/global/catalogs/default_catalog/placements/default_search"branch:"projects/118220807021/locations/global/catalogs/default_catalog/branches/default_branch"query:"show me some monster energy drinks"visitor_id:"test"conversational_filtering_spec{conversational_filtering_mode:ENABLED}
Sample API response
query_types:SIMPLE_PRODUCT_SEARCHconversation_id:"479fd093-c701-4899-bcc3-9e711233bdf9"refined_search{query:"monster energy drinks"}conversational_filtering_result:{followup_question{followup_question:"What is the size?"suggested_answers{product_attribute_value{name:"size",value:"12oz"}}}}
Conversational filtering only mode
With conversational_filtering_only mode selected, the user experiences only conversational product filtering, without generating an LLM answer, query classification, or suggested search queries.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-06 UTC."],[],[]]