-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Farm top_k reader error #34
Comments
Hey @aadil-srivastava01, We did some changes on these parameters last week. Can you please check how many candidate docs you retriever returns? If you have e.g. only 1 candidate here, it would explain the observed behavior. Otherwise, I am happy to dig in deeper. To give you some background: There are a couple of different aggregation steps involved. How it should work:
This means you can only return In any case, we should try to make this more user-friendly in the future. Either by an info message or some automated parameter adjustments for these special cases. |
Please refer to the highlighted section in the attached images. I guess the problem is still there. Only when you initialize farm reader with the top_k_reader then will give you the number of specified answers else it will give the default number of answers which is 3, which is the value of its default initialization, making finder.get_answers having no effect on the generated output. |
When using finder.get_answers() with tfidf-retriever and farm reader, top_k_reader parameter has no effect on retrieving the top K answers. It will always return the top 3 answers as FarmReader top_k_per_candidate is set to 3 by default. So in order to get n number of answers, we will have to initialize FarmReader's top_k_per_candidate by n.
The text was updated successfully, but these errors were encountered: