Kk2406/Ll huggingface dataset:
NSCLC Radiomics Cox Signature
Domain: health_medicine — Clinical Diagnostics & Imaging

Summary: Build a CPU-only radiomics survival-risk model for non-small-cell lung cancer from CT volumes, tumor masks, training clinical outcomes, and fixed held-out prediction IDs.

Task prompt:
You are building an Aerts-2014-style radiomic prognostic risk model for non-small-cell lung cancer.

## Input

Use the data under `base/input`:

- `images/` contains 422 lung CT NIfTI volumes (`.nii.gz`).
- `masks/` contains matched GTV-1 tumor segmentation masks for the usable cohort.
- `clinical/train_clinical.csv` contains survival labels for the training patients only.
- `prediction_ids.csv` lists held-out patients that need risk scores.
- `split.json` documents the fixed train/test split and the one excluded missing-mask case.
- `runtime_env/pyproject.toml` pins a Python 3.10-compatible scientific stack for this task.

## Task

Build any CPU-only radiomics survival pipeline you choose. You may use PyRadiomics, SimpleITK, lifelines, scikit-learn, pandas, and NumPy. Extract features from the CT/mask pairs, fit a Cox-style or other survival-risk model using the labeled training patients, and generate risk scores for the held-out patients in `prediction_ids.csv`.

## Required Output

Write exactly these files under `base/output`:

1. `risk_scores.csv` with one row for each held-out patient and columns:
   - `PatientID`
   - `risk_score`

Higher `risk_score` must mean higher predicted hazard / shorter survival. Do not use hidden test labels or modify input files. CPU time budget is 2 hours.


Required actions:
Read CT images and tumor masks from `input/images/` and `input/masks/`.
Use only `input/clinical/train_clinical.csv` as labeled survival training data.
Generate one held-out prediction for each patient listed in `input/prediction_ids.csv`.
Write `risk_scores.csv` with columns `PatientID` and `risk_score` to the configured output directory.

Software: Python
uv
PyRadiomics
SimpleITK
lifelines
pandas
NumPy

Input files:
name: CT volumes
format: NIfTI gzip
description: Lung CT volumes for the submitted NSCLC cohort.
name: Tumor masks
format: NIfTI gzip
description: GTV-1 tumor segmentation masks for the usable cohort.
name: Training clinical outcomes
format: CSV
description: Survival labels for the training patients only.
name: Held-out prediction IDs
format: CSV
description: Patient IDs that require output risk scores.
name: Split metadata
format: JSON
description: Fixed train/test split and the excluded missing-mask case.
name: Runtime environment manifest
format: TOML
description: Agent-visible Python dependency manifest for the radiomics stack.
Domain: health_medicine — Public Health & Epidemiology

Summary: Audit an Obermeyer-style healthcare risk-score bias using `risk_score_t` as the baseline, build a counterfactual revised ranking from medical need, and emit `full_predictions.csv` plus baseline and revised analysis reports.

Task prompt:
You are working on a Linux VM to reproduce an Obermeyer-style healthcare algorithmic bias audit.

Read the task instructions and cohort data staged under:
- `base/input/task_instructions.md`
- `base/input/analysis_data.csv`
- `base/input/dummy_test.csv`

The helper `base/software/python_with_task_deps.sh` runs Python from the staged UV runtime environment if you want pandas and numpy available; it writes dependency state under the writable output directory.

Your job is to audit the observed risk score using `risk_score_t` directly as the baseline, build a reproducible counterfactual revised ranking based on medical need, explain the disparity mechanism, and save `full_predictions.csv`, `baseline_analysis_report.md`, and `revised_analysis_report.md` under `base/output`.

`full_predictions.csv` must have exactly these columns: `patient_id,baseline_score,revised_score`.


Required actions:


Input files:
Mask Mandate Moment-In-Time Ratio
Domain: health_medicine — Public Health & Epidemiology

Summary: Estimate the causal moment-in-time effect of a county-level mask mandate from a staged matched-pair county panel and produce the required six-value results JSON.

Task prompt:
You are working on a Linux VM to estimate the moment-in-time effect of a county-level mask mandate.

Visible task files:
- `base/input/task_prompt.md`
- `base/input/output_schema.json`
- `base/input/county_panel.csv`
- `base/input/matched_pairs.csv`
- `base/software/README.txt`

