Intent not being detected

Hello,

Here’s part of the code for nlu.yml

code
- regex: ent_img
  examples: |
    - ["[a-zA-Z]"]
- intent: int_add_img
  examples: |
    - Show image [A]{"entity": "ent_img"}  
    - Show image [B]{"entity": "ent_img"}  
    - Show image [C]{"entity": "ent_img"}  
    - Show image [D]{"entity": "ent_img"}  
    - Show image [E]{"entity": "ent_img"}  
    - Show image [F]{"entity": "ent_img"}  
    - Show image [G]{"entity": "ent_img"}  
    - Show image [H]{"entity": "ent_img"}  
    - Show image [I]{"entity": "ent_img"}  
    - Show image [J]{"entity": "ent_img"}  

From my understanding, after providing the model with many examples and training it, it should understand that typing “Show image Z” should display the image with the name Z.

However, it works only on the examples defined in the nlu, so I have to add every single case.

Please suggest a solution and let me know if more info is needed.

Thank you.

Hi @dse,

You need to add variations of asking the query, Like

  • Show image
  • Can you show me the image
  • Display the image
  • Give me the image

Etc Since you only have one format of asking, It becomes hard for model to detect other queries as it has not seen other formats.

Thank you for your answer.

My question is detected by adding variations, however, my problem is with detecting the entity.

I want to be able to detect an entity that is not defined in the NLU in the code below.

For example, writing “show image E” should register E as an entity, just like it did for A, B and C.

code
- regex: ent_img
  examples: |
    - ["[a-zA-Z]"]
- intent: int_add_img
  examples: |
    - Show image [A]{"entity": "ent_img"}  
    - Show me an image of [B]{"entity": "ent_img"}  
    - I want to see the image [C]{"entity": "ent_img"}  

Thank you.