I am struggling to get consistent results in my testing when I provide a ‘name only’ response; for example:
bot: Hi there I am the BakerStreetBot - what mystery may I investigate for you?
user: I appear to have mislaid my spectacles
bot: oh dear! Please tell me your name and I can see what I can do to help
user: Sherlock Holmes
bot: Hi there I am the BaerStreetBot - what mystery may I investigate for you?
** this is wrong - it should have had a different response **
If I trained the bot in interactive or manually added ‘Sherlock Holmes’ as a response in my NLU.yml file it works fine - as does providing a more complete as as the user (for example: My name is Sherlock Holmes) - but whenever I introduce a new name I get the same behaviour as that exhibited above. Is this purely down to a lack of training examples?
…I’m using SPACY…
Thanks for any tips or advice.
loving being part of this community
I don’t know if that’s the best solution, but consider using a lookup table: person_name.yml (2.6 MB)
You can also make it into a form that will take the whole text as a response and save it in a slot.
- intent_name: None
- intent_name: None
Thanks @ChrisRahme I’ll give this a go!
Thanks again @ChrisRahme - I’m a newby here :-).
Just searching for how I would use such a yaml file… is there a link to where I will find this documented?
You just place the file anywhere in the
data folder (I create a
lookups folder inside of it).
person_name with the name of the entity (and slot), and that’s it. This is like if you gave the bot NLU examples with all the following names.
- lookup: person_name
You can read more about lookup tables here and here.
@ChrisRahme your solution also works for me, thanks a lot.
However, is there a way to use a lookup table from (for example) a txt file where each line represents a possible value of the entity?
I don’t think so… But if you want, I quickly wrote a script that does just transforms a text file into the appropriate YAML file. Just place it in the same folder as the text file.
txt_to_yml.py (546 Bytes)
Ohh, thanks a lot! I already did it yesterday haha.
I guess it should be nice to have an option to “attach” a txt file for a lookup.
Thanks a lot