DSWizard
Reliable Biomedical Data Analysis Agent
DSWizard (Data Science Wizard) is a two-phase agent designed for reliable biomedical data analysis. It operates by first creating a detailed analysis plan in natural language, then converting that plan into executable Python code with automatic error handling and iterative refinement.
Two-Phase Architecture
Phase 1: Planning
- •Explores available datasets and schemas
- •Creates structured, step-by-step analysis plans
- •Identifies quality control steps
- •Iterates until plan is complete and unambiguous
Phase 2: Implementation
- •Reviews plan and checks feasibility
- •Generates complete Python code
- •Executes in sandboxed Docker environment
- •Returns results with artifacts and reports
Key Features
Sandboxed Execution
Safe, isolated code execution in Docker containers with resource monitoring.
Multi-LLM Support
Works with OpenAI, Azure OpenAI, and Anthropic Claude models.
PDF Reports
Generates professional reports with embedded visualizations and code.
Benchmark Results
DSWizard consistently outperforms other methods across biomedical data analysis tasks.
Easy Tasks
Medium Tasks
Hard Tasks
DSWizard achieves state-of-the-art Pass@1 on Easy and Medium tasks, with +27% and +18% improvements respectively.
Benchmark Datasets
Three comprehensive benchmarks for evaluating biomedical data science agents.
BioDSA-1K: Hypothesis Validation
1,029 real biomedical hypothesis tasks from published studies
BioDSBench Dataset Overview
Comprehensive coverage of study types, analysis categories, and programming packages across 39 cBioPortal studies.
Study Types
38 studiesAnalysis Types
498 analysesPython Packages
14 studies · 128 analysesR Packages
25 studies · 165 analysesQuick Start
from biodsa.agents import DSWizardAgent
# Initialize the agent
agent = DSWizardAgent(
model_name="gpt-5",
api_type="openai",
api_key=os.environ.get("OPENAI_API_KEY")
)
# Register a dataset for analysis
agent.register_workspace("./biomedical_data/cBioPortal/datasets/")
# Execute a data science task
results = agent.go(
"Cluster patients based on genomic mutations to maximize "
"separation of prognostic survival outcomes."
)
# Generate PDF report
results.to_pdf(output_dir="reports")Citation
@article{wang2026reliable,
title = {Making large language models reliable data science programming copilots for biomedical research},
author = {Wang, Zifeng and Danek, Benjamin and Yang, Ziwei and Chen, Zheng and Sun, Jimeng},
journal = {Nature Biomedical Engineering},
year = {2026},
doi = {10.1038/s41551-025-01587-2},
}