GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Navigating the Kore.ai XO Platform
Building a Virtual Assistant
Help & Learning Resources
Release Notes
Current Version
Recent Updates
Previous Versions
Deprecations
Request a Feature
CONCEPTS
Design
Storyboard
Overview
FAQs
Conversation Designer
Overview
Dialog Tasks
Mock Scenes
Dialog Tasks
Overview
Navigate Dialog Tasks
Build Dialog Tasks
Node Types
Overview
Intent Node
Dialog Node
Dynamic Intent Node
GenAI Node
GenAI Prompt
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Process Node
Agent Transfer
Node Connections
Node Connections Setup
Sub-Intent Scoping
Entity Types
Entity Rules
User Prompts or Messages
Voice Call Properties
Knowledge AI
Introduction
Knowledge Graph
Introduction
Terminology
Build a Knowledge Graph
Manage FAQs
Knowledge Extraction
Import or Export Knowledge Graph
Prepare Data for Import
Importing Knowledge Graph
Exporting Knowledge Graph
Auto-Generate Knowledge Graph
Knowledge Graph Analysis
Answer from Documents
Alert Tasks
Small Talk
Digital Skills
Overview
Digital Forms
Digital Views
Introduction
Widgets
Panels
Session and Context Variables
Context Object
Intent Discovery
Train
NLP Optimization
ML Engine
Overview
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
Training Validations
NLP Configurations
NLP Guidelines
LLM and Generative AI
Introduction
LLM Integration
Kore.ai XO GPT Module
Prompts & Requests Library
Co-Pilot Features
Dynamic Conversations Features
Intelligence
Introduction
Event Handlers
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Conversation Driven Dialog Builder
Sentinment Management
Tone Analysis
Default Standard Responses
Ignore Words & Field Memory
Test & Debug
Overview
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
Conversation Testing Overview
Create a Test Suite
Test Editor
Test Case Assertion
Test Case Execution Summary
Glossary
Health and Monitoring
NLP Health
Flow Health
Integrations
Actions
Actions Overview
Asana
Configure
Templates
Azure OpenAI
Configure
Templates
BambooHR
Configure
Templates
Bitly
Configure
Templates
Confluence
Configure
Templates
DHL
Configure
Templates
Freshdesk
Configure
Templates
Freshservice
Configure
Templates
Google Maps
Configure
Templates
Here
Configure
Templates
HubSpot
Configure
Templates
JIRA
Configure
Templates
Microsoft Graph
Configure
Templates
Open AI
Configure
Templates
Salesforce
Configure
Templates
ServiceNow
Configure
Templates
Stripe
Configure
Templates
Shopify
Configure
Templates
Twilio
Configure
Templates
Zendesk
Configure
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
NiceInContact(User Hub)
Salesforce
ServiceNow
Configure Tokyo and Lower versions
Configure Utah and Higher versions
Unblu
External NLU Adapters
Overview
Dialogflow Engine
Test and Debug
Deploy
Channels
Publishing
Versioning
Analyze
Introduction
Dashboard Filters
Overview Dashboard
Conversations Dashboard
Users Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Custom Meta Tags
Create Custom Dashboard
Create Custom Dashboard Filters
LLM and Generative AI Logs
NLP Insights
Task Execution Logs
Conversations History
Conversation Flows
Conversation Insights
Feedback Analytics
Usage Metrics
Containment Metrics
Universal Bots
Introduction
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Store
Manage Assistant
Team Collaboration
Plan & Usage
Overview
Usage Plans
Templates
Support Plans
Invoices
Authorization
Conversation Sessions
Multilingual Virtual Assistants
Get Started
Supported Components & Features
Manage Languages
Manage Translation Services
Multiingual Virtual Assistant Behavior
Feedback Survey
Masking PII Details
Variables
Collections
IVR Settings
General Settings
Assistant Management
Manage Namespace
Data
Overview
Data Table
Table Views
App Definitions
Data as Service
HOW TOs
Build a Travel Planning Assistant
Travel Assistant Overview
Create a Travel Virtual Assistant
Design Conversation Skills
Create an ‘Update Booking’ Task
Create a Change Flight Task
Build a Knowledge Graph
Schedule a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Train the Assistant
Use Traits
Use Patterns
Manage Context Switching
Deploy the Assistant
Use Bot Functions
Use Content Variables
Use Global Variables
Use Web SDK
Build a Banking Assistant
Design Conversation Skills
Create a Sample Banking Assistant
Create a Transfer Funds Task
Create a Update Balance Task
Create a Knowledge Graph
Set Up a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Add Data to Data Tables
Update Data in Data Tables
Add Data from Digital Forms
Train the Assistant
Composite Entities
Use Traits
Use Patterns for Intents & Entities
Manage Context Switching
Deploy the Assistant
Configure an Agent Transfer
Use Assistant Functions
Use Content Variables
Use Global Variables
Intent Scoping using Group Node
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters
Migrate External Bots
Google Dialogflow Bot
APIs & SDKs
API Reference
API Introduction
Rate Limits
API List
koreUtil Libraries
SDK Reference
SDK Introduction
SDK Security
SDK Registration
Web Socket Connect and RTM
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
SDK Functions
SDK Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
Widget SDK Tutorial
Web SDK Tutorial
ADMINISTRATION
Introduction to Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Data Tables and Views
Assistant Management
Enrollment
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Control
Using Single-Sign On (SSO)
Two-Factor Authentication (2FA)
Security Settings
Cloud Connector
Analytics
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. Builder
  5. Dialog Task
  6. Working with Composite Entities

