jayadharshani/Energy huggingface dataset:
CRF To SDTM Mapping Specification
Domain: health_medicine — Clinical Research & Trial Operations

Summary: Create a field-level mapping CSV from clinical CRF and define.xml source documents to SDTM domain variables. The task has CM, VS, and DS variants with matching supplemental qualifier datasets.

Task prompt:
You are preparing a field-level CRF-to-SDTM mapping specification on Linux.

## Your Task
Create the Concomitant Medications mapping for study C4591001.

## Visible Inputs
- Task brief: `base/input/task_brief.md`
- Output contract: `base/input/output_contract.json`
- Source documents directory: `base/input/source_documents`
- Optional Python runtime manifest: `base/input/runtime_env`

The source documents include the sample CRF PDF, annotated CRF PDF, SDTM define.xml,
and supplemental define.xml material. Use those files to identify form fields and
their target SDTM variables for `CM` and, where applicable,
`SUPPCM` supplemental qualifiers.

## Required Output
Save exactly one CSV file:

```text
base/output/cm_mapping.csv
```

The CSV must contain exactly these columns in this order:

```text
crf_form, crf_field_label, crf_item_or_placeholder, sdtm_dataset, sdtm_variable, role, origin, mapping_rule, controlled_terms_or_expected_values, goes_to_suppqual, notes
```

## Example Row

The following shows one correctly formatted CSV row to illustrate the expected
schema (header + data). Include only rows for CRF-sourced fields; omit derived
or protocol-level variables (e.g. STUDYID, DOMAIN, USUBJID) that have no
corresponding CRF field.

```csv
crf_form,crf_field_label,crf_item_or_placeholder,sdtm_dataset,sdtm_variable,role,origin,mapping_rule,controlled_terms_or_expected_values,goes_to_suppqual,notes
CONCOMITANT MEDICATIONS - BASELINE (CONMED BSL),What is the medication identifier?,Sponsor-Defined Identifier,CM,CMSPID,Identifier,CRF,Map the sponsor-defined medication identifier to CMSPID.,,NO,aCRF page 15 annotates Sponsor-Defined Identifier to CMSPID for baseline concomitant medications.
```

## Constraints
- Produce a mapping specification only, not subject-level records or XPT datasets.
- Keep all generated files inside `base/output`.
- Do not modify files under `base/input`.
- Use the visible task files only; do not use external web sources.


The agent must:
Read the variant's task brief and output contract.
Inspect the sample CRF, annotated CRF, SDTM define.xml, and supplemental define.xml source documents.
Identify CRF field-level mappings for the variant's primary SDTM dataset and supplemental qualifier dataset.
Write exactly one mapping CSV with the required columns in the selected output directory.

Software: Python
uv
pandas
pypdf
lxml

Input files:
name: task_brief.md
format: md
description: Variant-specific instructions and output filename.
name: output_contract.json
format: json
description: Required CSV columns, allowed datasets, and format constraints.
name: source_documents
format: pdf/xml
description: Sample CRF, annotated CRF, SDTM define.xml, and supplemental define.xml files.
name: runtime_env
format: pyproject/uv.lock
description: Optional Python dependency manifest for agents that want pandas, pypdf, or lxml.
CRF To SDTM Mapping Specification 4
Domain: health_medicine — Clinical Research & Trial Operations

Summary: Create field-level mapping CSVs from clinical CRF and define.xml source documents to SDTM AE/SUPPAE or DM/SUPPDM variables.

Task prompt:
You are preparing a field-level CRF-to-SDTM mapping specification on Linux.

## Your Task
Create the Adverse Events mapping for study C4591001.

## Visible Inputs
- Task brief: `base/input/task_brief.md`
- Output contract: `base/input/output_contract.json`
- Source documents directory: `base/input/source_documents`
- Optional Python runtime manifest: `base/input/runtime_env`

The source documents include the sample CRF PDF, annotated CRF PDF, SDTM define.xml,
and supplemental define.xml material. Use those files to identify form fields and
their target SDTM variables for `AE` and, where applicable,
`SUPPAE` supplemental qualifiers.

