wit-ai / wit

Natural Language Interface for apps and devices
https://wit.ai/
936 stars 91 forks source link

Wrong Entity role with "Keywords" lookup strategy #2617

Closed adamlaszlo91 closed 1 year ago

adamlaszlo91 commented 1 year ago

Do you want to request a feature, report a bug, or ask a question about wit? bug

What is the current behavior? When an Entity is created, choosing the "Keywords" lookup strategy makes the role recognition always return the first Role as a result. The results can even oppose the training data. When the "Free Text & Keywords" stragegy is selected, the Role is determined correctly.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  1. Create a new Intent
  2. Create a new custom Entity with "Keywords" lookup strategy (input any keyword) and two Roles
  3. Add 2 Utterances for the created Intent, include the two Entity Roles (1 Role for 1 Utterance)
  4. Use the /message endpoint and see that the result returns the first Role of the Entity in both cases
  5. Change the lookup strategy to "Free Text & Keywords" and repeat the test

What is the expected behavior? The expected behavior is to correctly determine the Role with both lookup strategies.

If applicable, what is the App ID where you are experiencing this issue? If you do not provide this, we cannot help. Here is a test app: 733274631811663 It contains 2 Intents, one for each Utterance, but it does not interfere.

maidaneze commented 1 year ago

Thanks for reporting this issue. We are going to look into it.

patapizza commented 1 year ago

Roles require a free-text lookup strategy. They don't work with keywords-only entities.

adamlaszlo91 commented 1 year ago

Roles require a free-text lookup strategy. They don't work with keywords-only entities.

I see. In this case it would be helpful to either disable the option, or clearly communicate that it is there, but not working.