Meet industry peers, ask questions, collaborate to find answers, and connect with Googlers who are making the products you use every day.<\/p>", "imageupload.max_uploaded_images_per_upload" : 100, "imageupload.max_uploaded_images_per_user" : 10000, "integratedprofile.connect_mode" : "", "tkb.toc_maximum_heading_level" : "2", "tkb.toc_heading_list_style" : "disc", "sharedprofile.show_hovercard_score" : true, "config.search_before_post_scope" : "community", "tkb.toc_heading_indent" : "15", "p13n.cta.recommendations_feed_dismissal_timestamp" : -1, "imageupload.max_file_size" : 10024, "layout.show_batch_checkboxes" : false, "integratedprofile.cta_connect_slim_dismissal_timestamp" : -1 }, "isAnonymous" : true, "policies" : { "image-upload.process-and-remove-exif-metadata" : true }, "registered" : false, "emailRef" : "", "id" : -1, "login" : "Former Community Member" }, "Server" : { "communityPrefix" : "/qsqph94282", "nodeChangeTimeStamp" : 1732887618982, "tapestryPrefix" : "/gc", "deviceMode" : "DESKTOP", "responsiveDeviceMode" : "DESKTOP", "membershipChangeTimeStamp" : "0", "version" : "24.7", "branch" : "24.7-release", "showTextKeys" : false }, "Config" : { "phase" : "prod", "integratedprofile.cta.reprompt.delay" : 30, "profileplus.tracking" : { "profileplus.tracking.enable" : false, "profileplus.tracking.click.enable" : false, "profileplus.tracking.impression.enable" : false }, "app.revision" : "2409051714-s8dac8f1df8-b80", "navigation.manager.community.structure.limit" : "1000" }, "Activity" : { "Results" : [ ] }, "NodeContainer" : { "viewHref" : "https://www.googlecloudcommunity.com/gc/Cloud-Forums/ct-p/cloud-forums", "description" : "Get answers to your questions and share your knowledge about the Google Cloud.", "id" : "cloud-forums", "shortTitle" : "Cloud Forums", "title" : "Cloud Forums", "nodeType" : "category" }, "Page" : { "skins" : [ "googlecloud", "theme_hermes", "responsive_peak" ], "authUrls" : { "loginUrl" : "https://www.googlecloudcommunity.com/gc/user/userloginpage?dest_url=https%3A%2F%2Fwww.googlecloudcommunity.com%2Fgc%2FAI-ML%2FComposite-Entities-on-Df-CX%2Fm-p%2F784641", "loginUrlNotRegistered" : "https://www.googlecloudcommunity.com/gc/user/userloginpage?redirectreason=notregistered&dest_url=https%3A%2F%2Fwww.googlecloudcommunity.com%2Fgc%2FAI-ML%2FComposite-Entities-on-Df-CX%2Fm-p%2F784641", "loginUrlNotRegisteredDestTpl" : "https://www.googlecloudcommunity.com/gc/user/userloginpage?redirectreason=notregistered&dest_url=%7B%7BdestUrl%7D%7D" }, "name" : "ForumTopicPage", "rtl" : false, "object" : { "viewHref" : "/gc/AI-ML/Composite-Entities-on-Df-CX/td-p/782594", "subject" : "Composite Entities on Df CX", "id" : 782594, "page" : "ForumTopicPage", "type" : "Thread" } }, "WebTracking" : { "Activities" : { }, "path" : "Community:Google Cloud Community/Category:Google Cloud/Category:Cloud Forums/Board:AI\\/ML/Message:Re: Composite Entities on Df CX" }, "Feedback" : { "targeted" : { } }, "Seo" : { "markerEscaping" : { "pathElement" : { "prefix" : "@", "match" : "^[0-9][0-9]$" }, "enabled" : false } }, "TopLevelNode" : { "viewHref" : "https://www.googlecloudcommunity.com/gc/Google-Cloud/ct-p/google-cloud", "description" : "Find answers, ask questions, and connect with our community of experts.", "id" : "google-cloud", "shortTitle" : "Google Cloud", "title" : "Google Cloud", "nodeType" : "category" }, "Community" : { "viewHref" : "https://www.googlecloudcommunity.com/", "integratedprofile.lang_code" : "en", "integratedprofile.country_code" : "US", "id" : "qsqph94282", "shortTitle" : "Google Cloud Community", "title" : "Google Cloud Community" }, "CoreNode" : { "conversationStyle" : "forum", "viewHref" : "https://www.googlecloudcommunity.com/gc/AI-ML/bd-p/cloud-ai-ml", "settings" : { }, "description" : "Join conversations about Artificial Intelligence and Machine Learning, including products like AutoML, Vertex AI, AI Infrastructure, and more.", "id" : "cloud-ai-ml", "shortTitle" : "AI/ML", "title" : "AI/ML", "nodeType" : "Board", "ancestors" : [ { "viewHref" : "https://www.googlecloudcommunity.com/gc/Cloud-Forums/ct-p/cloud-forums", "description" : "Get answers to your questions and share your knowledge about the Google Cloud.", "id" : "cloud-forums", "shortTitle" : "Cloud Forums", "title" : "Cloud Forums", "nodeType" : "category" }, { "viewHref" : "https://www.googlecloudcommunity.com/gc/Google-Cloud/ct-p/google-cloud", "description" : "Find answers, ask questions, and connect with our community of experts.", "id" : "google-cloud", "shortTitle" : "Google Cloud", "title" : "Google Cloud", "nodeType" : "category" }, { "viewHref" : "https://www.googlecloudcommunity.com/", "description" : "The official home of Google Cloud and Workspace community forums, learning hub, and community blogs.", "id" : "qsqph94282", "shortTitle" : "Google Cloud Community", "title" : "Google Cloud Community", "nodeType" : "Community" } ] } }; LITHIUM.Components.RENDER_URL = "/gc/util/componentrenderpage/component-id/#{component-id}?render_behavior=raw"; LITHIUM.Components.ORIGINAL_PAGE_NAME = 'forums/v5/ForumTopicPage'; LITHIUM.Components.ORIGINAL_PAGE_ID = 'ForumTopicPage'; LITHIUM.Components.ORIGINAL_PAGE_CONTEXT = 'ZmNjTJlocDZCDD2v4qxJd_R1WZQrJRdAki77x6xc7dlRH9-sOVDiQBDIoc8UVGlaLpXgbG-LLGXMOqdwWdbgPhXT3EJKnWY1Uz7DHItz1PNRLnfl7gzJPtUtquN103kDH7YV2BYYQJNG_iQPHnh7NuI_NSM_1ToLxR_FXCgpusMmb0D5B_lxMHnNjSmmnfI0msvu4Z41zJSO_xUuS5zUo8oaH_CeNBoZfim_sjadWxBVug5Xsx2Y6dts7UNvmYfMKvuCwDqNvAkcXCFk1UQOY__Q9hm0QSuFViakQguzMW0k_vR-slFNG3LD8W4oqj07pAATTiEyrS5ZrNnjlLdtR1nTNwUzf8z20T7KWhO4zz8.'; LITHIUM.Css = { "BASE_DEFERRED_IMAGE" : "lia-deferred-image", "BASE_BUTTON" : "lia-button", "BASE_SPOILER_CONTAINER" : "lia-spoiler-container", "BASE_TABS_INACTIVE" : "lia-tabs-inactive", "BASE_TABS_ACTIVE" : "lia-tabs-active", "BASE_AJAX_REMOVE_HIGHLIGHT" : "lia-ajax-remove-highlight", "BASE_FEEDBACK_SCROLL_TO" : "lia-feedback-scroll-to", "BASE_FORM_FIELD_VALIDATING" : "lia-form-field-validating", "BASE_FORM_ERROR_TEXT" : "lia-form-error-text", "BASE_FEEDBACK_INLINE_ALERT" : "lia-panel-feedback-inline-alert", "BASE_BUTTON_OVERLAY" : "lia-button-overlay", "BASE_TABS_STANDARD" : "lia-tabs-standard", "BASE_AJAX_INDETERMINATE_LOADER_BAR" : "lia-ajax-indeterminate-loader-bar", "BASE_AJAX_SUCCESS_HIGHLIGHT" : "lia-ajax-success-highlight", "BASE_CONTENT" : "lia-content", "BASE_JS_HIDDEN" : "lia-js-hidden", "BASE_AJAX_LOADER_CONTENT_OVERLAY" : "lia-ajax-loader-content-overlay", "BASE_FORM_FIELD_SUCCESS" : "lia-form-field-success", "BASE_FORM_WARNING_TEXT" : "lia-form-warning-text", "BASE_FORM_FIELDSET_CONTENT_WRAPPER" : "lia-form-fieldset-content-wrapper", "BASE_AJAX_LOADER_OVERLAY_TYPE" : "lia-ajax-overlay-loader", "BASE_FORM_FIELD_ERROR" : "lia-form-field-error", "BASE_SPOILER_CONTENT" : "lia-spoiler-content", "BASE_FORM_SUBMITTING" : "lia-form-submitting", "BASE_EFFECT_HIGHLIGHT_START" : "lia-effect-highlight-start", "BASE_FORM_FIELD_ERROR_NO_FOCUS" : "lia-form-field-error-no-focus", "BASE_EFFECT_HIGHLIGHT_END" : "lia-effect-highlight-end", "BASE_SPOILER_LINK" : "lia-spoiler-link", "BASE_DISABLED" : "lia-link-disabled", "FACEBOOK_LOGOUT" : "lia-component-users-action-logout", "FACEBOOK_SWITCH_USER" : "lia-component-admin-action-switch-user", "BASE_FORM_FIELD_WARNING" : "lia-form-field-warning", "BASE_AJAX_LOADER_FEEDBACK" : "lia-ajax-loader-feedback", "BASE_AJAX_LOADER_OVERLAY" : "lia-ajax-loader-overlay", "BASE_LAZY_LOAD" : "lia-lazy-load" }; LITHIUM.noConflict = true; LITHIUM.useCheckOnline = false; LITHIUM.RenderedScripts = [ "jquery.lithium-selector-extensions.js", "jquery.position-toggle-1.0.js", "jquery.tokeninput-1.6.2.js", "MessageBodyDisplay.js", "jquery.delayToggle-1.0.js", "AjaxSupport.js", "InlineMessageReplyEditor.js", "jquery.hoverIntent-r6.js", "jquery.autocomplete.js", "plugin.js", "jquery.ui.resizable.js", "KeepSessionAlive.js", "en.js", "jquery.iframe-transport.js", "Tooltip.js", "plugin.js", "PartialRenderProxy.js", "LazyLoadComponent.js", "ElementQueries.js", "en.js", "Placeholder.js", "plugin.js", "en.js", "jquery.ui.mouse.js", "InlineMessageReplyContainer.js", "UserListActual.js", "ForceLithiumJQuery.js", "plugin.js", "en.js", "Video.js", "en.js", "jquery.tmpl-1.1.1.js", "LiModernizr.js", "plugin.js", "en.js", "en.js", "DropDownMenuVisibilityHandler.js", "OoyalaPlayer.js", "AjaxFeedback.js", "PolyfillsAll.js", "SearchAutoCompleteToggle.js", "AutoComplete.js", "DeferredImages.js", "EarlyEventCapture.js", "HelpIcon.js", "ProductsField.js", "plugin.js", "jquery.effects.core.js", "DropDownMenu.js", "CustomEvent.js", "Auth.js", "ResizeSensor.js", "plugin.js", "json2.js", "jquery.function-utils-1.0.js", "plugin.js", "Events.js", "jquery.appear-1.1.1.js", "aws-sdk.js", "jquery.clone-position-1.0.js", "api.js", "jquery.ui.position.js", "jquery.tools.tooltip-1.2.6.js", "MessageViewDisplay.js", "jquery.json-2.6.0.js", "en.js", "plugin.js", "plugin.js", "SearchForm.js", "Components.js", "jquery.ajax-cache-response-1.0.js", "jquery.ui.draggable.js", "jquery.lithium-toastmessage.js", "Text.js", "NoConflict.js", "plugin.js", "jquery.placeholder-2.0.7.js", "InputEditForm.js", "plugin.js", "plugin.js", "ReCaptchaV3.js", "jquery.ui.widget.js", "BlockEvents.js", "Lithium.js", "FieldSet.js", "jquery.iframe-shim-1.0.js", "Dialog.js", "TinyMceEditor.js", "TokenInputAutoComplete.js", "Namespace.js", "jquery.blockui.js", "Link.js", "Forms.js", "plugin.js", "jquery.ui.dialog.js", "plugin.js", "plugin.js", "Sandbox.js", "InformationBox.js", "Loader.js", "DataHandler.js", "plugin.js", "CookieBannerAlert.js", "plugin.js", "jquery.scrollTo.js", "ElementMethods.js", "plugin.js", "brightcove_uploader.js", "DynamicPager.js", "ThreadedDetailMessageList.js", "plugin.js", "en.js", "jquery.js", "ActiveCast3.js", "jquery.viewport-1.0.js", "jquery.ui.core.js", "prism.js", "plugin.js", "jquery.fileupload.js", "tinymce-patched.js", "theme.js", "jquery.css-data-1.0.js", "plugin.js", "Throttle.js", "MessageEditor.js", "InlineMessageEditor.js", "jquery.effects.slide.js", "SpoilerToggle.js", "en.js", "Globals.js", "Cache.js", "plugin.js" ];(function(){LITHIUM.AngularSupport=function(){function g(a,c){a=a||{};for(var b in c)"[object object]"===Object.prototype.toString.call(c[b])?a[b]=g(a[b],c[b]):a[b]=c[b];return a}var d,f,b={coreModule:"li.community",coreModuleDeps:[],noConflict:!0,bootstrapElementSelector:".lia-page .min-width .lia-content",bootstrapApp:!0,debugEnabled:!1,useCsp:!0,useNg2:!1},k=function(){var a;return function(b){a||(a=document.createElement("a"));a.href=b;return a.href}}();LITHIUM.Angular={};return{preventGlobals:LITHIUM.Globals.preventGlobals, restoreGlobals:LITHIUM.Globals.restoreGlobals,init:function(){var a=[],c=document.querySelector(b.bootstrapElementSelector);a.push(b.coreModule);b.customerModules&&0

Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Composite Entities on Df CX