What you must do:
1. Read the staged task prompt and output schema.
2. Build the stacked matched-pair county-day analysis frame and engineer the required lagged features.
3. Fit the specified quasi-Poisson mixed model with the spline-by-treatment interaction.
4. Compute the policy-effect ratios at relative days 14, 28, and 42, plus the arithmetic mean over days 1..42.
5. Write exactly one file to `base/output`:
   - `base/output/results.json`

Output rules:
- Write valid JSON only.
- Use exactly the six keys listed in `output_schema.json`.
- Output numeric values, not strings.
- Do not modify the staged input files and do not write outside `base/output`.


Required actions:
Read the staged task prompt and output schema before doing any analysis.
Build the stacked matched-pair county-day analysis frame and the required lagged predictors.
Fit the specified quasi-Poisson mixed model with the spline-by-treatment interaction.
Write exactly one `output/results.json` file containing the six required numeric keys.

Software: R
nlme
MASS
splines
dplyr
jsonlite

Input files:
name: task_prompt.md
format: Markdown
description: Agent-visible epidemiology task brief with the full modeling contract.
name: output_schema.json
format: JSON
description: Exact six-key output schema for `results.json`.
name: county_panel.csv
format: CSV
description: Daily county-level panel with incidence, weather, visitation, R, and demographic covariates.
name: matched_pairs.csv
format: CSV
description: Matched-pair intervention table with `group_id`, `mask_grp`, and `mask_time`.
name: README.txt
format: text
description: Agent-visible runtime note describing the planned Stage 4 `software/Rscript` entry point.
Continuous Treatment Shift Simulation Replication
Domain: health_medicine — Public Health & Epidemiology

Summary: Reproduce a causal-inference Monte Carlo simulation study comparing IPTW, A-IPTW, and TMLE under a continuous-treatment shift intervention.

Task prompt:
You are working on a Linux R biostatistics simulation benchmark.

Task root:
- `base`

Read the staged task specification and schema:
- `base/input/simulation_spec.pdf`
- `base/input/simulation_spec.txt`
- `base/input/task_instructions.md`
- `base/input/output_schema.json`

Your job is to reproduce the continuous-treatment shift-intervention simulation study from the specification.

Required work:
1. Estimate the large-sample Monte Carlo truth for `psi0 = E[Q(A + 2, W)]` using at least 1,000,000 draws.
2. Implement IPTW, A-IPTW, and TMLE estimators for the shift intervention.
3. Run at least 1000 repetitions for each sample size: 50, 100, 200, and 500.
4. Summarize mean estimate, bias, variance, Monte Carlo SE, 95% interval, and coverage for every estimator/sample-size pair.
5. Write all deliverables only under `base/output`.

Required outputs:
- `base/output/summary_results.csv`
- `base/output/coverage_results.csv`
- `base/output/comparison_plots/` with at least one non-empty `.png` or `.pdf`
- `base/output/summary_findings.txt`
- `base/output/run_metadata.json`

Software guidance:
- Use the provisioned R entry point `base/software/Rscript`.
- You may write temporary simulation files inside `base/output`.

Required actions:
Read the staged simulation specification and output schema.
Estimate the Monte Carlo target truth with at least 1,000,000 draws.
Implement IPTW, A-IPTW, and TMLE for the A+2 shift intervention.
Run at least 1000 repetitions for each required sample size.
Write summary CSVs, comparison plots, metadata, and findings under output/.

Software: R
Rscript

Input files:
name: simulation_spec.pdf
format: pdf
description: Original submitted simulation specification.
name: simulation_spec.txt
format: txt
description: Text extraction of the simulation specification.
name: task_instructions.md
format: md
description: Agent-facing task instructions and required output filenames.
name: output_schema.json
format: json
description: Required output columns, sample sizes, and estimator labels.
Sepsis-Associated AKI Phenotyping
Domain: health_medicine — Clinical Informatics & Care Operations

Summary: Read staged synthetic MIMIC-IV style tables and identify the ICU patients who satisfy Sepsis-3 plus KDIGO SA-AKI timing criteria.

Task prompt:
You are working on a Windows clinical phenotyping task over staged synthetic MIMIC-IV style tables.

Use the staged data under `base\input` and the stable Python entry point `base\software\python.bat`.

Your job is to identify patients who developed sepsis-associated acute kidney injury (SA-AKI) during an ICU stay by operationalizing:
- Sepsis-3 onset
- KDIGO AKI staging
- the requirement that AKI begins within 7 days after sepsis onset during the same ICU stay

Visible raw data locations:
- Hospital tables: `base\input\mimic_synthetic\hosp`
- ICU tables: `base\input\mimic_synthetic\icu`
- Note tables: `base\input\mimic_synthetic\note`