## Required Output
Save exactly one CSV file:

```text
base/output/ae_mapping.csv
```

The CSV must follow the column order and constraints in `base/input/output_contract.json`.
`goes_to_suppqual` must mark AE rows as NO and SUPPAE rows as YES.

## Constraints
- Produce a mapping specification only, not subject-level records or XPT datasets.
- Keep all generated files inside `base/output`.
- Do not modify files under `base/input`.
- Use the visible task files only; do not use external web sources.


The agent must:
Read the variant's task brief and output contract.
Inspect the sample CRF, annotated CRF, SDTM define.xml, and supplemental define.xml source documents.
Identify CRF field-level mappings for the variant's primary SDTM dataset and supplemental qualifier dataset.
Write exactly one mapping CSV with the required columns in the selected output directory.

Software: Python
uv
pandas
pypdf
lxml

Input files:
name: task_brief.md
format: md
description: Variant-specific instructions and output filename.
name: output_contract.json
format: json
description: Required CSV columns, allowed datasets, and format constraints.
name: source_documents
format: pdf/xml
description: Sample CRF, annotated CRF, SDTM define.xml, and supplemental define.xml files.
name: runtime_env
format: pyproject/uv.lock
description: Optional Python dependency manifest for agents that want pandas, pypdf, or lxml.
ECG Superclass Ptbxl
Domain: health_medicine — Therapeutic & Oncology Services

Summary: Variant ptbxl 1386: Single PTB XL derived diagnostic superclass benchmark slice with 1,386 anonymized ECG records.

Task prompt:
You are a computational precision health researcher working on staged ECG waveform data.

## Variant
`ptbxl_1386`: Single PTB-XL-derived diagnostic superclass benchmark slice with 1,386 anonymized ECG records.

## Your Task
Produce multilabel diagnostic superclass predictions for the staged WFDB ECG records.

## Input Files
- WFDB records directory: `ptbxl_1386\input\records`
- Required ECG ID list: `ptbxl_1386\input\record_ids.csv`
- Label glossary: `ptbxl_1386\input\label_codebook.csv`
- Output template: `ptbxl_1386\input\template_output.csv`

## Software
- Task-local command prompt helper: `ptbxl_1386\software\open_input_cmd.bat`
- Baseline package installer: `ptbxl_1386\software\install_baseline_python_packages.bat`
- You may use the system `python` on the VM, install additional open-source Python packages, and use publicly available pretrained open-source ECG models if needed

## What You Must Do
1. Read the staged ECG records from `ptbxl_1386\input\records`.
2. Use `ptbxl_1386\input\record_ids.csv` as the exact required output row set.
3. Use any CPU-feasible multilabel workflow you judge appropriate, including signal interpretation, feature engineering, classical ML, or pretrained open-source ECG models.
4. Write one CSV exactly to:
   `ptbxl_1386\output\predictions.csv`

## Output Requirements
- The file must be named exactly `predictions.csv`
- The columns must be exactly:
  `ecg_id, NORM, MI, STTC, CD, HYP`
- Include exactly the ECG IDs from `ptbxl_1386\input\record_ids.csv`
- Every label value must be binary: `0` or `1`
- Do not save extra files into `ptbxl_1386\output`

## Important Constraints
- Treat this as a multilabel problem; labels are not guaranteed to be mutually exclusive
- Use the staged task files as the source of truth for row set and schema

The agent must:
Open the staged task directory on the Windows VM and inspect the ECG bundle under `input/`.
Load all 1,386 WFDB records from `input/records/` and build a multi-label classifier for the five superclass labels `NORM`, `MI`, `STTC`, `CD`, and `HYP`.
Write `output/predictions.csv` with exactly the IDs from `input/record_ids.csv` and binary predictions for all five labels.
Make the modeling decisions needed to get there under CPU-only constraints, including waveform preprocessing, model selection, multilabel thresholding, and whether to use direct signal interpretation, classical ML, or publicly available pretrained ECG models.

