What can I do to extract a date and time with CALM?
Right now what I’m trying is setting a text field with from_llm mapping type. I’m using the collect description to nudge the LLM to format it in hh:mm but that hasn’t been reliable even with GPT4. For example if the user says tomorrow night at 9pm I want it to extract 1 slot for date and 1 slot for time.
I know for the NLU approach there’s the duckling extractor but I need CALM for my use case. What are my options?
Hi
This sample project prepared by the Rasa team might have a solution for your case.
In the transfer_money.yml flow if the user declares that s/he wants the transfer to happen in the future the system gets the date, my understanding is that this is sorted by the LLM because of the description “Convert date to DD/MM/YYYY format” and it seems to give consistent results. Give the LLM instructions this way.
collect: payment_date
description: the future payment date of the money transfer. Convert date to DD/MM/YYYY format
Study this project and how it does it, or you can probably prepare a custom Python action which manually sends the users’ input to the LLM using the OpenAI API and with specific instructions. I hope it helps.