Review ask

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

Lifecycle: reviewedEditUnder review
What this benchmark means
README.md

Public 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:

  • BMI holds body mass index: WEIGHTKG divided by the square of height in metres (HEIGHTCM divided by 100). It is empty when HEIGHTCM is missing or zero, or when WEIGHTKG is missing.
  • BMI_FN carries the same index as calculated by the project routine from HEIGHTCM and WEIGHTKG; 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 review
1 source file

input/adsl.csv

Edit
7 rows
input/adsl.csv
STUDYIDUSUBJIDHEIGHTCMWEIGHTKG
YAMAA-0118081
YAMAA-0116064
YAMAA-0115045
YAMAA-01—70
YAMAA-01175—
YAMAA-01——
YAMAA-012000

Expected output

Under review
7 expected rows

expected/adsl.csv

Edit
7 rows
expected/adsl.csv
STUDYIDUSUBJIDHEIGHTCMWEIGHTKGBMIBMI_FN
YAMAA-01180812525
YAMAA-011606424.99999999999999624.999999999999996
YAMAA-01150452020
YAMAA-01—70——
YAMAA-01175———
YAMAA-01————
YAMAA-01200000
Shaded columns are derived— = missing value

Human review and assessment

Your review

3 questions and your comments · View benchmark discussions

Mapping spec

Generated from the benchmark YAML; do not edit by hand

Dataset NameVariable NameVariable LabelTypeCodelist/Controlled TermsCoreComputational MethodOrigin
ADSLSTUDYIDStudy IdentifiercharacterCopy value from SOURCE.STUDYID.Predecessor
ADSLUSUBJIDUnique Subject IdentifiercharacterCopy value from SOURCE.USUBJID.Predecessor
ADSLHEIGHTCMHeight (cm)numericCopy value from SOURCE.HEIGHTCM.Predecessor
ADSLWEIGHTKGWeight (kg)numericCopy value from SOURCE.WEIGHTKG.Predecessor
ADSLBMIBody Mass Index (kg/m2)numericCompute WEIGHTKG / POWER(NULLIF(HEIGHTCM, 0) / 100, 2).Derived
ADSLBMI_FNBody Mass Index via Project Routine (kg/m2)numericCall project function bmi with weight_kg = WEIGHTKG, height_cm = HEIGHTCM and cm_per_m = 100.Derived
VersionDateAuthorDescriptionReviewerSign-off
1.72026-10-20yamaa docs buildRead 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.62026-10-17yamaa docs buildDescribe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight
1.52026-10-17yamaa docs buildName 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.42026-10-15yamaa docs buildState datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks
1.32026-09-29yamaa docs buildShow study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata
1.22026-09-29yamaa docs buildClassify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived
1.12026-09-29yamaa docs buildResolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML
1.0yamaa docs buildInitial generation from spec.yaml

Agent prompt

The request an agent receives with the input files; each tier states no more than the one above

prompts/adam-adsl-bmi/full.md

Edit
16 lines

Following 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

Edit
10 lines

Following 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

Edit
8 lines

Following 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.

yamaa code

Public calls generated from benchmark.yaml; results must match the expected output

R

Edit
3 lines
library(yamaa)yamaa_project("project.yaml")$spec("ADSL")$run()$output

Python

Edit
3 lines
import yamaayamaa.project("project.yaml").spec("ADSL").run().output

Solution without yamaa

Written from the full prompt and the inputs alone; CI checks it reproduces the expected output

solutions/adam-adsl-bmi/result.R

Edit
31 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

Edit
81 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

Edit
17 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;