Software: pandas
Python

Input files:
name: ECG waveform records
format: WFDB `.hea` + `.dat` pairs
description: 1,386 anonymized 12-lead, 500 Hz, 10 s ECGs
name: Record ID list
format: `.csv`
description: Exact required output ID set
name: Label codebook
format: `.csv`
description: Public meanings of the 5 superclass labels
name: Output template
format: `.csv`
description: Canonical header and row order for predictions.csv
FluSight Offline Hospital Forecast
Domain: health_medicine — Public Health & Epidemiology

Summary: Produce a FluSight-style weekly influenza hospitalization forecast from an archived public snapshot as of 2024-12-14 and write the required submission CSV.

Task prompt:
You are working on a Linux VM to produce a FluSight-style offline influenza hospitalization forecast.

Visible task files:
- `base/input/task_prompt.md`
- `base/input/output_contract.json`
- `base/input/TASK_INSTRUCTIONS.md`
- `base/input/forecast_output_schema.md`
- `base/input/forecast_output_template.csv`
- `base/input/historical_weekly_hospital_admissions_asof_2024-12-14.csv`
- `base/input/locations.csv`
- `base/input/source_provenance.md`
- `base/input/runtime_env/pyproject.toml`
- `base/input/runtime_env/uv.lock`
- `base/software/bootstrap_runtime.sh`
- `base/software/python_with_task_deps.sh`

What you must do:
1. Read `base/input/task_prompt.md` and `base/input/output_contract.json` first.
2. Use the archived historical snapshot in `base/input/historical_weekly_hospital_admissions_asof_2024-12-14.csv` to forecast weekly admissions for the 53 required jurisdictions and four required target weeks.
3. Fill the staged template contract exactly and write one final file under `base/output`:
   - `base/output/submission.csv`
4. If you want the staged Python environment, materialize it with `base/software/bootstrap_runtime.sh` and run Python with `base/software/python_with_task_deps.sh`.

Rules:
- Do not use the internet or external files.
- Do not modify files under `base/input`.
- Output must contain exactly 212 rows with the required columns and integer constraints.
- Write only the required `submission.csv` into the writable output directory.


The agent must:
Read the staged task prompt and output contract before building the forecast.
Use the archived historical admissions snapshot to forecast the 53 required jurisdictions for four weekly horizons.
Keep the CSV schema and row-key contract exactly aligned with the staged template.
Write exactly one final `submission.csv` into the writable output directory.

Software: Python
uv
numpy
pandas

Input files:
name: task_prompt.md
format: markdown
description: Agent-visible benchmark brief for the offline FluSight forecasting task.
name: output_contract.json
format: json
description: Exact output filename, columns, row count, and structural constraints.
name: TASK_INSTRUCTIONS.md
format: markdown
description: Submission-supplied instructions describing the forecasting problem.
name: forecast_output_template.csv
format: csv
description: The required row-key template for the final submission.
name: historical_weekly_hospital_admissions_asof_2024-12-14.csv
format: csv
description: Archived historical weekly admissions snapshot visible to the agent.
name: locations.csv
format: csv
description: Canonical jurisdiction codes and names used by the evaluator.
name: source_provenance.md
format: markdown
description: Public provenance note for the archived FluSight historical snapshot.
name: runtime_env
format: uv Python environment
description: Optional pinned Python runtime manifest used by the staged wrappers.
NSCLC Group-Sequential SAP
Domain: health_medicine — Clinical Research & Trial Operations

Summary: Produce a statistical analysis plan package for a Phase III NSCLC trial with log-rank sample size, O'Brien-Fleming interim boundaries, futility, Hochberg secondary testing, and plots.

Task prompt:
You are preparing a clinical-trial Statistical Analysis Plan on a Linux VM.

## Task Folder
`base`

## Inputs
- Protocol JSON: `base/input/protocol.json`
- Detailed instructions: `base/input/task_instructions.md`

