Skip to content

Add simplest lab_bench_2 case [1/n]#1

Merged
iphan merged 4 commits into
mainfrom
lb2_bare_litqa
May 28, 2026
Merged

Add simplest lab_bench_2 case [1/n]#1
iphan merged 4 commits into
mainfrom
lb2_bare_litqa

Conversation

@iphan

@iphan iphan commented May 22, 2026

Copy link
Copy Markdown
Collaborator

This PR contains

More details in the design doc

Description

Initial port of LAB-Bench 2 (EdisonScientific/labbench2) into this inspect_evals template as the lab_bench_2 evaluation. This is Phase 1 of a phased port (see implementation plan details):

  • One tag only: litqa3 (literature-QA subset of 168 samples).
  • Bare solver only — a single-turn generate() matching the benchmark's "bare" configuration. The solver task arg accepts any Inspect solver for overrides.
  • One scorer — a semantic LLM judge (grader model role, default anthropic/claude-sonnet-4-5, temperature 0) returning correct / incorrect / unsure; only correct scores 1.0. Reports accuracy and stderr.
  • Dataset sourced from the public EdisonScientific/labbench2 HF dataset, pinned to a specific commit for reproducibility.
  • mode task arg (file / inject / retrieve) wired through but a no-op for litqa3 (no per-question files); included now to keep the surface stable for later tags.

Validation

Automated Checks

make check
make test

Manual

# Run the eval and check results
uv run inspect eval lab_bench_2 --model ollama/llama3.2 --limit 10 --model-role grader=ollama/llama3.2

Only support for a single tag (litqa3), bare solver and a single scorer
@iphan iphan changed the title initial commit for lab_bench_2 Add simplest lab_bench_2 case May 22, 2026
@iphan
iphan force-pushed the lb2_bare_litqa branch from 57d936c to 4d8fef6 Compare May 27, 2026 03:43
@iphan
iphan marked this pull request as ready for review May 27, 2026 03:44
@iphan iphan changed the title Add simplest lab_bench_2 case Add simplest lab_bench_2 case [1/n] May 27, 2026
Comment thread src/lab_bench_2/README.md Outdated
```bash
uv run inspect eval lab_bench_2/lab_bench_2 \
--model openai/gpt-5-nano \
--model-role grader=anthropic/claude-sonnet-4-5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use a different model here as an example of overriding the default

Comment thread src/lab_bench_2/eval.yaml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to evolve into a "run config file" like Matt implemented support for in UKGovernmentBEIS/inspect_ai#3928? If we go with the run config file approach, we could achieve some of the configuration functionality that Justin was talking about in Slack and in these GH comments: Comment 1 and Comment 2. E.g. some users might want to run the implementation most faithful to the paper (i.e. same grader models, same temperature) and other users might want more control.

At the moment, this file has the content that would be submitted to inspect_evals when hooking this eval into the register.

Do you think the "run config file" would add value here as a way to document the paper defaults in code and make them easy to run? And, would using the "run config file" approach add more complexity to the implementation?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes, we can definitely add config files for the paper settings. It would be very useful for users who want to reproduce the paper results. I didn't add it yet, because I don't have all the options working yet.
It shouldn't add much complexity. I think I just need to add config files with the settings from the paper. This eval.yaml file will remain as is, because we need for the inspect_evals submission. I will name the config files differently: paper_config_bare.yaml and paper_config_tools_high.yaml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, sounds good!

This eval.yaml file will remain as is, because we need for the inspect_evals submission.

This actually doesn't need to live in the eval repo, it will be part of the PR that's raised to the inspect_evals repo and then live in the register/ dir of inspect_evals, e.g. here: https://github.com/UKGovernmentBEIS/inspect_evals/blob/main/register/hangman-bench/eval.yaml

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks for pointing this out. I will remove this file then and submit it with the inspect_evals' PR.

I had included it here, because the examples all have this yaml file. Maybe adding a comment at the top that this file is meant for the registry would be helpful for users?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, sorry @iphan! 🤦‍♀️ Let's add it back for now.. I'll add to our backlog that we can probably remove this from the template and update the CI (but will catch up on context about why it's included in the template first)

Comment thread src/utils/huggingface.py
path,
name=None if config == "default" and len(config_names) == 1 else config,
revision=revision,
trust_remote_code=False,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove this? should it be trust_remote_code=True with a comment explaining why it's needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since datasets version 4.0.0, this input param was removed from load_dataset_builder(), see code here

Then this should be updated in the template:

  • either specify the datasets version to use
  • or remove this option altogether

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh i see, thank you! we'll update the template

@ItsTania ItsTania May 28, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in Generality-Labs#18 !

@ItsTania ItsTania left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! (No comments from my end - the design doc is great + useful thanks)

@iphan
iphan force-pushed the lb2_bare_litqa branch from d15314b to 57fdfe4 Compare May 28, 2026 18:20
@iphan
iphan merged commit f6be698 into main May 28, 2026
15 checks passed
@iphan
iphan deleted the lb2_bare_litqa branch May 28, 2026 18:25
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

Successfully merging this pull request may close these issues.

3 participants