Working with Composite Entities

Introduction & Use Case 

Composite Entities help you capture multiple entity values in a user utterance. These multiple entity values are optional and come in any order in the user utterance.

Let us consider the below example.

A travel agency receives a typical request, which can be of the form:

I am interested in traveling tomorrow from LA to NYC, first class, and I want a window seat.

In such a query, the Virtual Assistant needs to process information such as: travel date, departure city, arrival city, flight class and seat preference, in order to respond to this enquiry.

Each of these multiple values or details come from different independent entities. Composite Entities enable you to combine these independent entities or sub-entities.

How it Works?

When a composite entity reaches the dialog flow:

  • If the input is received as a JSON object, the input JSON object is added to the Context object under the corresponding entity without any analysis.
  • If the input is received as a text input
    • All the possible sub-entities from the defined composite entity patterns are identified.
    • All possible instances of those sub-entities are located in the user utterance and the location recorded.
    • The composite entity patterns are then evaluated to identify the specific pattern that matches the set of sub-entity instances captured.

    i.e. the composite entity pattern is not used to identify the sub-entities but to match the entire pattern.

Composite Entity Patterns

These patterns help you to establish the relationship between the sub-entities. Sub-entities are included in the composite entity using the @ tag, i.e.,@subentity in the composite entity pattern. These sub-entities must be pre-defined and should not be part of the current dialog flow. The sub-entities come from other Dialog Tasks too.

Various patterns like AND, OR, etc,. are built similar to the ones used in defining Entity Patterns (refer here for more).

The Composite Entity values take the form of a JSON object wherein the sub-entities are referenced as properties of that object, i.e. to access a sub-entity value, you can use: {{context.entities.<<composite_entity>>.<<sub_entity>> }}

You can access each of the sub-entities using the structure they are defined with, as they are accessed when used independently of the composite entity. For example, if the sub-entity is of the type Airport, then one can access the airport name as follows: {{context.entities.<<composite_entity>>.<<sub_entity>>.AirportName }}

 

Create a Composite Entity

Building a composite entity involves the following steps:

  1. Create sub-entities
  2. Establish a relationship between these sub-entities.[/vc_column_text]

Create Sub-Entities

Since the Composite Entity is a combination of other entities, you need to build individual entities in the dialog task. To capture the Flight Information from the above example, you must create sub-entities that capture the required details. Here is a sample mapping of sub-entities for a primary entity called Flight , for which we create a few sub-entities to capture relevant information:

ENTITY ENTITY TYPE
Travel Date Date: To capture the travel date from the user utterance. The VA recognizes dates automatically.
Departure City List of Items: To capture the name of the departure city  from the user utterance. As a developer, you must build this list in the entity.
Arrival City  List of Items: To capture the name of the arrival city from the user utterance. As a developer, you must build this list in the entity.
Class  List of items: : To capture the flight class from the user utterance. As a developer, you must build this list in the entity. 
Seat Preference List of items: To capture the seat preference from the user. As a developer, you need to build the list in the entity. 
Note: Sub-entities can only be combined into a composite entity and are recommended not to use for any other purpose in the dialog task. If you are creating sub-entities in the current dialog task, remove all transitions to these sub-entities, so that they are not a part of the dialog task flow.

 

