2
votes

In watson conversation dialog I have created a condition; something like

if $stored_state == @states:(Florida) AND $preferred_joint == @joint:(KFC)
then some response

where $stored_state is a context variable, which was stored at a previous node from user input. Same goes for $preferred_joint. @states and @joint are just two entities with fuzzy matching. But condition like this never works. I also tried to use @states:(Florida) entity after converting it to a context variable. But still doesn't work.

Now, what do I do wrong there? Is there any way to compare context variable with entity?

1
Isn't @states:(Florida) a predicate on its own? - data_henrik
yes, I believe it is. But I need to check stored_state in any later node,@states:(Florida) just one single case. - x4h1d
You want something like if @states:(Florida) AND $stored_state==Florida .... - data_henrik
This didn't solve the problem. Though, I found a workaround. if $stored_state == 'Florida' AND $preferred_joint == 'KFC'. Thanks for the tip. Still waiting for a solution. - x4h1d

1 Answers

1
votes

Just to confirm, you want to check if the entity that the user just said at the last input matches what you had stored in your context?

You can use an AND condition for this right? @states: 'Florida' && $stored_state == 'Florida'

This is declaring that the user just said the state florida, and the stored context variable is also florida.