facebookresearch / DrQA

Reading Wikipedia to Answer Open-Domain Questions
Other
4.48k stars 898 forks source link

Doesn't know the answer #273

Open mishav78 opened 2 years ago

mishav78 commented 2 years ago

If the system doesn't know the answer will it return the best fitting paragraph?

ajfisch commented 2 years ago

It will always return whatever the argmax span is from the top-k paragraphs (even though they might be low confidence).

mishav78 commented 2 years ago

will it also have an answer in addition to the top span?

On Sun, Dec 19, 2021 at 1:10 AM Adam Fisch @.***> wrote:

It will always return whatever the argmax span is from the top-k paragraphs (even though they might be low confidence).

— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/DrQA/issues/273#issuecomment-997335941, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS273AXULQAGEZULQJPBEKTURVZMLANCNFSM5KLPWDPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

ajfisch commented 2 years ago

The top span is the predicted answer.

mishav78 commented 2 years ago

so will it have the paragraph it came from?

On Sun, Dec 19, 2021 at 1:14 AM Adam Fisch @.***> wrote:

The top span is the predicted answer.

— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/DrQA/issues/273#issuecomment-997336396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS273AWIW4NUGW7MEZDDG73URVZ5NANCNFSM5KLPWDPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

ajfisch commented 2 years ago

It's unclear what your question is. The model follows the same procedure for any input: its output will always consist of a single answer span. You can also see which paragraph and document the answer came from.

mishav78 commented 2 years ago

so the bottom part is the paragraph? Is that correct?

Second question, can I get these components from within the program instead of the shell? for example in puesdocode questioninstance.getSpan() questioninstance.getParagraph()

process('Who was the winning pitcher in the 1956 World Series?')

Top Predictions: +------+------------+------------------+--------------+-----------+ | Rank | Answer | Doc | Answer Score | Doc Score | +------+------------+------------------+--------------+-----------+ | 1 | Don Larsen | New York Yankees | 4.5059e+06 | 278.06 | +------+------------+------------------+--------------+-----------+

Contexts: [ Doc = New York Yankees ] In 1954, the Yankees won over 100 games, but the Indians took the pennant with an AL record 111 wins; 1954 was famously referred to as "The Year the Yankees Lost the Pennant". In , the Dodgers finally beat the Yankees in the World Series, after five previous Series losses to them, but the Yankees came back strong the next year. On October 8, 1956, in Game Five of the 1956 World Series against the Dodgers, pitcher Don Larsen threw the only perfect game in World Series history, which remains the only perfect game in postseason play and was the only no-hitter of any kind to be pitched in postseason play until Roy Halladay pitched a no-hitter on October 6, 2010.

On Sun, Dec 19, 2021 at 1:31 AM Adam Fisch @.***> wrote:

It's unclear what your question is. The model follows the same procedure for any input: its output will always consist of a single answer span. You can also see which paragraph and document the answer came from.

— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/DrQA/issues/273#issuecomment-997337924, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS273ASDDERYC6SU7RLITJDURV33NANCNFSM5KLPWDPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

ajfisch commented 2 years ago

Yep, in that example the document is "New York Yankees" and the context is the paragraph from which "Don Larsen" (the answer) was extracted.

Predictions are returned as dictionaries, see the example code that generated the demo output: https://github.com/facebookresearch/DrQA/blob/main/scripts/pipeline/interactive.py#L79-L101

mishav78 commented 2 years ago

so it means I would have to use the dictionary within the source code and do something with the data as opposed to printing to the screen?

On Sun, Dec 19, 2021 at 1:45 AM Adam Fisch @.***> wrote:

Yep, in that example the document is "New York Yankees" and the context is the paragraph from which "Don Larsen" (the answer) was extracted.

Predictions are returned as dictionaries, see the example code that generated the demo output: https://github.com/facebookresearch/DrQA/blob/main/scripts/pipeline/interactive.py#L79-L101

— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/DrQA/issues/273#issuecomment-997339078, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS273AXPQTZXIMEOCKHCOFDURV5PBANCNFSM5KLPWDPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>