-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move retriever probability calculations to document_store #389
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good.
Only comment: Do we want to keep the naming like this (probability
and query_score
) or make it more consistent: e.g. probability
and score
|
Hi, I read your PR and I liked the renaming for more simplicity, however I end up a bit confused. In :param score: Retriever's query score for a retrieved document
:param probability: a psuedo probability by scaling score in the range 0 to 1 So So... where is the Reader score ? I thought it was the |
Ok my bad : we are talking "answer": pred["answer"],
"context": doc.text[context_start:context_end],
"offset_start": pred["start"],
"offset_end": pred["end"],
"probability": pred["score"],
"score": None,
"document_id": doc.id,
"meta": doc.meta |
But it means, at the moment, there are no information about the retriever score passed to the answers yet. Is that correct @tholor ? |
@guillim Yes, that's correct. |
This PR moves the retrieval probability(pseudo probability by scaling query scores) calculations to the respective document stores.
It simplifies the similarity matching method(
get_answers_via_similar_questions()
) in theFinder
. Additionally, now the retrieved documents have an explicit probability field that could be useful in the future.