Important raw files you will likely need:
- `base\input\mimic_synthetic\hosp\admissions.csv.gz`
- `base\input\mimic_synthetic\hosp\labevents.csv.gz`
- `base\input\mimic_synthetic\hosp\microbiologyevents.csv.gz`
- `base\input\mimic_synthetic\hosp\patients.csv.gz`
- `base\input\mimic_synthetic\icu\icustays.csv.gz`
- `base\input\mimic_synthetic\icu\chartevents.csv.gz`
- `base\input\mimic_synthetic\icu\outputevents.csv.gz`
- `base\input\mimic_synthetic\icu\datetimeevents.csv.gz`

What you must do:
1. Read the staged raw CSV tables directly from `base\input\mimic_synthetic`.
2. Determine which ICU patients satisfy the SA-AKI definition from the staged cohort.
3. Write exactly one CSV file to `base\output\sa_aki_patients.csv`.

Output rules:
- The file must be named exactly `sa_aki_patients.csv`.
- The header row must be exactly `subject_id`.
- Each subsequent row must contain one integer `subject_id`.
- Do not add any other columns, commentary, or sidecar outputs.
- Do not write outside `base\output`.


Required actions:
Read the staged synthetic MIMIC-IV tables under `input/mimic_synthetic/`.
Operationalize Sepsis-3 onset plus KDIGO AKI staging during ICU stays.
Restrict positives to patients whose AKI begins within 7 days after sepsis onset during the same ICU stay.
Write exactly one CSV to `output/sa_aki_patients.csv` with a single `subject_id` column.

Software: Python
pandas
NumPy

Input files:
name: mimic_synthetic/hosp
format: directory of `.csv.gz` files
description: Hospital tables including admissions, labs, medications, microbiology, and patient demographics.
name: mimic_synthetic/icu
format: directory of `.csv.gz` files
description: ICU tables including stays, charted events, urine output, and datetime events.
name: mimic_synthetic/note
format: directory of `.csv.gz` files
description: Clinical note tables from the staged synthetic cohort.
name: python.bat
format: Windows batch script
description: Stable task-local entry point to the baseline Windows Python runtime.
Scene3 Skullstrip QC
Domain: health_medicine — Experimental Psychology & Neuroimaging

Summary: Review skull-stripping results for the staged brain MRI case and record the required QC decision.

Task prompt:
You are a neuroimaging analyst completing a GUI workflow in 3D Slicer 5.0.3.

## Your Task
Workflow 3: skull-stripping QC

Goal:
1. Open the staged T1w image and candidate masks in 3D Slicer.
2. Visually compare the three candidate masks for over- and under-stripping.
3. Choose the best candidate.
4. Save qc_result.json with the following fields:
   - "chosen_mask": the filename of the best candidate (e.g. "cand2_mid_mask.nii.gz")
   - "verdict": exactly "OK" if the chosen mask is acceptable, or "NOT_OK" if none are acceptable
   - "rationale": a short explanation of why you chose that candidate

Required output:
- output/qc_result.json

## Input Files
All task inputs are staged in:
- `base/input`

Key staged files:
- `base/input/T1w.nii.gz`
- `base/input/cand1_loose_mask.nii.gz`
- `base/input/cand2_mid_mask.nii.gz`
- `base/input/cand3_strict_mask.nii.gz`
- `base/input/cand1_loose_brain.nii.gz`
- `base/input/cand2_mid_brain.nii.gz`
- `base/input/cand3_strict_brain.nii.gz`
- `base/input/candidates.json`

## Software
Launch the correct GUI workflow with:
- `base/software/launch_gui.sh`

The Desktop task folder is a symlink into `/media/user/data/agenthle/...`, so write all outputs under the staged task directory only.

## Required Output Files
Save these outputs exactly under `base/output`:
- `base/output/qc_result.json`

## Evaluation
You only pass if all required output files exist, are readable, and satisfy the task-specific correctness checks against hidden reference data.
Focus on this correctness target:
- The JSON must identify the best candidate mask, include a QC verdict, and include a short rationale.


Required actions:
Launch FSLeyes from `software/launch_gui.sh`.
Open the staged T1w image and inspect the three candidate masks and extracted brain images.
Decide which candidate best balances over- and under-stripping.
Save `output/qc_result.json` containing the chosen mask filename, a verdict, and a short rationale.

Software: Python

