Share via


Entity registration for conversational language understanding integration

This article discusses adding conversational language understanding (CLU) entities to Copilot Studio agents. In most cases, you can use Copilot Studio prebuilt entities for your projects. To use CLU entities:

  • You can map CLU entities of the following data types directly to the corresponding prebuilt entities:

    • BooleanDatatype: Choice.Boolean
    • StringDatatype: Geography.Location, Regex, List, General.Event, General.Organization, IP Address, Person.Name, Phone Number, URL
    • NumberDatatype: Number

    Note

    Composite entities (entities with multiple components) map to StringDatatype.

  • For CLU entities with custom JSON resolutions, you can use sample JSON code to register these external entities with your agent. These entities resolve to complex data types. You can manually map CLU entities to Copilot Studio data types by copying and pasting JSON code blocks from this article for the relevant entity.

For more information, see Data types in the Power Fx documentation, and Supported prebuilt entity components in the Azure AI Language documentation.

Age

{
    "unit": "Year",
    "value": 10
}

Currency

{
    "unit": "Egyptian pound",
    "ISO4217": "EGP",
    "value": 30
}

Temperature

{
    "unit": "Fahrenheit",
    "value": 88
}

Ordinal

{
    "offset": "3",
    "relativeTo": "Start",
    "value": "3"
}

Dimensions

{
    "unit": "KilometersPerHour",
    "value": 24
}

Datetime entity types

Datetime is a special entity type that changes the returned resolution based on user input.

The following examples show how to define entities for different types of date and time utterances. Depending on the type of input you expect from users of your agent, you can create your own mappings, based on these examples.

Date

Example input: Jan 1st, 1995

{
    "dateTimeSubKind": "Date",
    "timex": "1995-01-01",
    "value": "1995-01-01"
}

DateTime (year)

Example input: I'll be back on April 12th

{
    "dateTimeSubKind": "Date",
    "timex": "XXXX-04-12",
    "value": "2022-04-12"
}

DatetimeRange (duration)

Example input: I'm out between 3 and 12 of Sept.

{
    "resolutionKind": "TemporalSpan",
    "timex": "(XXXX-09-03,XXXX-09-12,P9D)",
    "duration": "P9D",
    "begin": "2022-09-03",
    "end": "2022-09-12"
}

DatetimeRange (set)

Example input: Every Tuesday

{ 
    "resolutionKind": "DateTime",
    "dateTimeSubKind": "Set",
    "timex": "XXXX-WXX-2",
    "value": "not resolved"
}

Datetime (since)

Example input: I've been out since August

{
    "resolutionKind": "TemporalSpan",
    "timex": "XXXX-08",
    "begin": "2022-08-01",
    "modifier": "Since"
}

Time

Example input: It's half past seven o'clock

{
    "resolutionKind": "DateTime",
    "dateTimeSubKind": "Time",
    "timex": "T07:30",
    "value": "07:30:00"
}