Originally published in the Oracle digital assistant blog
One way or the other, most of the things we do in conversations revolve around dates and times:
“I want to book a vacation in July 2023”
“Add a team meeting to my calendar for June 10, 2023, at 10 am and repeat every month until December 2030″
“What is the status of my orders from last month”.
While conversational AI makes it easy to understand the intent of a request (e.g., understanding a request for a vacation booking), extracting and understanding date and time information is often not that easy.
With the new DATE_TIME entity built into Oracle Digital Assistant 22.08, Oracle Digital Assistant offers a machine learning-based solution that not only outperforms the previous DATE, TIME, SET, and DURATION entities but also replaces them.
New skills created in Release 22.08 will not contain the DATE, TIME, DURATION, and SET system entities. Existing skills upgraded to 22.08 will continue to support these legacy system entities, though there may be some behavior changes.
The DATE_TIME Hierarchy
This entity is a complex entity in the sense it is able to extract multiple types of date and time related information. It is built in a hierarchical structure with subtypes and nested items.
With the DATE_TIME entity, you choose a specific subtype to define what information to gather. The following table shows which subtype to use for each possible scenario and links to information about the attributes for each subtype.
Test Utterances
With release 22.10 we have the ability to see the different date time subtypes in the utterance tester. Previously everything was labeled as DATE_TIME and we had to inspect the payload to see the actual extraction subtype.
DATE_TIME as variable type
If we add DATE_TIME system entity to an intent we will need to define a variable of DATE_TIME subtype to prompt users at runtime.
This approach does require the DATE_TIME entity to be associated with the resolving intent and it also requires a “ResolveEntity” state template to resolve it.
DATE_TIME in composite bag entities
When using DATE_TIME entities in a composite bag, the entire configuration will be done inside the bag item, which obviously brings as well other properties we can use to control the entity behavior.
The below example shows a simple subtype – Date.
The above implementation will only extract Date(s).
DATE_TIME in composite bag entities
When we make use of some complex subtypes – like Interval – , there are some Nested Bag Items that compose the subtype and we also get also the ability to choose which items to Prompt for.
When we run this, it becomes clear how easy it is to extract potentially complex information that describes the request to create a meeting.
Ambiguity resolution rules
This is extremely helpful to define the temporal direction. In some use cases we have clear temporal direction:
- create a meeting -> FUTURE
- create expense report -> PAST
Documentation
For more information check the latest DATE_TIME documentation.