Input files:
name: T1w.nii.gz
format: NIfTI volume
description: Anatomical image used for skull-strip QC.
name: cand1_loose_mask.nii.gz
format: NIfTI mask
description: Deliberately loose candidate.
name: cand2_mid_mask.nii.gz
format: NIfTI mask
description: Mid-volume candidate; this is the hidden correct choice.
name: cand3_strict_mask.nii.gz
format: NIfTI mask
description: Deliberately strict candidate.
name: cand1_loose_brain.nii.gz / cand2_mid_brain.nii.gz / cand3_strict_brain.nii.gz
format: NIfTI volume
description: Auxiliary extracted-brain views for faster qualitative comparison.
name: candidates.json
format: JSON
description: Candidate manifest copied from the raw bundle.
SimGlucose Safe Basal Control
Domain: health_medicine — Therapeutic & Oncology Services

Summary: Implement a meal-unannounced, basal-only glucose controller for SimGlucose that satisfies safety gates across hidden patient episodes.

Task prompt:
You are working on a Linux VM to implement a meal-unannounced basal-only glucose controller in SimGlucose.

Visible task files:
- Task brief: `base/input/public/task.md`
- Controller API: `base/input/public/task_api.py`
- Submission format: `base/input/public/submission_format.md`
- Public evaluator: `base/input/public/evaluate_public.py`
- Agent runtime manifest: `base/input/runtime_env/pyproject.toml`
- Agent runtime lockfile: `base/input/runtime_env/uv.lock`

Write your submission under `base/output/submission`.
Required files:
- `base/output/submission/controller.py`
- `base/output/submission/metadata.json`

Optional supporting files:
- `base/output/submission/report.md`
- `base/output/submission/assets/...`
- `base/output/submission/training_code/...`

Rules:
- Follow the public observation/action contract exactly.
- The controller must expose either `build_controller()` or `SubmissionController`.
- Use only the staged task files as your source of truth.
- If you need Python dependencies for solving, install them yourself from `base/input/runtime_env`.


Required actions:
Read the staged public task package under input/public/ including the observation/action contract and submission format
Implement submission/controller.py exposing build_controller() or SubmissionController
Write submission/metadata.json with all required fields
Design a meal-unannounced, basal-only controller using only current CGM, time of day, sample interval, and action bounds

Software: Python 3.11
uv
SimGlucose 0.2.11

Input files:
name: task.md
format: Markdown
description: High-level task contract
name: task_api.py
format: Python
description: Stable observation wrapper API
name: submission_format.md
format: Markdown
description: Exact required deliverable shape
name: runtime_env/pyproject.toml
format: TOML
description: Canonical agent-facing runtime manifest
Whole-Slide Tumor Localization
Domain: health_medicine — Clinical Diagnostics & Imaging

Summary: Navigate a CAMELYON16 whole-slide pathology image with provided OpenSlide helper tools and output a structured tumor localization result.

Task prompt:
You are working on a Linux VM with a CAMELYON16 whole-slide pathology image.

Visible files:
- Whole-slide image: `center_point/input/tumor_001.tif`
- Python helper module: `center_point/input/wsi_tools.py`
- Optional runtime dependency manifest: `center_point/input/runtime_env/pyproject.toml`

The helper module provides a `WSINavigationEnvironment` class with methods for slide metadata, thumbnails, region reads, and tissue masks. Use those tools, plus visual inspection of H&E tissue patches, to navigate the slide and localize tumor metastasis.

Your task for this variant:
Find a representative level-0 coordinate near the center of the tumor metastasis. Write `{"x": <float>, "y": <float>}`.

Output requirements:
- Save exactly one JSON file at `center_point/output/prediction.json`.
- Use level-0 slide coordinates.
- Do not modify files under `input/`.
- Do not write outside your assigned output directory.


Required actions:
Use the staged `tumor_001.tif` and `wsi_tools.py` helper module.
Navigate the whole-slide image systematically with metadata, thumbnails, tissue masks, and patch reads.
Visually identify tumor metastasis in H&E tissue patches.
Write exactly one variant-specific `output/prediction.json` file.
Do not modify staged input files or write outside the assigned output directory.

Software: Python
OpenSlide
NumPy
Pillow
Shapely

Input files:
name: tumor_001.tif
format: BigTIFF whole-slide image
description: CAMELYON16 sentinel lymph node whole-slide image.
name: wsi_tools.py
format: Python module
description: OpenSlide-based helper class for slide metadata, thumbnails, region reads, and tissue masks.
name: pyproject.toml
format: Python project manifest
description: Optional agent-runtime dependency manifest.
AGORA AI Governance Document Classification
Domain: legal — Compliance & Regulatory

