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: report each analysis value (AVAL) against the analysis
normal range lower limit (ANRLO), adding R2ANRLO.
Input: laboratory (LB) records carrying the analysis value
(AVAL) and the analysis normal range lower limit (ANRLO) for
each test.
Variables:
R2ANRLO: the result as a multiple of the lower limit of the normal range; blank when the result or the lower limit was not collected, or the lower limit was recorded as zero.
Note: every number is reported to four places, so a result
that needs fewer still shows them and a ratio that needs more is
rounded exactly once, as it is written, with an exact half going
away from zero (one thirty-second is reported as 0.0313).
Nothing is rounded before the report: the ratio keeps every digit
it was calculated with, and a number that was never collected is
reported as absent rather than as four zeroes.
Inputs
Under review1 source fileinput/lb.csv
Edit8 rows| STUDYID | USUBJID | PARAMCD | AVAL | ANRLO |
|---|---|---|---|---|
| YAMAA-01 | ALT | 44 | 32 | |
| YAMAA-01 | ALT | 73.5 | 32 | |
| YAMAA-01 | ALT | 110 | 32 | |
| YAMAA-01 | ALT | 1 | 32 | |
| YAMAA-01 | ALT | 58 | — | |
| YAMAA-01 | ALT | 58 | 0 | |
| YAMAA-01 | ALT | — | 32 | |
| YAMAA-01 | AST | 28 | 32 |
Expected output
Under review8 expected rowsexpected/adlb.csv
Edit8 rows| STUDYID | USUBJID | PARAMCD | AVAL | ANRLO | R2ANRLO |
|---|---|---|---|---|---|
| YAMAA-01 | ALT | 44.0000 | 32.0000 | 1.3750 | |
| YAMAA-01 | ALT | 73.5000 | 32.0000 | 2.2969 | |
| YAMAA-01 | ALT | 110.0000 | 32.0000 | 3.4375 | |
| YAMAA-01 | ALT | 1.0000 | 32.0000 | 0.0313 | |
| YAMAA-01 | ALT | 58.0000 | — | — | |
| YAMAA-01 | ALT | 58.0000 | 0.0000 | — | |
| YAMAA-01 | ALT | — | 32.0000 | — | |
| YAMAA-01 | AST | 28.0000 | 32.0000 | 0.8750 |
Human review and assessment
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADLB | STUDYID | Study Identifier | character | Copy value from LB.STUDYID. | Predecessor | ||
| ADLB | USUBJID | Unique Subject Identifier | character | Copy value from LB.USUBJID. | Predecessor | ||
| ADLB | PARAMCD | Parameter Code | character | Copy value from LB.PARAMCD. | Predecessor | ||
| ADLB | AVAL | Analysis Value | numeric | Copy value from LB.AVAL. | Predecessor | ||
| ADLB | ANRLO | Analysis Normal Range Lower Limit | numeric | Copy value from LB.ANRLO. | Predecessor | ||
| ADLB | R2ANRLO | Ratio to Lower Limit of Normal | numeric | Compute AVAL / NULLIF(ANRLO, 0). | 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-adlb-reported-precision/full.md
Edit18 linesFollowing CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, AVAL, ANRLO, R2ANRLO
R2ANRLO is the analysis value as a multiple of the analysis normal range lower limit: AVAL divided by ANRLO. R2ANRLO has no value when AVAL or ANRLO has no value, or when ANRLO is zero. Every number is reported to four decimal places, so a value that needs fewer places still shows them. A value that needs more than four places is rounded exactly once, as it is reported, with an exact half going away from zero: one thirty-second is reported as 0.0313. Nothing is rounded before the report: the ratio keeps every digit it was calculated with. A number that was never collected is reported as absent rather than as four zeroes.
Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.
prompts/adam-adlb-reported-precision/conventions.md
Edit15 linesFollowing CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, AVAL, ANRLO, R2ANRLO
Every number is reported to four decimal places, so a value that needs fewer places still shows them. A value that needs more than four places is rounded exactly once, as it is reported, with an exact half going away from zero: one thirty-second is reported as 0.0313. Nothing is rounded before the report. A number that was never collected is reported as absent rather than as four zeroes.
Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.
prompts/adam-adlb-reported-precision/brief.md
Edit8 linesFollowing CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, AVAL, ANRLO, R2ANRLO
Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.
R
Edit3 lineslibrary(yamaa)yamaa_spec("spec.yaml")$run()$outputPython
Edit3 linesimport yamaayamaa.spec("spec.yaml").run().outputsolutions/adam-adlb-reported-precision/result.R
Edit34 lines# Reference solution for the yamaa benchmark adam-adlb-reported-precision (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)lb <- read_csv( "/app/input/lb.csv", col_types = cols( AVAL = col_double(), ANRLO = col_double(), .default = col_character() ))# The result as a multiple of the lower limit, rounded once to four places# with an exact half away from zero.adlb <- lb |> mutate( ratio = AVAL / ANRLO, R2ANRLO = case_when( is.na(AVAL) | is.na(ANRLO) | ANRLO == 0 ~ NA_real_, ratio >= 0 ~ floor(ratio * 10000 + 0.5) / 10000, .default = ceiling(ratio * 10000 - 0.5) / 10000 ) ) |> arrange(USUBJID) |> select(STUDYID, USUBJID, PARAMCD, AVAL, ANRLO, R2ANRLO)dir.create("/app/output", showWarnings = FALSE)write_csv(adlb, "/app/output/adlb.csv", na = "")solutions/adam-adlb-reported-precision/result.py
Edit63 lines# Reference solution for the yamaa benchmark adam-adlb-reported-precision (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.import csvfrom decimal import Decimal, ROUND_HALF_UP, getcontextgetcontext().prec = 50FOUR_PLACES = Decimal("0.0001")def parse_number(text): text = (text or "").strip() if text == "": return None return Decimal(text)def report(value): """Format a Decimal to exactly four decimal places, rounding an exact half away from zero. A missing value is reported as absent.""" if value is None: return "" return str(value.quantize(FOUR_PLACES, rounding=ROUND_HALF_UP))def main(): with open("/app/input/lb.csv", newline="") as f: rows = list(csv.DictReader(f)) out_rows = [] for row in rows: aval = parse_number(row["AVAL"]) anrlo = parse_number(row["ANRLO"]) if aval is None or anrlo is None or anrlo == 0: ratio = None else: # Nothing is rounded before the report: the ratio keeps every # digit it was calculated with and is rounded once, in report(). ratio = aval / anrlo out_rows.append( { "STUDYID": row["STUDYID"], "USUBJID": row["USUBJID"], "PARAMCD": row["PARAMCD"], "AVAL": report(aval), "ANRLO": report(anrlo), "R2ANRLO": report(ratio), } ) fieldnames = ["STUDYID", "USUBJID", "PARAMCD", "AVAL", "ANRLO", "R2ANRLO"] with open("/app/output/adlb.csv", "w", newline="") as f: writer = csv.DictWriter(f, fieldnames=fieldnames) writer.writeheader() writer.writerows(out_rows)if __name__ == "__main__": main()solutions/adam-adlb-reported-precision/result.sas
Edit16 lines/* opensas reference solution for the yamaa benchmark adam-adlb-reported-precision. Reads the benchmark inputs and derives the requested output. Execute with the existing opensas runtime: opensas /app/output/result.sas. */data lb; length STUDYID USUBJID PARAMCD $1024; infile "/app/input/lb.csv" dsd dlm="," firstobs=2 truncover lrecl=32767; input STUDYID : $char1024. USUBJID : $char1024. PARAMCD : $char1024. AVAL ANRLO;run;data result; set lb; if not missing(AVAL) and not missing(ANRLO) and ANRLO ne 0 then R2ANRLO=round(AVAL/ANRLO,0.0001);run;proc export data=result(keep=STUDYID USUBJID PARAMCD AVAL ANRLO R2ANRLO) outfile="/app/output/adlb.csv" dbms=csv replace; run;
yamaa