Rasa Regex string

Hi,

I am working on a chatbot which searches for a product in my db. I am facing a couple of issues:

  1. The object_name is not identified at all no matter how many data sentences i provide. Instead of providing a lookup is there a better solution for identifying name as an entity and store it in the slot?

  2. I need to query the id, in which case the id can be anything like: numeric or something like 393* or 393? or 3?3 (regex format). i need to store this in my slot. The slot type given is text.

I provided around 30-40 sentences as examples

My regex is given as :

regex:item_id

  • [0-9][?]{0,1}[0-9]{0,}

please provide help on this soon.

Training data(nlu.md):

intent: itemidsearch

  • could u see items with item id 25631
  • Find items with item id 15
  • Find items with id 15
  • Find items with item id = 1225
  • Find items with item id : 00015
  • I am looking for items with 20055
  • Search for items with id 000040
  • Show me items with id 26536
  • Show me items with id 000654
  • Can I see items with id 65342
  • I am looking for items with id : 20055
  • Search for items with id = 00004?
  • Show me items with item id : 26536
  • Show me items with item_id 000654
  • Show me items with id
  • show me item with id
  • Can I see items where id is 6534?
  • Can I see items whoes id 25631
  • Show me items with item id 26536
  • Show me items with id 000654
  • Can I see items with item id 65342
  • Can I see items with id
  • Can I see item with item id
  • could u see items with item id 25*
  • Find items with item id 1*
  • Find items with id *
  • Find items with item id = 122*
  • Find items with item id : 000*
  • I am looking for items with 20*
  • Search for items with id 00*
  • Show me items with id 2653*
  • Show me items with id 000*
  • Can I see items with id 65*
  • I am looking for items with id : 20594030*
  • Search for items with id = 00004*
  • Show me items with item id : 265*
  • Show me items with item_id 0*
  • Can I see items where id is 653*
  • Can I see items whoes id 256*
  • Show me items with item id 26*
  • Show me items with id 0006*
  • Can I see items with item id 6*

I have tried using both the pipelines: spacy sklearn and tensorflow.

1 Like

I am facing the same issue. Regex entities are not being identified.

Any improvements here? How did you guys manage to get it working?

I don’t understand what is the actual problem

@Ghostvv I think he want to pass item_id as something like a parameter to his story for querying db in the backend.
use ActionForm and configure slot_mappings and write a custom_validation for slot could help…

just remember set return to self.from_text(intent = None) could help…

def slot_mappings(self): 
    return { "name": self.from_text(intent=None)}

@manpreetkaurm There is a nice blog from Justina Petraityte about this topic. hope this can help you.