MultipleChoice crashes when optional instructions is None
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start in evals/elsuite/multiple_choice.py at MultipleChoice.init(), then trace how the prompt is built during evaluation. Add the requested regression test with instructions=None and verify that evaluation completes, while explicit non-empty instructions remain unchanged.
Written by the indexing model from the issue text.
Description
Describe the bug
evals.elsuite.multiple_choice.MultipleChoice.__init__() annotates instructions as optional:
instructions: Optional[str] = ""
but stores the value unchanged and later builds the prompt with:
self.instructions + "\nPlease answer with the letter of the correct answer."
Passing instructions=None, which is valid according to the public type, therefore raises TypeError during evaluation.
Expected behavior
None should behave like the existing default empty instruction string. Explicit non-empty instruction text should remain unchanged.
Proposed fix
Normalize None to "" in the constructor and add a regression test showing that a sample can be evaluated when instructions=None.
- Dominant language
- Python
- Stars
- 19.5k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/evals
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100