Define a Composite Entity

Add a Composite Entity after a relevant node in the dialog task. To make this entity capture multiple entity values, you need to create Composite Patterns. To create, follow the below steps:

  1. On the Entity window, click the NLP Properties tab.
  2. On the NLP Properties tab, under the Composite Patterns for Entity section, add relevant patterns. The various patterns built are similar to the ones used in defining Entity Patterns (refer here for more).

    For the above composite entity patterns, the following are the sample utterances and the output:
Sample Utterance Corresponding Pattern Output
I want to fly from LA to NY tomorrow, first class with a window seat. @departurecity @arrivalcity @traveldate @class @seatpreference
"
"Flight": {
"Departure": "LA",
"Arrival": "NYC", "Date": tomorrow,
"class": 1,"Seatpreference": Window,
}
}

You can also define the Synonyms and Patterns as with any other entity.

 

Limitations

  • The Sub-entity with Description cannot be part of a composite entity.
  • Make sure that the sub-entities are not part of the dialog flow in the task using the composite entity.
  • If the sub-entity allows multi-items, the parent composite entity accepts only one value for the sub-entity and not a list.

Passing Values

You can pass values to composite entities using the entity pre-assignment from source Dialog tasks, refer here for more on entity pre-assignment.

In terms of composite entities following scenarios can be addressed:

  1. From composite to standard entity: Works as long as the target is of the same entity type as the one used in the source composite.
    For example, context.entities.targetMyCity = context.entities.sourceComposite.sourceTravelCity
  2. From composite to composite: As long as the target is of the same entity type as the one used in the source composite.
    For example, context.entities.sourceComposite.destinationCity = context.entities.targetCompsite.myCity
  3. From standard to composite: As long as the target is of the same entity type as the one used in the source composite.
    For example, context.entities.targetCompsite.myCity = context.entities.sourceCity

Post v8.0.07, you can use the Entity Pre-Assignments and Entity Post-Assignments from the Dialog Node, Instance Properties as shown in the image below (the numbers in the below image correspond to the number in the above use case):

JSON Object for Composite Entity

In v8.0 of the platform, the Composite Entity is enhanced to handle the JSON object as input. This helps in handling the scenarios where the enabled channels send data as a JSON object. For example, MS Teams and Cisco Spark channels. The user input received from these channels is stored as a JSON object in the Context object under the respective composite entity name.

To enable the composite entity to handle JSON object data, do not add any Patterns from the NLP Properties tab.

Previous
Entity Node

 

Working with Composite Entities

Introduction & Use Case 

Composite Entities help you capture multiple entity values in a user utterance. These multiple entity values are optional and come in any order in the user utterance.

Let us consider the below example.

A travel agency receives a typical request, which can be of the form:

I am interested in traveling tomorrow from LA to NYC, first class, and I want a window seat.

In such a query, the Virtual Assistant needs to process information such as: travel date, departure city, arrival city, flight class and seat preference, in order to respond to this enquiry.

Each of these multiple values or details come from different independent entities. Composite Entities enable you to combine these independent entities or sub-entities.

How it Works?

When a composite entity reaches the dialog flow:

  • If the input is received as a JSON object, the input JSON object is added to the Context object under the corresponding entity without any analysis.
  • If the input is received as a text input
    • All the possible sub-entities from the defined composite entity patterns are identified.
    • All possible instances of those sub-entities are located in the user utterance and the location recorded.
    • The composite entity patterns are then evaluated to identify the specific pattern that matches the set of sub-entity instances captured.

    i.e. the composite entity pattern is not used to identify the sub-entities but to match the entire pattern.

Composite Entity Patterns

These patterns help you to establish the relationship between the sub-entities. Sub-entities are included in the composite entity using the @ tag, i.e.,@subentity in the composite entity pattern. These sub-entities must be pre-defined and should not be part of the current dialog flow. The sub-entities come from other Dialog Tasks too.

Various patterns like AND, OR, etc,. are built similar to the ones used in defining Entity Patterns (refer here for more).

