I am trying to create a new custom Conversational BOT using the go_bot, my new bot is a banking helper bot which interacts with the user, fulfil their requests as “giving the bank account details” after authenticating them “for authentication I used mobile number registered with the bank accounts”.
The bot should be something like this,
In the example above, the bot takes the mobile number , confirms it and fetches the details from the db using the mobile number as primary key to give the account balance.
As I am new to deeppavlov, I dont know how to proceed, for the mean while I am creating a dataset similar to the “simple-dstc2-trn.json” used in go_bot, something like this,
I also understood the end-to-end working of the go_bot, like prepare dataset, train a slotfiller model & a bot model. But I am not sure will this work or not.
Any help to me for how to proceed further will be appreciated.
Thanks in advance.
You should replace simple-dstc2-trn.txt with your training data, simple-dstc2-val.json with validation data and simple-dstc2-tst.txt with test data.
Check that DatasetIterator outputs similar data sctructures for your dataset as for DSTC2 dataset.
Then build slot filler. Slot filler used in the tutorial only supports slots with finite number of slot values. You can build your own slot_vals.json, where values are all possible number values, or use neural network based slot filler instead.
Hello,
I have solved the error and its working now. Thanks for your support @vimary .
Now the bot is working end-to-end, and giving responses. I have a problem in api_call with the database. I have defined two slots (“mobile” & “account_type”), but the bot is not identifying the slot value of “mobile” if its an integer values, e.g. {“mobile” : “9514188759”} and the api call is only happening taking “account_type” with it.
I am getting this: 2019-09-16 15:11:06.138 INFO in ‘deeppavlov.models.go_bot.network’[‘network’] at line 485: Made api_call with {‘account_type’: ‘savings’}, got 2 results.
But on the other hand if i change the value of slot “mobile” to any string say “mine”, e.g. {“mobile” : “mine”}, then the bot is actually taking both the slots on API_CALL.
And I am getting this: 2019-09-16 15:41:45.634 INFO in ‘deeppavlov.models.go_bot.network’[‘network’] at line 485: Made api_call with {‘account_type’: ‘savings’, ‘mobile’: ‘mine’}, got 1 results.
which is needed.
Please help me in resolving this issue, like how can I make it work with the int values inside " " as a slot value.
Yes, I have slot values defined in slot_vals.json , something like this:
I need to know, whether anything is there in the db reading module or slot matching module that it only reads or recognises string(str) datatypes such as “food”: { “caribbean”: [“carraibean”,“carribean”, “caribbean”], “kosher”: [ “kosher” ], “french”: [ “french” ] }, but doesn’t identifies {“mobile”: “8680924286”} ?
Or simply its a training problem, as I am supplying very small training data set ?
slotfill_raw can only recognize slot values that are present in slot_vals.json file. If that’s not the case, then it should be train data size that is too small. Try to increase training data for the mobile slot. Numbers as slot values should work fine.
Thanks for your response, but I don’t think so its only the problem of too small training data.
As I have increased the data and tried re-training the bot. But the problem remains same.
For e.g.,
if i supply mobile slot value as int “9415188759” , the api call doesn’t includes the mobile slot and only includes the account_type slot which is having a value “savings”.
After giving the account type value as “savings”, the api call is made and fetches 3 results and giving the top result as reply.
I have 3 records in my db, with “savings” account type but they have unique “mobile”, as the api call is only working with slot account_type, that why getting all 3 results with “savings” account_type.
This how my db is:
But, on the other hand if i try to give mobile slot value as “kia” (which is saved in db), the api call consists of both the slots , i.e, account_type & mobile and the queried result will exactly be 1 matching with both the slot values.
This made me to think that, may be the slotvalue+api_call is only working with the characters not with the integers or numbers, even after defining the slot values in slot_vals.json. May be the module code is written to match only character datatypes only.
Also for reference, this is my slot_vals.json file,
GoBot uses spacy_tokenizer model which by default filters non alpha words.
Set tokenizer’s parameter alphas_only to False, then all numeric slot values should be recognized.
It downloads the data only when the paths for some portion of data are missing. So you can feed it with your dataset by placing and naming trn, tst and val files to mimick the downloaded ones.