watson-developer-cloud / assistant-with-discovery

DEPRECATED: this application is deprecated and thus will not receive fixes or security updates. It is archived for educational purposes, but may not function.
Apache License 2.0
145 stars 342 forks source link

Discovery service returns no results for long-tail questions sent from Conversation service #69

Closed alexandru-anastasopol closed 7 years ago

alexandru-anastasopol commented 7 years ago

Hello,

I have run into an issue - Discovery service not returning results for long-tail questions.

After deploying this application on Bluemix, following the delpoyment instructions, the answer for "How do I check my tire pressure" is "That question is out of scope for this application, take a look at the Conversation Enhanced application to handle questions like these.", which is not expected. Doing a direct query on the Discovery service returns relevant results from the car manual

Also, when asking the same question on the official application page (at http://conversation-with-discovery.mybluemix.net/dist/index.html) the answer is "Great question. I found some ideas for you:", followed by relevant sections from the car manual.

The value for "CEPayload" (on the right pane, "Watson understands" section) is empty in the first case (the application deployed on my Bluemix account) and contains the relevant sections from the car manual in the second case (official website).

Please see attached screenshots below.

conversationwithdiscoverybluemixdeployment_issue discoveryservicequerybluemixdeployment_working conversationwithdiscoveryofficialwebsite_working

Thank you.

ddacosta79 commented 7 years ago

I have exactly the same issue. Did you find the cause?

David

alexandru-anastasopol commented 7 years ago

Hi David,

I found the cause: The actual query sent to Discovery service is: "searchText:\<user query>, enrichedText:\<userQuery>" see the project code: at DiscoveryQuery.query(String userQuery) at lines:

        sb.append("searchText:");
        sb.append(userQuery);
        sb.append(",");
        sb.append("enrichedText:");
        sb.append(userQuery);

Executing that exact query directly on the Discovery service will not return any results either. For some reason the "enrichedText" field is not added to the processed JSON collection.

Hope this helps, Alex

mitchmason commented 7 years ago

If your docs are not well trained, or the question gets extremely low confidence returned, discovery will not send any results, thus none will be showed. we should write additional code to handle that scenario. other htan that, looks like Alex found the issue already.

619 commented 7 years ago

Might you suggest an actual solution?