Parsing complex entities via Dialog Flow CX?

106 Views Asked by At

Dialog Flow is pretty decent at extracting date and time entities, even ranges(periods). The problem we are running into is when multiple combinations of date and time ranges are mentioned during the conversation.

For example - If a user says, I'd like to schedule a meeting, and my availability is Monday - Wednesday 9am - 11am or Friday - Saturday 1 - 3pm. Out of the box, Dialog Flow would have a date-period list, with the Monday - Wednesday as one object, and another for Friday - Saturday. Separately, it will have the time periods as well in a list object. The problem is - there is no way to tie the correct date periods with the time periods.

I've considered making custom entities that tie date period with time and time periods, which would solve this scenario, but not scenarios where a user goes on to list out an array of times instead.

What would be ideal is if Dialog Flow layered in an LLM to parse more complex entities into custom objects.

Any ideas to solve this and similar issues?

1

There are 1 best solutions below

0
On

In my opinion this is more a Conversational Design issue than a technical issue.

What I would suggest is to split getting the information in multiple steps. You can also use the parameter fulfilling in Dialogflow CX for all those parameters that are missing.

If you want to use the LLM way, you can have an intent with an entity type @sys.any and then send that entity value to a Generator: https://cloud.google.com/dialogflow/cx/docs/concept/generators so you can do that extraction. If you don't want to use a generator and use another LLM, you can always call a webhook and do that extraction there using another LLM Model.

Check the entity type @sys.any: https://cloud.google.com/dialogflow/cx/docs/reference/system-entities

In my opinion, I will recommend fixing it by having a better conversation design rather than using an LLM. You can see dialogflow CX pre-built components as well to get some examples: https://cloud.google.com/dialogflow/cx/docs/concept/prebuilt-component