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 baseline body mass index (BMIBL) with the routine the project supplies, the way a sponsor's standard macro would, and check it against the formula written inline.

Input: subject-level records carrying baseline height in centimetres (HEIGHTBL) and baseline weight in kilograms (WEIGHTBL); both are carried through unchanged.

Variables:

  • BMIBL holds the baseline body mass index from the project routine: WEIGHTBL divided by the square of height in metres (HEIGHTBL divided by 100), not rounded. It is empty when HEIGHTBL or WEIGHTBL is missing.

Note: before the dataset is written, every value of the routine is compared with the same index computed by the formula itself, and the run stops on any difference; the formula's value is not published. A zero weight gives an index of zero.

Inputs

Under review
1 source file

input/adsl.csv

Edit
7 rows
input/adsl.csv
STUDYIDUSUBJIDHEIGHTBLWEIGHTBL
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
STUDYIDUSUBJIDHEIGHTBLWEIGHTBLBMIBL
YAMAA-011808125
YAMAA-011606424.999999999999996
YAMAA-011504520
YAMAA-01—70—
YAMAA-01175——
YAMAA-01———
YAMAA-0120000
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
ADSLHEIGHTBLBaseline Height (cm)numericCopy value from SOURCE.HEIGHTBL.Predecessor
ADSLWEIGHTBLBaseline Weight (kg)numericCopy value from SOURCE.WEIGHTBL.Predecessor
ADSLBMIBLBaseline BMI (kg/m2)numericCall project function bmi with weight_kg = WEIGHTBL, height_cm = HEIGHTBL and cm_per_m = 100.Derived
VersionDateAuthorDescriptionReviewerSign-off
1.82026-11-19yamaa docs buildState open and closed range endpoints, including bounds of zero
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
15 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, HEIGHTBL, WEIGHTBL, BMIBL

HEIGHTBL is the baseline height in cm and WEIGHTBL the baseline weight in kg, as given. BMIBL is the baseline body mass index: WEIGHTBL divided by the square of the height in metres, where the height in metres is HEIGHTBL divided by 100. BMIBL has no value when HEIGHTBL has no value or is zero, or when WEIGHTBL has no value. A WEIGHTBL of zero gives a BMIBL of zero. BMIBL is 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, HEIGHTBL, WEIGHTBL, BMIBL

BMIBL 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

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, HEIGHTBL, WEIGHTBL, BMIBL

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
30 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(    HEIGHTBL = col_double(),    WEIGHTBL = col_double(),    .default = col_character()  ))adsl <- src |>  mutate(    BMIBL = if_else(      is.na(HEIGHTBL) | HEIGHTBL == 0 | is.na(WEIGHTBL),      NA_real_,      WEIGHTBL / ((HEIGHTBL / 100)^2)    )  ) |>  select(STUDYID, USUBJID, HEIGHTBL, WEIGHTBL, BMIBL)dir.create("/app/output", showWarnings = FALSE)write_csv(adsl, "/app/output/adsl.csv", na = "")

solutions/adam-adsl-bmi/result.py

Edit
62 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 baseline BMI from baseline 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, HEIGHTBL,WEIGHTBL, BMIBL.BMIBL is WEIGHTBL divided by the square of the height in metres(HEIGHTBL / 100). BMIBL has no value when HEIGHTBL has no value or iszero, or when WEIGHTBL has no value. A WEIGHTBL of zero gives a BMIBL ofzero. The value is not 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 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", "HEIGHTBL", "WEIGHTBL", "BMIBL"]    with open("/app/output/adsl.csv", "w", newline="") as handle:        writer = csv.DictWriter(handle, fieldnames=columns)        writer.writeheader()        for row in rows:            value = bmi(number(row["HEIGHTBL"]), number(row["WEIGHTBL"]))            writer.writerow(                {                    "STUDYID": row["STUDYID"],                    "USUBJID": row["USUBJID"],                    "HEIGHTBL": row["HEIGHTBL"],                    "WEIGHTBL": row["WEIGHTBL"],                    "BMIBL": "" if value is None else value,                }            )if __name__ == "__main__":    main()

solutions/adam-adsl-bmi/result.sas

Edit
16 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. HEIGHTBL WEIGHTBL;run;data result;  set adsl;  if not missing(HEIGHTBL) and HEIGHTBL ne 0 and not missing(WEIGHTBL) then BMIBL=WEIGHTBL/(HEIGHTBL/100)**2;run;proc export data=result(keep=STUDYID USUBJID HEIGHTBL WEIGHTBL BMIBL) outfile="/app/output/adsl.csv" dbms=csv replace; run;