calpoly-csai / api

Official API for the NIMBUS Voice Assistant accessible via HTTP REST protocol.
https://nimbus.api.calpolycsai.com/
GNU General Public License v3.0
9 stars 4 forks source link

Empty answers for some questions #198

Closed snekiam closed 3 years ago

snekiam commented 3 years ago

Describe the bug The following question produces an empty string as the response: "How would I see Dr. Ventura now?"

To Reproduce Steps to reproduce the behavior:

  1. Send a POST request to https://nimbus.api.calpolycsai.com/ask, with the payload being { "question": "How would I see Dr. Ventura now?"}
  2. See the following response: { "answer": "", "session": "SOME_NEW_TOKEN" }

Expected behavior We should get an answer, or a reason we can't answer this question.

snekiam commented 3 years ago

It's possible there are other questions which cause this.

chidiewenike commented 3 years ago

@snekiam Obtaining each step of the NLP pipeline would help answer this issue. I am curious what each step produces.

Input Question -> Normalized Question/Entity/Normalized Entity -> Predicted Answer -> Final Answer (Predicted Answer substituted with DB info)

chidiewenike commented 3 years ago

@snekiam This dictionary should contain the contents for each step of the pipeline: https://github.com/calpoly-csai/api/blob/671064f16ebac1cc243d5ab4556e6921efb8189f/nimbus.py#L32

ethanahlquist commented 3 years ago

It seems like the NPL is producing a wierd 'question class' when processing the 'normalized question':

{'entity': 'Dr. Ventura', 'tag': 'PROF', 'normalized entity': 'Ventura', 'input question': 'How would I see Dr. Ventura now?', 'normalized question': 'How would I see [PROF] now?', 'question class': 'How clearly does [PROF] present material?'}

'normalized question': 'How would I see [PROF] now?' ↓ 'question class': 'How clearly does [PROF] present material?'