Skip to content

Add agentic solvers [4/n]#7

Merged
iphan merged 9 commits into
mainfrom
agentic_solvers
Jun 5, 2026
Merged

Add agentic solvers [4/n]#7
iphan merged 9 commits into
mainfrom
agentic_solvers

Conversation

@iphan

@iphan iphan commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

This PR contains

Description

Add 2 new agentic solvers:

  • a tools() solver giving the model provider-native, server-side WebSearch and CodeExecution
  • a agentic() solver giving the model python/bash (and optionally web_search) tools in a Docker sandbox

Validation

Automated Checks

make check
make test

Manual Tests

uv run inspect eval lab_bench_2 --model openai/gpt-5-nano --limit 3 --model-role grader=ollama/llama3.2 -T solver=tools
solver: tools, dataset: EdisonScientific/labbench2
total time:                                0:03:52
openai/gpt-5-nano                          128,522 tokens [I: 112,224, CW: 0, CR: 4,864, O: 11,434, R: 10,112]
ollama/llama3.2                            1,244 tokens [I: 970, O: 274]
grader (role)                                                  1,244 tokens [I: 970, O: 274]

semantic_judge_scorer
accuracy               1.000
stderr                 0.000

uv run inspect eval lab_bench_2 --model openai/gpt-5-nano --limit 3 --model-role grader=ollama/llama3.2 -T solver=tools -T tag=cloning -T mode=retrieve
tag: cloning, mode: retrieve, solver: tools, dataset: EdisonScientific/labbench2

total time:                                 0:01:08
openai/gpt-5-nano                           33,599 tokens [I: 7,636, CW: 0, CR: 9,728, O: 16,235, R: 14,976]

cloning_scorer
accuracy        0.000
stderr          0.000


# Artificially reduce the turn limit, and see the custom prompt asking the model to submit answer now
uv run inspect eval lab_bench_2 --model openai/gpt-5-nano --limit 3 --model-role grader=ollama/llama3.2 -T solver=agentic -T tag=seqqa2 -T mode=retrieve
tag: seqqa2, mode: retrieve, solver: agentic, dataset: EdisonScientific/labbench2

total time:                                 0:01:10
openai/gpt-5-nano                           53,454 tokens [I: 27,232, CW: 0, CR: 7,552, O: 18,670, R: 11,840]

seqqa2_scorer
accuracy       0.667
stderr         0.333

