Skip to main content 首页 创作者 adu2021 skillxiv exp-bench-ai-research
exp-bench-ai-research Evaluate AI systems' ability to conduct autonomous research experiments using EXP-Bench, a benchmark for multi-step scientific reasoning and iterative experimental workflows.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ADu2021/skillXiv --skill exp-bench-ai-research命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... name exp-bench-ai-research title EXP-Bench: Can AI Conduct AI Research Experiments? version 0.0.2 engine skillxiv-v0.0.2-claude-opus-4.6 license MIT url https://arxiv.org/abs/2505.24878 keywords ["AI Research","Benchmarking","Automation","Multi-Step Reasoning","Experimental Design"] description Evaluate AI systems' ability to conduct autonomous research experiments using EXP-Bench, a benchmark for multi-step scientific reasoning and iterative experimental workflows.
Benchmark AI Capability to Conduct Autonomous Experiments
EXP-Bench addresses a critical capability gap: while AI systems excel at isolated tasks, they struggle with multi-step experimental workflows—the core of scientific research. The benchmark evaluates whether AI can design experiments, run them, analyze results, and iterate based on findings. This requires reasoning about experimental design, error handling, result interpretation, and iterative refinement.
The key insight is that research experiments are complex workflows involving multiple decision points: What parameters to test? How to interpret unexpected results? When to pivot to a different approach? EXP-Bench measures these higher-order research capabilities beyond single-task performance.
Core Concept
EXP-Bench evaluates AI research capability through:
Experimental design : Choosing appropriate parameters, baselines, and evaluation metrics
Workflow execution : Running multi-step experimental pipelines reliably
Result analysis : Interpreting experimental outputs and drawing conclusions
Iterative refinement : Adjusting experiments based on results
Error handling : Recovering from failures and debugging
Documentation : Recording experimental setup, results, and conclusions
Success requires reasoning about causal relationships, hypothesis testing, and scientific methodology—not just task completion.
Architecture Overview
Experiment specification language : Format for describing experiments (parameters, steps, evaluation)
Execution engine : Runs experimental pipelines with error recovery
Analysis module : Interprets results and identifies patterns
Decision maker : Decides on next steps (continue, refine, pivot)
Logging system : Records all experimental details for reproducibility
Multi-step reasoning : Chains decisions across multiple experimental phases
Error detection : Identifies when experiments fail or results are anomalous
Implementation
Build a framework for autonomous experiment execution and analysis:
import json
import subprocess
from dataclasses import dataclass
from typing import List , Dict , Any , Optional
import numpy as np
@dataclass
class ExperimentStep :
"""Specification for one step in an experiment"""
name: str
command: str
parameters: Dict [str , Any ]
expected_output: str
error_handling: str
@dataclass
class ExperimentResult :
"""Results from executing one experiment"""
step_name: str
success: bool
output: str
metrics: Dict [str , float ]
error: Optional [str ] = None
timestamp: Optional [str ] = None
class AutonomousExperimentRunner :
"""
Execute multi-step experiments autonomously with iterative refinement.
"""
def ( ):
.max_iterations = max_iterations
.timeout_per_step = timeout_per_step
.experiment_history = []
( ) -> [ExperimentStep]:
design_prompt =
[
ExperimentStep(
name= ,
command= ,
parameters={},
expected_output= ,
error_handling=
)
]
( ) -> [ , ]:
results = []
iteration =
success =
iteration < .max_iterations success:
iteration_results = []
step experiment_steps:
result = ._execute_step(step)
iteration_results.append(result)
result.success step.error_handling == :
analysis = ._analyze_intermediate_results(iteration_results)
analysis[ ]:
experiment_steps = ._refine_experiment(
experiment_steps,
analysis[ ],
hypothesis
)
results.extend(iteration_results)
final_analysis = ._analyze_complete_results(results, hypothesis)
success = final_analysis[ ]
success iteration < .max_iterations - :
refinement = ._generate_refinement(final_analysis, hypothesis)
experiment_steps = refinement
iteration +=
{
: success,
: iteration,
: results,
: final_analysis,
: ._generate_conclusions(results, final_analysis)
}
( ) -> ExperimentResult:
:
result = subprocess.run(
step.command,
shell= ,
capture_output= ,
timeout= .timeout_per_step,
text=
)
output = result.stdout + result.stderr
success = result.returncode ==
metrics = ._parse_metrics(output, step.expected_output)
ExperimentResult(
step_name=step.name,
success=success,
output=output,
metrics=metrics,
error=result.stderr success
)
subprocess.TimeoutExpired:
ExperimentResult(
step_name=step.name,
success= ,
output= ,
metrics={},
error=
)
Exception e:
ExperimentResult(
step_name=step.name,
success= ,
output= ,
metrics={},
error= (e)
)
( ) -> [ , ]:
analysis = {
: ,
: [],
: []
}
result results:
result.success:
analysis[ ].append( )
(results) > :
latest_metrics = results[- ].metrics
latest_metrics:
analysis[ ].append( )
analysis[ ] =
analysis
( ) -> [ , ]:
all_metrics = {}
result results:
all_metrics.update(result.metrics)
analysis = {
: (r.success r results),
: all_metrics,
: ,
:
}
all_metrics:
analysis[ ] = all_metrics[ ] >
analysis[ ] = all_metrics[ ]
analysis
( ) -> [ExperimentStep]:
refinement_prompt =
steps
( ) -> [ , ]:
metrics = {}
re
patterns = {
: ,
: ,
: ,
:
}
metric_name, pattern patterns.items():
= re.search(pattern, output, re.IGNORECASE)
:
metrics[metric_name] = ( .group( ))
metrics
( ) -> [ExperimentStep]:
[]
( ) -> :
conclusion =
conclusion
Implement an experimental workflow coordinator:
class ResearchWorkflowCoordinator :
"""
Coordinate multiple related experiments for iterative research.
"""
def __init__ (self, research_goal: str ):
self .research_goal = research_goal
self .experiments = []
self .conclusions = []
def plan_research_direction (self ) -> List [str ]:
"""
Generate sequence of experiments to answer research question.
"""
planning_prompt = f"""
Research Goal: {self.research_goal}
Plan a sequence of {3 -5 } experiments to systematically investigate this goal.
Each experiment should build on previous findings.
For each experiment specify:
1. Hypothesis being tested
2. Key variables to manipulate
3. Control conditions
4. Success criteria
Return as JSON array with experiments.
"""
return []
def run_research_cycle (self ) -> Dict [str , Any ]:
"""Execute planned sequence of experiments"""
runner = AutonomousExperimentRunner()
cycle_results = []
for exp_spec in self .planned_experiments:
print (f"\nRunning experiment: {exp_spec['name' ]} " )
steps = runner.design_experiment(exp_spec['hypothesis' ])
result = runner.execute_experiment_workflow(steps, exp_spec[ ])
cycle_results.append(result)
insights = ._extract_insights(result)
result[ ]:
( )
next_action = ._decide_next_action(result)
next_action == :
( )
{
: .research_goal,
: (cycle_results),
: cycle_results,
: (r[ ] r cycle_results)
}
( ) -> [ ]:
insights = []
result[ ]:
insights.append( )
:
insights.append( )
insights
( ) -> :
result[ ]:
( .experiments) < :
:
Practical Guidance
Aspect Recommendation Notes Max iterations per experiment 3 - 5 More allows refinement; raises cost/time Step timeout 300 - 600 seconds Prevents hanging; adjust for your domain Metric extraction Regex + structured output Parse common metrics from output Error handling Fail-fast vs retry Depends on error severity Experiment documentation JSON + markdown Enables reproducibility and analysis
When to use EXP-Bench approach:
Evaluating AI capability on research tasks
Building autonomous research systems
Need multi-step experimental reasoning
Want to benchmark scientific methodology capability
Developing AI research assistants
When NOT to use:
Single-task performance evaluation (use standard benchmarks)
Experiments don't have verifiable/parseable outputs
Iterative refinement isn't needed (pre-determined workflow sufficient)
Computational budget is extremely limited
Experiments require human judgment for interpretation
Common pitfalls:
Metrics not properly parsed from outputs (malformed detection)
Experiments too complex for iterative refinement (define simpler cycles)
No error recovery mechanism (system fails on first error)
Iterations don't actually improve results (refinement logic too simple)
Not tracking experimental history (hard to learn from failures)
Assuming AI will match human research intuition (it won't, needs supervision)
Reference
EXP-Bench: Can AI Conduct AI Research Experiments?
https://arxiv.org/abs/2505.24878
__init__
self, max_iterations=5 , timeout_per_step=300
self
self
self
def
design_experiment
self, research_question: str
List
"""
LLM-based experiment design given research question.
"""
f"""
You are designing an experiment to answer this research question:
{research_question}
Design an experiment with these steps:
1. Setup: Prepare environment and data
2. Baseline: Run baseline implementation
3. Treatment: Run modified implementation
4. Evaluation: Compute metrics comparing both
5. Analysis: Interpret results
For each step, specify:
- What command/code to run
- Expected output format
- What metrics to extract
- How to handle failures
Return as JSON with steps array.
"""
return
"setup"
"python setup_data.py"
"data_ready"
"retry"
def
execute_experiment_workflow
self, experiment_steps: List [ExperimentStep],
hypothesis: str
Dict
str
Any
"""
Execute full experiment with iterative refinement.
"""
0
False
while
self
and
not
for
in
self
if
not
and
"fail_fast"
break
self
if
'should_refine'
self
'issues'
break
self
'success'
if
not
and
self
1
self
1
return
'success'
'num_iterations'
'results'
'analysis'
'conclusions'
self
def
_execute_step
self, step: ExperimentStep
"""Execute a single experiment step with error handling"""
try
True
True
self
True
0
self
return
if
not
else
None
except
return
False
""
f"Timeout after {self.timeout_per_step} s"
except
as
return
False
""
str
def
_analyze_intermediate_results
self, results: List [ExperimentResult]
Dict
str
Any
"""Analyze results during execution to guide next steps"""
'should_refine'
False
'issues'
'insights'
for
in
if
not
'issues'
f"{result.step_name} : {result.error} "
if
len
1
1
if
not
'issues'
"No metrics extracted from output"
'should_refine'
True
return
def
_analyze_complete_results
self, results: List [ExperimentResult],
hypothesis: str
Dict
str
Any
"""Analyze complete experiment results to draw conclusions"""
for
in
'success'
all
for
in
'metrics'
'hypothesis_confirmed'
None
'confidence'
0.0
if
'accuracy'
in
'hypothesis_confirmed'
'accuracy'
0.8
'confidence'
'accuracy'
return
def
_refine_experiment
self, steps: List [ExperimentStep],
issues: List [str ],
hypothesis: str
List
"""
Generate refined experiment based on identified issues.
Uses LLM to suggest improvements.
"""
f"""
The experiment encountered these issues: {issues}
Original hypothesis: {hypothesis}
Suggest refinements to the experiment:
1. What parameters should be adjusted?
2. Should we add additional steps?
3. Are there alternative approaches to test?
Return refined experiment steps as JSON.
"""
return
def
_parse_metrics
self, output: str , expected_format: str
Dict
str
float
"""Extract metrics from experiment output"""
import
'accuracy'
r'accuracy[:\s=]+([0-9.]+)'
'loss'
r'loss[:\s=]+([0-9.]+)'
'f1'
r'f1[:\s=]+([0-9.]+)'
'auc'
r'auc[:\s=]+([0-9.]+)'
for
in
match
if
match
float
match
1
return
def
_generate_refinement
self, analysis: Dict [str , Any ],
hypothesis: str
List
"""Generate refined experiment based on analysis"""
return
def
_generate_conclusions
self, results: List [ExperimentResult],
analysis: Dict [str , Any ]
str
"""Generate written conclusions from experiment"""
f"""
Experiment conducted with {len (results)} steps.
All steps successful: {all (r.success for r in results)}
Key metrics:
{json.dumps(analysis.get('metrics' , {} ), indent=2)}
Hypothesis confirmed: {analysis.get('hypothesis_confirmed' )}
Confidence: {analysis.get('confidence' , 0 ):.2 %}
Key findings:
- Experiment completed successfully
- Results support hypothesis: {analysis.get('hypothesis_confirmed' )}
"""
return
'hypothesis'
self
if
not
'success'
print
f"Experiment failed. Analyzing failure..."
self
if
'pivot'
print
"Pivoting to alternative hypothesis"
return
'research_goal'
self
'num_experiments'
len
'results'
'overall_success'
all
'success'
for
in
def
_extract_insights
self, result: Dict [str , Any ]
List
str
"""Extract key learnings from experiment"""
if
'success'
f"Hypothesis confirmed"
else
f"Need to refine approach"
return
def
_decide_next_action
self, result: Dict [str , Any ]
str
"""Decide whether to refine or pivot based on results"""
if
'success'
return
'continue'
elif
len
self
3
return
'refine'
else
return
'pivot'