## Goal
Create the full SAP deliverable set in:
`base/output`

Required output filenames:
- `SAP.md`
- `analysis.R`
- `sample_size.json`
- `boundaries.csv`
- `multiple_testing.json`
- `power_curve.csv`
- `power_curve.png`
- `boundary_plot.png`

Read the protocol and instructions, compute the group-sequential design quantities, document the SAP, and include a reproducible R script. Do not use internet access. Hidden reference values and grading logic are not visible during solve time.

The agent must:
Read `input/protocol.json` and `input/task_instructions.md`.
Compute the sample size, interim monitoring boundaries, futility rule, multiplicity allocation, and power curve.
Write the required JSON, CSV, PNG, Markdown, and R script outputs under `output/`.
Use only the staged protocol and instructions; do not use internet access.

Software: R
gsDesign
rpact
ggplot2

Input files:
name: Protocol
format: json
description: Sanitized self-contained NSCLC trial protocol parameters.
name: Task Instructions
format: md
description: Output contract and statistical requirements.
name: Runtime Note
format: txt
description: Recommended R package stack.
TCGA LUAD KRAS Survival Analysis
Domain: health_medicine — Public Health & Epidemiology

Summary: Download public TCGA-LUAD data from GDC, build a KRAS-stratified survival cohort, and export Kaplan-Meier and Cox proportional hazards results.

Task prompt:
You are a bioinformatics analyst performing a TCGA-LUAD KRAS survival analysis on Linux.

Task directory:
- `base`

Visible files and directories:
- Task specification: `base/input/task_spec.json`
- Detailed instructions: `base/input/task_description.txt`
- Output contract: `base/input/output_requirements.txt`
- Runtime notes: `base/input/runtime_notes.txt`
- Software notes: `base/software/README.txt`

What you need to do:
1. Use public TCGA-LUAD data from the GDC Data Portal.
2. Download the clinical data and STAR-count expression data for the LUAD cohort.
3. Extract KRAS (`ENSG00000133703`) expression, merge it with survival and clinical covariates, and stratify patients into high/low KRAS groups using the cohort median.
4. Fit a Kaplan-Meier analysis, a log-rank test, and a Cox proportional hazards model with KRAS group, age, and stage grouping.
5. Save every required output under `base/output`.

Required output files:
- `cohort.csv`
- `km_plot.png`
- `cox_results.json`
- `analysis.R`

Do not modify staged inputs or evaluator-only directories.
Do not ask for confirmation. Execute directly.


The agent must:
Read the staged task specification and output contract.
Download public TCGA-LUAD clinical and STAR-count expression data from GDC.
Extract KRAS expression and merge it with survival and clinical covariates.
Stratify patients into high and low KRAS groups using the cohort median.
Fit Kaplan-Meier, log-rank, and Cox proportional hazards analyses.
Write `cohort.csv`, `km_plot.png`, `cox_results.json`, and `analysis.R` under `output/`.

Software: R
TCGAbiolinks
survival
survminer
ggplot2
jsonlite

Input files:
name: task_spec.json
format: JSON
description: Original submission specification describing the TCGA-LUAD KRAS survival task.
name: task_description.txt
format: TXT
description: Benchmark-owned execution brief derived from the submission.
name: output_requirements.txt
format: TXT
description: Lists the required output filenames and minimum content expectations.
name: runtime_notes.txt
format: TXT
description: Notes about the public-data runtime workflow.
name: software/README.txt
format: TXT
description: Operational notes about the planned benchmark-owned R runtime surface.
Build A Pinned Clinical Variant Annotation Table
Domain: health_medicine — Genomics & Sequence Analysis

Summary: Parse a staged 50-variant NA12878-derived VEP snapshot bundle, recover gene / consequence / frequency / ClinVar annotations, and emit the exact reportable subset.

Task prompt:
You are working on a Linux clinical-variant annotation task.

Task directory:
- `base`

