As a clinical trial statistician or programmer, challenge anything in this benchmark: describe a problem in Comments, or propose a fix with the Edit button on any source file.
- Task: Would a real study need this derivation, specified this way? Does it follow CDISC ADaM: variable names, controlled terms, record structure? Flag any rule that is ambiguous or that a sponsor would handle differently.
- Inputs: Do they look like data collected in a real trial, and do they include the situations you would expect to meet in one?
- Expected output: Would independent QC programming reproduce every value from these inputs and rules?
The other tabs beside Comments are background for assessment, not under review.
Summary
README.mdGoal: derive body mass index (BMI) two ways - once as an inline
expression and once via a routine the project supplies (BMI_FN) -
and show both columns carry the same value on every record.
Input: subject-level records carrying height in centimetres
(HEIGHTCM) and weight in kilograms (WEIGHTKG); both are carried
through unchanged.
Variables:
BMIholds body mass index:WEIGHTKGdivided by the square of height in metres (HEIGHTCMdivided by 100). It is empty whenHEIGHTCMis missing or zero, or whenWEIGHTKGis missing.BMI_FNcarries the same index as calculated by the project routine fromHEIGHTCMandWEIGHTKG; empty when height or weight is missing.
Note: both columns agree on every record: a zero weight gives a zero index, and a missing height or weight leaves both empty.
Inputs
Under review1 source fileinput/adsl.csv
Edit7 rows| STUDYID | USUBJID | HEIGHTCM | WEIGHTKG |
|---|---|---|---|
| YAMAA-01 | 180 | 81 | |
| YAMAA-01 | 160 | 64 | |
| YAMAA-01 | 150 | 45 | |
| YAMAA-01 | — | 70 | |
| YAMAA-01 | 175 | — | |
| YAMAA-01 | — | — | |
| YAMAA-01 | 200 | 0 |
Expected output
Under review7 expected rowsexpected/adsl.csv
Edit7 rows| STUDYID | USUBJID | HEIGHTCM | WEIGHTKG | BMI | BMI_FN |
|---|---|---|---|---|---|
| YAMAA-01 | 180 | 81 | 25 | 25 | |
| YAMAA-01 | 160 | 64 | 24.999999999999996 | 24.999999999999996 | |
| YAMAA-01 | 150 | 45 | 20 | 20 | |
| YAMAA-01 | — | 70 | — | — | |
| YAMAA-01 | 175 | — | — | — | |
| YAMAA-01 | — | — | — | — | |
| YAMAA-01 | 200 | 0 | 0 | 0 |
Comments and assessment materials
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADSL | STUDYID | Study Identifier | character | Copy value from SOURCE.STUDYID. | Predecessor | ||
| ADSL | USUBJID | Unique Subject Identifier | character | Copy value from SOURCE.USUBJID. | Predecessor | ||
| ADSL | HEIGHTCM | Height (cm) | numeric | Copy value from SOURCE.HEIGHTCM. | Predecessor | ||
| ADSL | WEIGHTKG | Weight (kg) | numeric | Copy value from SOURCE.WEIGHTKG. | Predecessor | ||
| ADSL | BMI | Body Mass Index (kg/m2) | numeric | Compute WEIGHTKG / POWER(NULLIF(HEIGHTCM, 0) / 100, 2). | Derived | ||
| ADSL | BMI_FN | Body Mass Index via Project Routine (kg/m2) | numeric | Call project function bmi with weight_kg = WEIGHTKG, height_cm = HEIGHTCM and cm_per_m = 100. | Derived |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 1.3 | 2026-09-29 | yamaa docs build | Show study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata | ||
| 1.2 | 2026-09-29 | yamaa docs build | Classify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived | ||
| 1.1 | 2026-09-29 | yamaa docs build | Resolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML | ||
| 1.0 | yamaa docs build | Initial generation from spec.yaml |
prompts/adam-adsl-bmi/full.md
Edit14 linesFollowing CDISC ADaM standards, use the provided SOURCE dataset to create an ADSL dataset with one record per subject.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, HEIGHTCM, WEIGHTKG, BMI, BMI_FN
BMI holds body mass index from weight in kilograms and height in centimetres, with height converted from centimetres to metres, and is not rounded. It has no value when height is missing or zero, or when weight is missing; a zero weight gives a zero index. BMI_FN repeats BMI.
Read the source datasets from /app/input and save the completed dataset as /app/output/adsl.csv.
prompts/adam-adsl-bmi/conventions.md
Edit10 linesFollowing CDISC ADaM standards, use the provided SOURCE dataset to create an ADSL dataset with one record per subject.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, HEIGHTCM, WEIGHTKG, BMI, BMI_FN
BMI is not rounded.
Read the source datasets from /app/input and save the completed dataset as /app/output/adsl.csv.
prompts/adam-adsl-bmi/brief.md
Edit8 linesFollowing CDISC ADaM standards, use the provided SOURCE dataset to create an ADSL dataset with one record per subject.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, HEIGHTCM, WEIGHTKG, BMI, BMI_FN
Read the source datasets from /app/input and save the completed dataset as /app/output/adsl.csv.
run.R
Edit4 lineslibrary(yamaa)adsl <- yamaa_domain("spec.yaml", environment = "r/environment.yaml")$outputadslrun.py
Edit4 linesimport yamaaadsl = yamaa.domain("spec.yaml", environment="python/environment.yaml").outputadslsolutions/adam-adsl-bmi/result.R
Edit31 lines# Reference solution for the yamaa benchmark adam-adsl-bmi (R track).## Written from the benchmark's full prompt and its inputs alone, as an agent# would write it. Harbor's oracle agent runs it to check that the prompt can# be solved and that the grader scores a correct answer 1.library(dplyr, warn.conflicts = FALSE)library(readr)src <- read_csv( "/app/input/adsl.csv", col_types = cols( HEIGHTCM = col_double(), WEIGHTKG = col_double(), .default = col_character() ))adsl <- src |> mutate( BMI = if_else( is.na(HEIGHTCM) | HEIGHTCM == 0 | is.na(WEIGHTKG), NA_real_, WEIGHTKG / ((HEIGHTCM / 100)^2) ), BMI_FN = BMI ) |> select(STUDYID, USUBJID, HEIGHTCM, WEIGHTKG, BMI, BMI_FN)dir.create("/app/output", showWarnings = FALSE)write_csv(adsl, "/app/output/adsl.csv", na = "")solutions/adam-adsl-bmi/result.py
Edit26 lines# Reference solution for the yamaa benchmark adam-adsl-bmi (Python track).## Written from the benchmark's full prompt and its inputs alone, as an agent# would write it. Harbor's oracle agent runs it to check that the prompt can# be solved and that the grader scores a correct answer 1.from pathlib import Pathimport polars as plsrc = pl.read_csv("/app/input/adsl.csv", infer_schema=False)height = pl.col("HEIGHTCM").cast(pl.Float64, strict=False)weight = pl.col("WEIGHTKG").cast(pl.Float64, strict=False)bmi = ( pl.when(height.is_null() | (height == 0) | weight.is_null()) .then(None) .otherwise(weight / ((height / 100).pow(2))))adsl = src.with_columns(BMI=bmi, BMI_FN=bmi).select( "STUDYID", "USUBJID", "HEIGHTCM", "WEIGHTKG", "BMI", "BMI_FN")Path("/app/output").mkdir(exist_ok=True)adsl.write_csv("/app/output/adsl.csv")solutions/adam-adsl-bmi/result.sas
Edit20 lines/* opensas reference solution for the yamaa benchmark adam-adsl-bmi. Reads the benchmark inputs and derives the requested output. Execute with the existing opensas runtime: opensas /app/output/result.sas. */data adsl; length STUDYID USUBJID $1024; infile "/app/input/adsl.csv" dsd dlm="," firstobs=2 truncover lrecl=32767; input STUDYID : $char1024. USUBJID : $char1024. HEIGHTCM WEIGHTKG;run;data result; set adsl; if not missing(HEIGHTCM) and HEIGHTCM ne 0 and not missing(WEIGHTKG) then BMI=WEIGHTKG/(HEIGHTCM/100)**2; BMI_FN=BMI;run;proc sql; create table final as select STUDYID, USUBJID, HEIGHTCM, WEIGHTKG, BMI, BMI_FN from result;quit;proc export data=final outfile="/app/output/adsl.csv" dbms=csv replace; run;
yamaa
Comments
Signed in with GitHub; saved in repository Discussions