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 }}
Repository navigation
evaluate.py predicts "A" when the API returns no logprob for the option letters, so A-gold questions get credit #31
In evaluate.py, eval collects the log probability of " A", " B", " C" and " D" from top_logprobs[-1]. If a letter is missing, it prints a warning and uses -100 for that letter. When none of the four letters comes back, all four scores are -100, and np.argmax returns the first index on a tie, so the prediction is "A". Every question whose gold answer is A is then scored correct without the model having answered, and the only trace is the warning lines.
I have not seen a real API response that omits the letters: the script still calls openai.Completion with logprobs=100, which I could not run, and the repro below feeds it a response with none of them. Treating a fully missing result as wrong (or skipping and counting the item) would avoid the free credit.
Reproduction
The script stubs the openai module and crop (which downloads a tokenizer) and has the stub return top logprobs without any option letter. It then runs evaluate.eval on ten questions, four of which have gold answer A. Needs numpy and pandas; set SRC to a checkout of the repo.
Output on main (4450500f923c49f1fb1dd3d99108a0bd9717b660), after the warning lines:
Average accuracy 0.400 - x
observed accuracy=0.400 expected (no valid logit -> wrong)=0.000
Ten questions with gold A, B, C, D, A, B, C, D, A, A give 4 of 10 correct from the fallback alone.
Related
#14 points out that the API returns at most 5 top logprobs, which makes it more likely that some option letters are missing from the response. This issue is about what evaluate.py does then: missing letters get -100, and when all four are missing np.argmax picks "A", so A-gold questions are scored correct.
Activity