Visible inputs:
- Variant list: `base/input/variants_to_annotate.tsv`
- Raw VEP snapshots: `base/input/annotation_snapshots/vep_batch_responses.jsonl`
- Rule / provenance manifest: `base/input/source_manifest.json`
- Task-local runtime manifest: `base/input/runtime_env/pyproject.toml`
- Task-local runtime lockfile: `base/input/runtime_env/uv.lock`

Your job:
1. Work from a writable directory under `base/output`.
2. Read the 50 staged variants in order.
3. Parse the raw VEP snapshot JSON lines and derive, for each variant:
   - `gene`
   - `consequence`
   - `max_population_af`
   - `clinvar_significance`
   - `is_reportable`
4. Filter the reportable subset exactly according to `base/input/source_manifest.json`.
5. Write these files under `base/output`:
   - `annotated_variants.tsv`
   - `reportable_variants.tsv`
   - `pipeline.py`
   - `run_log.json`

Output rules:
- `annotated_variants.tsv` and `reportable_variants.tsv` must use tab-separated columns with this exact header:
  `variant_id chrom pos ref alt gene consequence max_population_af clinvar_significance is_reportable`
- `reportable_variants.tsv` must contain only rows where `is_reportable=yes`
- `pipeline.py` should be your solver-authored pipeline implementation
- `run_log.json` must be valid UTF-8 JSON and include the emitted row counts
- Treat `base/input` as read-only source data
- Do not use hidden evaluator-owned files

Recommended setup:
- You may work with the system `python`, or create a task-local environment from `base/input/runtime_env` with:
  `uv sync --frozen --project input/runtime_env`

Do not ask for confirmation. Execute directly.


The agent must:
Read the staged 50-variant TSV in order.
Parse the raw VEP JSONL snapshot bundle and derive gene / consequence / AF / ClinVar fields.
Apply the reportable rule from `input/source_manifest.json` exactly.
Write `annotated_variants.tsv`, `reportable_variants.tsv`, `pipeline.py`, and `run_log.json` under `output/`.

Software: Python
uv
pandas
Ensembl VEP snapshot

Input files:
name: Variant list
format: tsv
description: 50 pinned NA12878-derived coding variants in canonical output order.
name: VEP snapshot bundle
format: jsonl
description: Raw VEP responses the agent must parse.
name: Rule manifest
format: json
description: Visible reportable-variant rule and provenance notes.
name: Runtime manifest
format: toml
description: Optional task-local dependency manifest.
name: Runtime lockfile
format: lock
description: Locked dependency set for deterministic `uv sync --frozen`.
LTMLE Targeted Bootstrap Simulation Study
Domain: health_medicine — Economics & Quantitative Social Research

Summary: Reconstruct a six-script R simulation pipeline for a longitudinal LMTP variance study and reproduce the required summary and report outputs from the staged public materials.

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

Read these staged inputs first:
- `base/input/LTMLE_Targeted_Bootstrap_Task_INPUT/01_data_generation_longitudinal.R`
- `base/input/LTMLE_Targeted_Bootstrap_Task_INPUT/lmtp-bootstrap`
- `base/input/LTMLE_Targeted_Bootstrap_Task_INPUT/tmleVariance.pdf`
- `base/input/public_benchmark/README_output.md`
- `base/input/public_benchmark/reference_summary.csv`
- `base/input/public_benchmark/study_plan_public.json`

Your job is to reconstruct the missing longitudinal simulation pipeline and write the required deliverables under `base/output`.

Required pipeline files:
- `base/output/02_variance_methods_longitudinal.R`
- `base/output/03_simulation_runner_longitudinal.R`
- `base/output/04_analysis_functions_longitudinal.R`
- `base/output/05_run_full_simulation_longitudinal.R`
- `base/output/06_analyze_part2_results_longitudinal.R`
- `base/output/06b_analyze_by_sample_size.R`

Required generated outputs:
- `base/output/summary.csv`
- `base/output/report.pdf`