Summary: Classify three cached AI governance documents across legislative status, technical scope, and AI lifecycle stages with verbatim evidence and a gap analysis.

Task prompt:
You are working on a Linux VM as a policy analyst.

Visible task files:
- `base/input/task_spec.md`
- `base/input/taxonomy_and_instructions.md`
- `base/input/document_index.json`
- `base/input/documents/`
- `base/software/README.txt`
- `base/software/python` (optional Python helper entry point)

Your task:
1. Read `task_spec.md`, the sanitized taxonomy instructions, and all three cached document text files.
2. Classify AGORA IDs 768, 1293, and 2047 across legislative status, technical scope, and AI lifecycle stage.
3. For every TRUE label, provide a verbatim evidence quote from the corresponding cached document text.
4. Produce a cross-document matrix and a 150-300 word gap analysis.
5. Write valid JSON to:
   - `base/output/agent_output.json`

Rules:
- Do not modify files under `input/`.
- Use the cached documents under `input/documents/` as the canonical evidence source.
- Keep the final deliverable at exactly `base/output/agent_output.json`.


Required actions:
Read input/task_spec.md, input/taxonomy_and_instructions.md, input/document_index.json, and the three cached document text files.
Classify each document across the provided legislative-status, technical-scope, and lifecycle-stage taxonomies.
Provide verbatim evidence quotes from the cached text for every TRUE label.
Write output/agent_output.json with the requested structured JSON, cross-document matrix, and gap analysis.

Software: Python 3.14.3

Input files:
name: task_spec.md
format: Markdown
description: Agent-visible task instructions and required output schema.
name: taxonomy_and_instructions.md
format: Markdown
description: Sanitized taxonomy definitions and public task instructions.
name: document_index.json
format: JSON
description: Cached document titles, source URLs, and local text filenames.
name: documents
format: Text directory
description: Cached public document text for AGORA IDs 768, 1293, and 2047.
BAC Arbitration Fee Calculation
Domain: legal — Doctrinal Legal Research

Summary: Calculate Beijing Arbitration Commission institution fees, arbitrator remuneration, and total fees for five arbitration cases using staged Chinese PDF fee schedules.

Task prompt:
You are calculating arbitration fees under the staged Beijing Arbitration Commission (BAC) materials.

## Closed-Book Rule

- Use only the staged materials under `base/input`.
- Do not use outside web search or external regulatory knowledge.

## Inputs

- Task brief: `base/input/task_brief.md`
- Case facts: `base/input/cases.json`
- Output contract: `base/input/output_contract.json`
- Document manifest: `base/input/document_manifest.json`
- BAC PDF documents: `base/input/documents`
- Optional Python runtime manifest: `base/input/runtime_env/pyproject.toml`
- Python 3.12 entry point: `base/software/python3.12`

## Your Task

Calculate, for each of the five listed cases:

- institution fee in RMB;
- arbitrator remuneration in RMB;
- total fee in RMB.

All values must be accurate to two decimal places. Case 4 has a special condition: the parties reached a settlement agreement regarding the dispute before applying for arbitration.

If you want Python PDF tooling, install/use the package manifest under `input/runtime_env/`; do not modify files under `input/`.

## Deliverable

Write exactly one JSON file here:

`base/output/arbitration_fee_results.json`

Follow the schema in `base/input/output_contract.json`. The evaluated numeric fields for each case are:

- `institution_fee_rmb`
- `arbitrator_remuneration_rmb`
- `total_fee_rmb`


Required actions:
Use only the staged BAC source PDFs, case facts, and schema under `input/`.
Calculate the institution fee, arbitrator remuneration, and total fee for all five cases.
Report all evaluated amounts in RMB to two decimal places.
Write exactly one JSON file to `output/arbitration_fee_results.json`.
Do not modify files under `input/`; write final work only under `output/`.

Software: Python

Input files:
name: task_brief.md
format: Markdown
description: Agent-facing task brief and deliverable path.
name: cases.json
format: JSON
description: Five dispute amounts and the Case 4 settlement condition.
name: output_contract.json
format: JSON
description: Required output filename and case field schema.
name: document_manifest.json
format: JSON
description: Manifest for the seven staged BAC PDFs.
name: documents
format: PDF directory
description: Seven BAC Chinese-language PDF source documents.
name: pyproject.toml
format: TOML
description: Optional Python PDF-library runtime manifest.
name: python3.12
format: Shell wrapper
description: Python 3.12 entry point verified during Stage 4.