Hi guys, I have recently seen the documentation of df cx related composite entities (entities made of another entities), somehow I didnt find how to create it or use it, the documentation lacks on this.

Can you guys guide me?

0 4 178
4 REPLIES 4

Hi @Mizar,

Welcome to Google Cloud Community!

You're right, the documentation for creating and using composite entities in Dialogflow CX is not very clear. It's more focused on how they behave when used, rather than how to build them.

Here's how to create and use composite entities in Dialogflow CX:

  1. Defining a Composite Entity:
  • You cannot directly create a composite entity within the Dialogflow CX interface. Instead, you define it within your agent's intent's parameter.
  • The entityType field in your parameter definition is where you define your composite entity.
  • This entityType field can be either a pre-built entity type or a custom entity type.
  1. Creating a composite entities:
  • Go to the Entities section of your agent.
  • Click on the "Create Entity" button.
  • Choose the "List" entity type.
  • Give your composite entity a name (e.g., flight).
  • In the entity entries, you'll define aliases that reference the sub-entities.

Once you've created your composite entity, you can use it in your intents just like any other entity. When the user provides input that matches the composite entity, Dialogflow will extract the values for the sub-entities and make them available in the intent parameters. 

For additional, you can also use this guideline in creating custom entities. 

I hope the above information is helpful.