Requirements:
1. Use the bundled longitudinal DGP, the local `lmtp-bootstrap` source tree, the variance paper, and the public benchmark materials under `input/public_benchmark/`.
2. Cover the two public benchmark scenarios from `study_plan_public.json` and generate your own `summary.csv` plus `report.pdf` from a working pipeline.
3. The public benchmark summary is visible for orientation, but do not treat it as a file to relocate or copy into `output/`.
5. Write solver-created files only under `base/output`.


The agent must:
Read the staged longitudinal DGP, bundled `lmtp-bootstrap` source tree, variance paper, and public benchmark materials under `input/public_benchmark/`.
Reconstruct the missing six-file R pipeline for the standard LMTP, full-data targeting, and targeted-bootstrap inference workflows.
Run the required `n=200` and `n=1000` study settings from the public study plan.
Write the six R scripts plus `summary.csv` and `report.pdf` under `output/`.

Software: R
lmtp
SuperLearner

Input files:
name: Longitudinal DGP script
format: `.R`
description: Defines the longitudinal data-generating process and Monte Carlo truth helper
name: Bundled lmtp source tree
format: directory
description: Local package source required for the task-specific LMTP methods
name: Variance paper
format: `.pdf`
description: Public theory reference for the variance-estimation approaches
name: Public benchmark note
format: `.md`
description: Explains the public benchmark surface and expected solve-time layout
name: Public benchmark summary
format: `.csv`
description: Visible benchmark summary for orientation
name: Public study plan
format: `.json`
description: Lists the two required public benchmark scenarios
NHANES Confounder Sensitivity Analysis
Domain: health_medicine — Public Health & Epidemiology

Summary: Rebuild a clinical sensitivity-analysis cohort from staged NHANES tables and produce the required participant subset plus logistic-regression summary outputs.

Task prompt:
You are working on a Linux precision-health data-analysis task.

Read the staged benchmark brief and output contract first:
- `base/input/task_spec.txt`
- `base/input/output_contract.json`

Visible task inputs:
- `base/input/3.demographics_clean_cycle1.csv`
- `base/input/7.questionnaire_clean_cycle1.csv`
- `base/input/8.response_clean_cycle1.csv`
- `base/input/5.medications_clean_cycle1.csv`

If you want the pinned Python environment, use:
- `base/software/python_with_task_deps.sh`

Your job is to rebuild the analytic cohort and export exactly these files under `base/output`:
- `base/output/hpyl_nsaid_subset.csv`
- `base/output/sensitivity_summary.csv`

Requirements:
1. Follow the exact cohort construction, variable derivations, and model definitions in `task_spec.txt`.
2. Use `output_contract.json` for the exact output filenames, column order, formulas, and metadata fields.
4. Write only the required task outputs under `base/output`.


The agent must:
Read `input/task_spec.txt` and `input/output_contract.json` before doing any analysis.
Rebuild the analytic cohort and the non-missing `LBXHP1` subset from the four staged NHANES CSVs.
Write `output/hpyl_nsaid_subset.csv` with the exact required participant-level schema.
Write `output/sensitivity_summary.csv` with the exact required three-row model summary schema.

Software: Python
uv
pandas
NumPy
SciPy
statsmodels

Input files:
name: task_spec.txt
format: text
description: Agent-visible benchmark brief describing the cohort construction and model requirements.
name: output_contract.json
format: json
description: Exact output schema, formulas, and metadata contract for the two required CSV files.
name: 3.demographics_clean_cycle1.csv
format: csv
description: Demographics table keyed by `SEQN_new` and `SDDSRVYR`.
name: 7.questionnaire_clean_cycle1.csv
format: csv
description: Questionnaire table containing ulcer and chronic-condition fields.
name: 8.response_clean_cycle1.csv
format: csv
description: Response table containing BMI and `LBXHP1` serology values.
name: 5.medications_clean_cycle1.csv
format: csv
description: Medication exposure table with free-text `RXDDRUG` entries.
name: runtime_env
format: uv Python environment
description: Pinned optional Python runtime manifest for pandas/numpy/scipy/statsmodels.