'Dialogflow CX sys.date type not recognising "Morgen" (tomorrow in german)

The sys.date type in Dialogflow CX does not recognize the German word "Morgen" meaning (tomorrow) in English. The type recognizes "heute" (today), or even more complex phrases such as "der tag nach diesem tag" (the day after this day). But the simple phrase for tomorrow is not recognized.

The Dialogflow CX documentation clearly gives "Morgen" as an example. https://cloud.google.com/dialogflow/cx/docs/reference/system-entities#ex

Here is the response when using the word "Morgen" tomorrow.

{
  "advancedSettings": {
    "loggingSettings": {
      "enableInteractionLogging": true
    }
  },
  "currentPage": {
    "displayName": "Make Reservation",
    "name": "projects/voximplantdemo-pitfuc/locations/europe-west1/agents/7b4d24ce-e6cf-4544-8e6b-e60aaae4da64/flows/00000000-0000-0000-0000-000000000000/pages/4d3a19fa-05da-4da9-b74f-a8632122c4bd"
  },
  "diagnosticInfo": {
    "Execution Sequence": [
      {
        "Step 1": {
          "Type": "INITIAL_STATE",
          "InitialState": {
            "SessionParameters": {
              "persons": 2
            },
            "FlowState": {
              "FlowId": "00000000-0000-0000-0000-000000000000",
              "PageState": {
                "PageId": "4d3a19fa-05da-4da9-b74f-a8632122c4bd",
                "Status": "PROCESSING_FORM",
                "Name": "Make Reservation",
                "ActiveParameter": "Date",
                "FormFilled": false
              },
              "Name": "Default Start Flow",
              "Version": 0
            },
            "Event": "sys.no-match-default"
          }
        }
      },
      {
        "Step 2": {
          "StateMachine": {
            "FlowState": {
              "PageState": {
                "PageId": "4d3a19fa-05da-4da9-b74f-a8632122c4bd",
                "Status": "PROCESSING_FORM",
                "Name": "Make Reservation",
                "ActiveParameter": "Date",
                "FormFilled": false
              },
              "Version": 0,
              "Name": "Default Start Flow",
              "FlowId": "00000000-0000-0000-0000-000000000000"
            }
          },
          "FunctionExecution": {
            "Responses": [
              {
                "source": "VIRTUAL_AGENT",
                "responseType": "PARAMETER_PROMPT",
                "text": {
                  "text": [
                    "An welchem Tag soll die Reservierung sein?"
                  ],
                  "redactedText": [
                    "An welchem Tag soll die Reservierung sein?"
                  ]
                }
              }
            ]
          },
          "Type": "STATE_MACHINE"
        }
      }
    ],
    "Triggered Transition Names": [],
    "Session Id": "547317-d80-71c-9b5-c011d1263",
    "Alternative Matched Intents": [],
    "Transition Targets Chain": []
  },
  "formFillingInfo": {
    "entityType": "projects/-/locations/-/agents/-/entityTypes/sys.date",
    "parameter": "Date"
  },
  "intentDetectionConfidence": 0.3,
  "languageCode": "de",
  "match": {
    "confidence": 0.3,
    "event": "sys.no-match-default",
    "matchType": "NO_MATCH",
    "modelType": "MODEL_TYPE_STANDARD"
  },
  "parameters": {
    "persons": 2
  },
  "responseMessages": [
    {
      "responseType": "PARAMETER_PROMPT",
      "source": "VIRTUAL_AGENT",
      "text": {
        "redactedText": [
          "An welchem Tag soll die Reservierung sein?"
        ],
        "text": [
          "An welchem Tag soll die Reservierung sein?"
        ]
      }
    }
  ],
  "text": "Morgen"
}

Here is the response when using the more complex phrase "Der Tag nach diesm Tag" (the day after this day). In this case, it is recognized.