@iphan
iphan force-pushed the agentic_solvers branch 3 times, most recently from afa0de7 to 8076dc7 Compare June 2, 2026 01:06
@iphan iphan changed the title Add agentic "tools" solver for LAB-Bench 2 Add agentic solvers Jun 2, 2026
@iphan
iphan force-pushed the agentic_solvers branch from a11c509 to 98a9e37 Compare June 3, 2026 00:23
warning_limit: int = 45,
**agent_kwargs: Any,
) -> Solver:
"""Wrap basic_agent with a final-warning mechanism.

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.

This agent with final warning mechanism was provided by Sunishchal from RAND. I preserved his contribution logic here. Let me know if you'd like to adjust/modify the agent's behavior

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Super interesting agent design! Might have to implement this for evals where a common failure mode is not submitting

@iphan
iphan marked this pull request as ready for review June 3, 2026 00:38
Base automatically changed from lb2_scorers to main June 3, 2026 17:47
@iphan iphan changed the title Add agentic solvers Add agentic solvers [4/n] Jun 3, 2026
iphan and others added 7 commits June 3, 2026 10:56
Add the benchmark's agentic configuration: a `tools()` solver giving
the model provider-native, server-side WebSearch and CodeExecution
Client-side agent running in a sandbox with tools.
(inert not yet wired into SolverType/dispatch)

Co-Authored-By: Sunishchal Dev <Sunishchal@users.noreply.github.com>
Expose `agentic` as a third SolverType
Attach a Docker sandbox only for this new solver
@iphan
iphan force-pushed the agentic_solvers branch from 98a9e37 to d9aa76f Compare June 3, 2026 17:57

@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.

No notes - looks good to me! The doco makes the three options provided easy to understand.

I ran uv run inspect eval lab_bench_2/lab_bench_2 -T tag=litqa3 --limit 1, with -T solver=tools and -T solver=agentic and works on my end.

Things to note:

  • A warning to let us know whether web_search tool is provided in the agentic case could be useful (but isn't blocking). (I didn't have a key set, so the LLM went around this my using python to do its websearch expect it didn't parse the data right)
  • Not related to this PR, but there might be some scoring issues we need to test for in a separate PR? One of my test cases happened to be marked as incorrect when I think it should be marked as correct (I'll upload image in a following comment)

Comment thread src/lab_bench_2/README.md Outdated
Comment thread src/lab_bench_2/README.md Outdated
Comment thread src/lab_bench_2/README.md Outdated
Comment on lines +1 to +6
# Scientific Python stack for the agentic solver's sandboxed python/bash tools.
# Versions are pinned for reproducible builds. pydna constrains biopython,
# numpy, pandas, and scipy, so bump them as a set (re-resolve, don't pin
# individually). The base image is intentionally left unpinned: it must track
# the inspect tool-support protocol of the installed inspect_ai.
FROM aisiuk/inspect-tool-support

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the comment - this is useful.

Is the version of Inspect AI pinned (in the .toml right)? is it possible to pin to the corresponding docker image version and update when the Inspect AI version updates?

This is just a suggestion though - I don't image the aisiuk/inspect-tool-support image will change drastically

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.

I dug into this and decided to keep the base image unpinned, because version-tracking isn't actually possible for the image: it is only published as latest on Docker Hub, there are no per-version tags to pin to.
inspect_ai is locked to an exact version in uv.lock, and Inspect version-checks the sandbox's tool-support at startup, so a protocol mismatch would surface clearly

Comment thread src/lab_bench_2/solvers/sandbox_tools.py
warning_limit: int = 45,
**agent_kwargs: Any,
) -> Solver:
"""Wrap basic_agent with a final-warning mechanism.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Super interesting agent design! Might have to implement this for evals where a common failure mode is not submitting

Comment thread src/lab_bench_2/README.md Outdated
@ItsTania

ItsTania commented Jun 4, 2026

Copy link
Copy Markdown
Screenshot 2026-06-04 at 5 12 00 pm

I think this should be marked as correct?

@ItsTania

ItsTania commented Jun 4, 2026

Copy link
Copy Markdown

I think this should be marked as correct?

Extra context - it seemed to fail at the scoring stage

verdict:

verdict_source:

fallback

edit: this might be a local set up issue? not sure - I should have the right API keys set... Just letting you know to check for something similar before you run your big runs!!

iphan and others added 2 commits June 4, 2026 16:59
Co-authored-by: Tania <120768997+ItsTania@users.noreply.github.com>
@iphan

iphan commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator Author

I think this should be marked as correct?

Extra context - it seemed to fail at the scoring stage

verdict:
verdict_source:
fallback

edit: this might be a local set up issue? not sure - I should have the right API keys set... Just letting you know to check for something similar before you run your big runs!!

Interesting, which model did you use for the scorer?
Since it is using the fallback, it looks like a model which doesn't support structured output.

In the fallback case, the explanation field is the output of the judge. Since it is empty, it looks like the judge returned nothing, which was parsed to incorrect.
I'll merge for now, and can do a small follow up PR to adjust this behavior. It shouldn't be a blocker for my validation runs, because they use Sonnet as the judge, which does support structured output.

Thanks again for the thorough review!

@iphan
iphan merged commit 990b155 into main Jun 5, 2026
15 checks passed
@iphan
iphan deleted the agentic_solvers branch June 5, 2026 01:31
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.

2 participants