Skip to content
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

[Question] How to compute precision for a retriever operating at passage-level #63

Open
ronanki opened this issue Mar 3, 2024 · 0 comments

Comments

@ronanki
Copy link

ronanki commented Mar 3, 2024

If the retriever is operating at passage / chunk-level and hence the retrieved results can have duplicate IDs as shown below:
Top-10 retrieval list for each of the queries:

q_1: ['d_1', 'd_1', 'd_1', 'd_1', 'd_1', 'd_1', 'd_5', 'd_5', 'd_5', 'd_5']
q_2: ['d_4', 'd_4', 'd_4', 'd_4', 'd_2', 'd_2', 'd_6', 'd_6', 'd_6', 'd_6']

Encoding them into a dictionary results in:

run_dict = { "q_1": { "d_1": 0.9, "d_5": 0.8 }, 
             "q_2": { "d_4": 0.9, "d_2": 0.8, "d_6": 0.7 } }

where qrels could be:

qrels_dict = { "q_1": { "d_1": 5, "d_5": 3 },
               "q_2": { "d_4": 6, "d_6": 1 } }

Considering above scenario, the precision@10 would yield very low score, even though it is not the case. How can we fix this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant