As a clinical trial statistician or programmer, answer three short questions in Your review: the task, the inputs and outputs, and the AI-assisted review. Agreeing with all three approves this benchmark; disagreeing with any needs a comment. Propose a fix with the Edit button on any source file, or add it to your comments.
We suggest spending no more than 5 minutes on a review. The other tabs beside Your review are background for assessment, not under review.
Summary
README.mdPublic entries: Python and R. Passing coverage requires an installed inventory.
Goal: 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 |
Human review and assessment
| 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.7 | 2026-10-20 | yamaa docs build | Read a specification in the 1.0 surface as its 0.5 counterpart; state that missing values stay missing where a mapping declares no missing handler, and leave out a declared missing answer that restates a handler's default | ||
| 1.6 | 2026-10-17 | yamaa docs build | Describe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight | ||
| 1.5 | 2026-10-17 | yamaa docs build | Name collected precision in words instead of letter codes; state imputation fallbacks, minimum source precision, bounds ignored outside the collected period, and invalid text with no handler as an error; describe date and datetime shifts, imputation flag codes, and partial text giving no date part | ||
| 1.4 | 2026-10-15 | yamaa docs build | State datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks | ||
| 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
Edit16 linesFollowing CDISC ADaM standards, use the provided ADSL 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 the body mass index: WEIGHTKG divided by the square of the height in metres, where the height in metres is HEIGHTCM divided by 100. BMI has no value when HEIGHTCM has no value or is zero, or when WEIGHTKG has no value. A WEIGHTKG of zero gives a BMI of zero. BMI_FN is the same body mass index, calculated by a project routine from HEIGHTCM and WEIGHTKG. BMI_FN has no value when HEIGHTCM or WEIGHTKG has no value. BMI and BMI_FN agree on every record. BMI and BMI_FN are not rounded.
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 ADSL 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 and BMI_FN are 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 ADSL 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.
R
Edit3 lineslibrary(yamaa)yamaa_project("project.yaml")$spec("ADSL")$run()$outputPython
Edit3 linesimport yamaayamaa.project("project.yaml").spec("ADSL").run().outputsolutions/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
Edit81 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."""Create an ADSL dataset with BMI derived from height and weight.Reads the ADSL dataset from /app/input and writes /app/output/adsl.csvwith one record per subject and the columns STUDYID, USUBJID, HEIGHTCM,WEIGHTKG, BMI, BMI_FN.BMI is WEIGHTKG divided by the square of the height in metres(HEIGHTCM / 100). BMI has no value when HEIGHTCM has no value or is zero,or when WEIGHTKG has no value. A WEIGHTKG of zero gives a BMI of zero.BMI_FN is the same body mass index from a project routine and agrees withBMI on every record. Neither value is rounded."""import csvdef bmi(height_cm, weight_kg): """Body mass index from height in cm and weight in kg. Returns None when the height has no value or is zero, or when the weight has no value. """ if height_cm is None or height_cm == 0 or weight_kg is None: return None height_m = height_cm / 100 return weight_kg / (height_m * height_m)def bmi_fn(height_cm, weight_kg): """Project routine for the body mass index. Has no value when HEIGHTCM or WEIGHTKG has no value, and agrees with BMI on every record. """ if height_cm is None or weight_kg is None: return None if height_cm == 0: return None height_m = height_cm / 100 return weight_kg / (height_m * height_m)def number(text): if text is None or text == "": return None return float(text)def main(): with open("/app/input/adsl.csv", newline="") as handle: rows = list(csv.DictReader(handle)) columns = ["STUDYID", "USUBJID", "HEIGHTCM", "WEIGHTKG", "BMI", "BMI_FN"] with open("/app/output/adsl.csv", "w", newline="") as handle: writer = csv.DictWriter(handle, fieldnames=columns) writer.writeheader() for row in rows: height = number(row["HEIGHTCM"]) weight = number(row["WEIGHTKG"]) bmi_value = bmi(height, weight) bmi_fn_value = bmi_fn(height, weight) writer.writerow( { "STUDYID": row["STUDYID"], "USUBJID": row["USUBJID"], "HEIGHTCM": row["HEIGHTCM"], "WEIGHTKG": row["WEIGHTKG"], "BMI": "" if bmi_value is None else bmi_value, "BMI_FN": "" if bmi_fn_value is None else bmi_fn_value, } )if __name__ == "__main__": main()solutions/adam-adsl-bmi/result.sas
Edit17 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 export data=result(keep=STUDYID USUBJID HEIGHTCM WEIGHTKG BMI BMI_FN) outfile="/app/output/adsl.csv" dbms=csv replace; run;
yamaa