The Composite Entity values take the form of a JSON object wherein the sub-entities are referenced as properties of that object, i.e. to access a sub-entity value, you can use: {{context.entities.<<composite_entity>>.<<sub_entity>> }}

You can access each of the sub-entities using the structure they are defined with, as they are accessed when used independently of the composite entity. For example, if the sub-entity is of the type Airport, then one can access the airport name as follows: {{context.entities.<<composite_entity>>.<<sub_entity>>.AirportName }}

 

Create a Composite Entity

Building a composite entity involves the following steps:

  1. Create sub-entities
  2. Establish a relationship between these sub-entities.[/vc_column_text]

Create Sub-Entities

Since the Composite Entity is a combination of other entities, you need to build individual entities in the dialog task. To capture the Flight Information from the above example, you must create sub-entities that capture the required details. Here is a sample mapping of sub-entities for a primary entity called Flight , for which we create a few sub-entities to capture relevant information:

ENTITY ENTITY TYPE
Travel Date Date: To capture the travel date from the user utterance. The VA recognizes dates automatically.
Departure City List of Items: To capture the name of the departure city  from the user utterance. As a developer, you must build this list in the entity.
Arrival City  List of Items: To capture the name of the arrival city from the user utterance. As a developer, you must build this list in the entity.
Class  List of items: : To capture the flight class from the user utterance. As a developer, you must build this list in the entity. 
Seat Preference List of items: To capture the seat preference from the user. As a developer, you need to build the list in the entity. 
Note: Sub-entities can only be combined into a composite entity and are recommended not to use for any other purpose in the dialog task. If you are creating sub-entities in the current dialog task, remove all transitions to these sub-entities, so that they are not a part of the dialog task flow.

 

Define a Composite Entity

Add a Composite Entity after a relevant node in the dialog task. To make this entity capture multiple entity values, you need to create Composite Patterns. To create, follow the below steps:

  1. On the Entity window, click the NLP Properties tab.
  2. On the NLP Properties tab, under the Composite Patterns for Entity section, add relevant patterns. The various patterns built are similar to the ones used in defining Entity Patterns (refer here for more).

    For the above composite entity patterns, the following are the sample utterances and the output:
Sample Utterance Corresponding Pattern Output
I want to fly from LA to NY tomorrow, first class with a window seat. @departurecity @arrivalcity @traveldate @class @seatpreference
"
"Flight": {
"Departure": "LA",
"Arrival": "NYC", "Date": tomorrow,
"class": 1,"Seatpreference": Window,
}
}

You can also define the Synonyms and Patterns as with any other entity.

 

Limitations

  • The Sub-entity with Description cannot be part of a composite entity.
  • Make sure that the sub-entities are not part of the dialog flow in the task using the composite entity.
  • If the sub-entity allows multi-items, the parent composite entity accepts only one value for the sub-entity and not a list.

Passing Values

You can pass values to composite entities using the entity pre-assignment from source Dialog tasks, refer here for more on entity pre-assignment.

In terms of composite entities following scenarios can be addressed:

  1. From composite to standard entity: Works as long as the target is of the same entity type as the one used in the source composite.
    For example, context.entities.targetMyCity = context.entities.sourceComposite.sourceTravelCity
  2. From composite to composite: As long as the target is of the same entity type as the one used in the source composite.
    For example, context.entities.sourceComposite.destinationCity = context.entities.targetCompsite.myCity
  3. From standard to composite: As long as the target is of the same entity type as the one used in the source composite.
    For example, context.entities.targetCompsite.myCity = context.entities.sourceCity

Post v8.0.07, you can use the Entity Pre-Assignments and Entity Post-Assignments from the Dialog Node, Instance Properties as shown in the image below (the numbers in the below image correspond to the number in the above use case):

JSON Object for Composite Entity

In v8.0 of the platform, the Composite Entity is enhanced to handle the JSON object as input. This helps in handling the scenarios where the enabled channels send data as a JSON object. For example, MS Teams and Cisco Spark channels. The user input received from these channels is stored as a JSON object in the Context object under the respective composite entity name.

To enable the composite entity to handle JSON object data, do not add any Patterns from the NLP Properties tab.

Previous
Entity Node

 

Menu