{
  "advancedSettings": {
    "loggingSettings": {
      "enableInteractionLogging": true
    }
  },
  "currentPage": {
    "displayName": "Make Reservation",
    "name": "projects/voximplantdemo-pitfuc/locations/europe-west1/agents/7b4d24ce-e6cf-4544-8e6b-e60aaae4da64/flows/00000000-0000-0000-0000-000000000000/pages/4d3a19fa-05da-4da9-b74f-a8632122c4bd"
  },
  "diagnosticInfo": {
    "Alternative Matched Intents": [
      {
        "Parameters": {
          "date": {
            "type": "@sys.date",
            "original": "tag nach diesem",
            "resolved": {
              "year": 2022,
              "day": 7,
              "month": 5
            }
          }
        },
        "Score": 0.30000001192092896,
        "Active": true,
        "Type": "NLU_SLOT"
      }
    ],
    "Transition Targets Chain": [],
    "Session Id": "547317-d80-71c-9b5-c011d1263",
    "Triggered Transition Names": [],
    "Execution Sequence": [
      {
        "Step 1": {
          "InitialState": {
            "MatchedIntent": {
              "Type": "NLU_SLOT",
              "Score": 0.30000001192092896,
              "Parameters": {
                "date": {
                  "original": "tag nach diesem",
                  "resolved": {
                    "month": 5,
                    "day": 7,
                    "year": 2022
                  },
                  "type": "@sys.date"
                }
              },
              "Active": true
            },
            "FlowState": {
              "Version": 0,
              "PageState": {
                "Name": "Make Reservation",
                "Status": "PROCESSING_FORM",
                "ActiveParameter": "Date",
                "FormFilled": false,
                "PageId": "4d3a19fa-05da-4da9-b74f-a8632122c4bd"
              },
              "FlowId": "00000000-0000-0000-0000-000000000000",
              "Name": "Default Start Flow"
            },
            "SessionParameters": {
              "date": {
                "year": 2022,
                "month": 5,
                "day": 7
              },
              "persons": 2
            }
          },
          "Type": "INITIAL_STATE"
        }
      },
      {
        "Step 2": {
          "Type": "STATE_MACHINE",
          "FunctionExecution": {
            "Responses": [
              {
                "responseType": "PARAMETER_PROMPT",
                "text": {
                  "redactedText": [
                    "Um wie viel Uhr würden sie gerne kommen? "
                  ],
                  "text": [
                    "Um wie viel Uhr würden sie gerne kommen? "
                  ]
                },
                "source": "VIRTUAL_AGENT"
              }
            ]
          },
          "StateMachine": {
            "FlowState": {
              "FlowId": "00000000-0000-0000-0000-000000000000",
              "Name": "Default Start Flow",
              "Version": 0,
              "PageState": {
                "ActiveParameter": "Time",
                "PageId": "4d3a19fa-05da-4da9-b74f-a8632122c4bd",
                "Status": "PROCESSING_FORM",
                "Name": "Make Reservation",
                "FormFilled": false
              }
            }
          }
        }
      }
    ]
  },
  "formFillingInfo": {
    "entityType": "projects/-/locations/-/agents/-/entityTypes/sys.time",
    "parameter": "Time"
  },
  "intentDetectionConfidence": 0.3,
  "languageCode": "de",
  "match": {
    "confidence": 0.3,
    "matchType": "PARAMETER_FILLING",
    "modelType": "MODEL_TYPE_STANDARD",
    "parameters": {
      "date": {
        "day": 7,
        "year": 2022,
        "month": 5
      }
    },
    "parametersOriginalValues": {
      "date": "tag nach diesem"
    },
    "resolvedInput": "der tag nach diesem tag"
  },
  "parameters": {
    "persons": 2,
    "date": {
      "month": 5,
      "day": 7,
      "year": 2022
    }
  },
  "responseMessages": [
    {
      "responseType": "PARAMETER_PROMPT",
      "source": "VIRTUAL_AGENT",
      "text": {
        "redactedText": [
          "Um wie viel Uhr würden sie gerne kommen? "
        ],
        "text": [
          "Um wie viel Uhr würden sie gerne kommen? "
        ]
      }
    }
  ],
  "text": "der tag nach diesem tag"
}

How can I get Dialogflow CX to also recognize "Morgen" (tomorrow) as a valid input for sys.date? It is very odd to me that all other ways of phrasing a date work, and that "Morgen" is even mentioned as an example in the official documentation. Am I missing something, or is this an issue of Dialogflow CX?



Solution 1:[1]

Have you tried using the @sys.date-time type instead of @sys.date? Although i'm not well known with the German language I've noticed that the @sys.date-time sometimes recognizes certain phrases better. See https://cloud.google.com/dialogflow/es/docs/reference/system-entities

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1