BERT-QnA-Squad_2.0_Finetuned_Model icon indicating copy to clipboard operation
BERT-QnA-Squad_2.0_Finetuned_Model copied to clipboard

For non-answerable questions does not seem to work

Open alex-movila opened this issue 4 years ago • 4 comments

Hi, I tested with your script with downloaded model Bert-on-Squad-V2.0 I asked questions like: When BERT was born? Who created Earth?

The answers are nonsensical instead of answering "I can't answer" This is disappointing.

alex-movila avatar Jul 15 '19 13:07 alex-movila

Hi, that thing can be fixed by making the changes in predict function, I need to apply some threshold over the outputs obtained. I''ll fix it. Thanks for pointing out this. :)

surbhardwaj avatar Jul 16 '19 04:07 surbhardwaj

Yeah I modified a bit the code to expose the probability. A configurable threshold could help.

alex-movila avatar Jul 16 '19 05:07 alex-movila

@alex-movila BERT, by default, will give an answer to all questions. Even if that question is irrelevant to Context. That was the problem with BERT. To Remove this problem, Google comes with a new Model, XLNET You can try that.

In BERT even if you will put 66% as the threshold. then also irrelevant answer you will get. Also, you will lose a lot of the right answers.

the-black-knight-01 avatar Aug 06 '19 10:08 the-black-knight-01

Hi, that thing can be fixed by making the changes in predict function, I need to apply some threshold over the outputs obtained. I''ll fix it. Thanks for pointing out this. :)

Is it fixed now?

desaibhargav avatar May 08 '20 07:05 desaibhargav