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

autotune Function Usage Example #30

Open
msharara1998 opened this issue Nov 26, 2023 · 1 comment
Open

autotune Function Usage Example #30

msharara1998 opened this issue Nov 26, 2023 · 1 comment

Comments

@msharara1998
Copy link

msharara1998 commented Nov 26, 2023

I am looking for an example of how to structure the queries and qrels parameters of the autotune function because I searched in the repo and didn't find any example for that. Precisely, what should be the keys and values of queries dict? and similarly for qrels dict?

Thanks in advance for your help.

@AmenRa
Copy link
Owner

AmenRa commented Nov 27, 2023

Hi, you can find a very condensed example here.

queries is a list of dictionaries where each dictionary has two keys: q_id and text.
Both q_id and text must be strings.

qrels is a dictionary of dictionaries.
The parent dictionary keys must be the q_id of the dictionaries in the queries list.
Each child dictionary has a key for each document relevant to the corresponding query.
The values corresponding to the keys are the relevance score judgments (i.e., how well the document answer the query). Note that they can be both graded or binary (zero means not relevant). Most metrics for performance evaluation of search engines consider all non-judged documents as non-relevants. Therefore, you are good by providing scores only for the documents you know are relevant.

Example of qrels:

qrels = { "q_1": { "d_12": 5, "d_25": 3 },
          "q_2": { "d_11": 6, "d_22": 1 } }

Let me know if it is clear. :)

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

2 participants