codeforequity-at / botium-samples-nlpanalytics

Botium Sample Repository for doing NLP Analytics
MIT License
5 stars 0 forks source link

Doubtful if test Dialogflow model is allowed some time to update its underlying algorithm during training phase #2

Open shreshkhatri opened 4 years ago

shreshkhatri commented 4 years ago

According to Dialogflow, each time intent is updated, training phrase is added, entities are updated, the underlying algorithm gets updated. Even I have experienced that the Dialogflow model taking time to train when I add a training phrase.

I feel the same thing happens in case of testing a Dialogflow bot. When cross validation starts, training of phrases starts. I am thinking if the training for test purpose allows Dialogfolw some time to update its state of algorithm. I am confused, if training the model continuously and letting it to predict an utterance right after finishing training phase would classify that utterance correctly as the model might still be building its knowledge base. The task of classification may leads whereas algorithm building process may lag. This might produce incorrect results for precision, recall etc. I am wondering how much might I be correct with such kind of understanding. I hope to be cleared about this confusion. Thankyou

codeforequity-at commented 4 years ago

This is a valid concern, and I also experienced this myself.

Botium uploads a full dialogflow agent (model), including all intents and utterances, at once, and then it forces a training run. Unfortunately, we noticed that there is no way to know if the training actually finished, so we included a rather hacky process:

When running my own tests, this was enough stable to do my evaluations, but maybe you have an idea how this can be solved better. I already considered introducing some fixed time slot to wait after uploading the model, to give Dialogflow time to finish the training, but then I didn't want to take a guess how long this could take.

shreshkhatri commented 4 years ago

I think using large number of utterances for every intents result improved performance metrics. Because, training process takes longer time. This increased training time allows enough time for the model to adapt with its learning.

shreshkhatri commented 4 years ago

But I guess this approach is problematic too. I saw that for standard edition of Dialogflow, there is limitation in number of training phrases the model can accept for a particular time. Resource exhausted or quota exceeded problem arises during testing of the Dialogflow agent.

codeforequity-at commented 4 years ago

The quotas for Dialogflow are documented here: https://cloud.google.com/dialogflow/quotas

At least for the "QUOTA_EXCEEDED" problem there will be a solution very soon to throttle the number of requests per second:

https://botium.atlassian.net/wiki/spaces/BOTIUM/pages/360603/Botium+Configuration+-+Capabilities#Rate-Limiting