AIR-Bench Foundation reads the first letter of the word after "answer" as the model's choice
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning, testing
Research direction
Start with AIRBenchFoundationAdapter.extract_answer in evalscope/benchmarks/air_bench/air_bench_foundation_adapter.py, then reproduce the examples using the offline snippet in the issue. Check how answer markers and standalone A/B/C/D choices are matched; done when the examples extract the intended choice and score correctly.
Written by the indexing model from the issue text.
Description
Hi, I ran into this while looking at AIR-Bench Foundation scores for replies written as a sentence.
Self-Check List
Before submitting an issue, please ensure you have completed the following steps:
- I have carefully read the relevant user documentation
- I have reviewed the Frequently Asked Questions
- I have searched and reviewed existing issues to confirm this is not a duplicate problem
Problem Description
In AIRBenchFoundationAdapter.extract_answer (evalscope/benchmarks/air_bench/air_bench_foundation_adapter.py), the comment says the extractor looks for "the first standalone A/B/C/D, optionally prefixed by markers like ANSWER:". When the word that follows "answer" (or "answer:") starts with a, b, c or d, though, that word's first letter is read as the choice. Examples are Based, Because, could, depends, definitely and clearly. The letter the model actually gave later in the reply is never used. A correct reply then scores 0. It can also score 1 when the stray letter happens to equal the gold letter.
| Model reply | Gold | Expected choice | Actual choice | acc |
|---|---|---|---|---|
Answer: A (control) |
A | A | A | 1.0 |
Answer: Based on the voice, A. |
A | A | B | 0.0 |
The answer depends on pitch; I pick A. |
A | A | D | 0.0 |
My answer: clearly A. |
A | A | C | 0.0 |
Answer: Clearly, A |
A | A | C | 0.0 |
answer - definitely option B |
B | B | D | 0.0 |
EvalScope Version (Required)
main @ 96635395 (the same code is also in v1.15.1)
Tools Used
- Native / Native framework
- Opencompass backend
- VLMEvalKit backend
- RAGEval backend
- Perf / Model inference stress testing tool
- Arena / Arena mode
Executed Code or Instructions
Offline. No dataset download or model is needed:
from evalscope.api.dataset import Sample
from evalscope.api.evaluator import TaskState
from evalscope.api.model import ModelOutput
from evalscope.api.registry import get_benchmark
from evalscope.config import TaskConfig
adapter = get_benchmark('air_bench_foundation', TaskConfig(model='mock', datasets=['air_bench_foundation']))
for reply, gold in [('Answer: A', 'A'), ('Answer: Based on the voice, A.', 'A'), ('The answer depends on pitch; I pick A.', 'A'),
('My answer: clearly A.', 'A'), ('Answer: Clearly, A', 'A'), ('answer - definitely option B', 'B')]:
state = TaskState(model='mock', sample=Sample(input='q', target=gold), completed=True,
output=ModelOutput.from_content('mock', reply))
score = adapter.calculate_metrics(state).score
print(f'{reply!r:42} gold={gold} -> {score.extracted_prediction} {score.value}')
Error Log
'Answer: A' gold=A -> A {'acc': 1.0}
'Answer: Based on the voice, A.' gold=A -> B {'acc': 0.0}
'The answer depends on pitch; I pick A.' gold=A -> D {'acc': 0.0}
'My answer: clearly A.' gold=A -> C {'acc': 0.0}
'Answer: Clearly, A' gold=A -> C {'acc': 0.0}
'answer - definitely option B' gold=B -> D {'acc': 0.0}
Running Environment
- Operating System: Linux
- Python Version: 3.11
Additional Information
Related: #2254 fixed the gold-label mapping in this adapter (evaluation_version v1.1). That change did not touch how the model's reply is read.
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 606
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 189
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 modelscope/evalscope
-
结果对比时把配置也列出来如何?Possibly taken @Shackbear claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
modelscope/evalscope#2219 · 2 comments ·
Maintainers usually reply within 1 day
-
SLA auto-tune: one fully failed repeat removes percentile and avg_tpot metrics even when success_rate accepts itPossibly taken @beartester34 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
modelscope/evalscope#2328 ·
Maintainers usually reply within 1 day
-
DROP and VQAv2 mis-read some bold `Answer:` lines (multi-span DROP answers and VQAv2 rows lose credit)Possibly taken @beartester34 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
modelscope/evalscope#2326 ·
Maintainers usually reply within 1 day
-
报告导出Open
Difficulty 5/5 Over a week Newbie friendliness 28/100
modelscope/evalscope#2292 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
modelscope/evalscope#2287 ·
Maintainers usually reply within 1 day
All issues in modelscope/evalscope
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Distribution plot crashes when a numeric feature is constant in the train or test setPossibly taken @adembilge claimed this today. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MAIF/shapash#847 · 1 comment ·
Maintainers usually reply within 10 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
namespace team:operations
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
EclipseFdn/open-vsx.org#16738 ·
Maintainers usually reply within 1 day
-
errors xarray
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
developmentseed/titiler-cmr#380 ·
Maintainers usually reply within 1 day