You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
In the create_fewshot_query inside make_nshot_dataset (In genbench.task.py file), we have the following line of code,
in_context_example_ids = rng.choice(len(fewshot_example_source), num_shots + 1, replace=False).tolist() in_context_examples = [ fewshot_example_source[i] for i in in_context_example_ids if fewshot_example_source[i] != query ]
Now this code will give correct fewshot query when the fewshot datasource is the same as the test suite and the current question is contained in the randomly selected shots. But when that is not the case, this will create a fewshot prompt with n+1 examples.
Additionally, the following line in make_nshot_dataset should also be fixed,
if len(fewshot_example_source) < num_shots + 1: raise ValueError("Not enough examples for the number of shots.")
as this line is only valid if the fewshot_example_source is the same as the test dataset.
The text was updated successfully, but these errors were encountered:
In the create_fewshot_query inside make_nshot_dataset (In genbench.task.py file), we have the following line of code,
in_context_example_ids = rng.choice(len(fewshot_example_source), num_shots + 1, replace=False).tolist()
in_context_examples = [ fewshot_example_source[i] for i in in_context_example_ids if fewshot_example_source[i] != query ]
Now this code will give correct fewshot query when the fewshot datasource is the same as the test suite and the current question is contained in the randomly selected shots. But when that is not the case, this will create a fewshot prompt with n+1 examples.
Additionally, the following line in make_nshot_dataset should also be fixed,
if len(fewshot_example_source) < num_shots + 1:
raise ValueError("Not enough examples for the number of shots.")
as this line is only valid if the fewshot_example_source is the same as the test dataset.
The text was updated successfully, but these errors were encountered: