Search code examples
memorynlpchatbotsap-conversational-ai

Memory does not refresh automatically in Recast.AI


I have created a entity called #USER-NAME and have set that as a requirement.

Now, for the first time when the entity is detected in the conversation - say, "I am John" , then the memory is set to John. On subsequent encounter of the same entity with different value - "I am Dave", the memory remains unchanged.

I have seen the edit memory option, which provides 1. reset memory 2. set to a value . For the option 2, it does not provide a way to set to the value of #USER-NAME, instead only provides option to enter static values.

How can I update the memory every time the value of the entity changes ??

EDIT

Hi, I am attaching some screenshots to show what's exactly going wrong.

  1. I have a Entity named '#USER_NAME' that saves the user name in a memory variable .

  2. I make the following conversation - Conversation

  3. The JSON payload after the conversation is as follows. This works perfectly- Response1

  4. I update the conversation again by providing a new user name. Conversation 2

  5. This triggers the entity just fine. You can see the entity being detected properly. Entity

  6. However, the memory value remains the same. memory

What I wanted was the memory variable to replace 'Dev' with 'John'.


Solution

  • Remember that:

    memory <> Intent

    You can set memory in the message section or update automatically using for example a requirement in this case every time the skill is trigged it will replace the value in the memory ID

    EDIT: Because the set memory field expect a JSON you can't use memory as you want, but if you reset that memory ID shomewhere relevant in the chat (in my sample I delete it right after saying Hi XXX) so when the skill is trigged again it will "replace" it with the new value

    In the Requirement I set the golden entity #Person to variable "name" and if is missing I ask her name.

    Sample Image