@dawnberdan Can you show me screenshots of it? I have been checking on my own and im not getting it.

Hi @Mizar,

Unfortunately, Dialogflow CX doesn't provide a direct way to create composite entities within the interface or API. However, you can achieve the desired functionality through some workarounds:

1. Workaround: Using Regular Expressions and Entity Matching

  • Concept: You can utilize regular expressions and entity matching to simulate composite entity behavior.

  • Steps:

    1. Define Regular Expressions: Create regular expressions that match the desired patterns for your composite entity.

    2. Entity Matching: Use Dialogflow CX's built-in entity matching to identify the entities within the matched pattern.

    3. Extract Values: Extract the values from the matched entities and combine them as needed.

  • Example:

    • Address: Define a regular expression to match a street address format (e.g., "123 Main St, Anytown, CA 12345"). Use entity matching to identify the Street, City, State, and Zip Code entities.

  • Limitations: This approach requires you to define complex regular expressions and might not be as user-friendly as a dedicated composite entity feature.

2. Workaround: Using Multiple Entities and Context Management

  • Concept: You can represent composite entities using separate entities and manage the relationships between them through context and parameter values.

  • Steps:

    1. Create Separate Entities: Define entities for each component of your composite entity.

    2. Context Management: Use Dialogflow CX's context mechanism to manage the values extracted from these entities and maintain the relationship between them.

  • Example:

    • Address: Create separate entities for Street, City, State, and Zip Code. Set the values of these entities in context variables, and use them as needed in your flow.

  • Limitations: This approach can be more complex to manage than a dedicated composite entity feature.

Remember that Dialogflow is continually evolving. It's possible that a dedicated composite entity feature could be released in future updates.

I hope the above information is helpful.

  •  

Hi @dawnberdan many thanks for the clarification, I would like to see these explanations on the docs, I use everyday composite Entities on Df-Es to query multiple things within one phrase.

Let me wait some days to see if someone offers a different workaround, otherwise, you'll have the solution for this request. Many thanks for your time.