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: fill each missing vital signs result with the last value
observed before it (last observation carried forward), in AVAL.
Input: one planned vital signs assessment per subject, parameter, and analysis visit, holding either a collected value or a gap.
Variables:
AVISITNidentifies the planned analysis visit.AVALis the collected value when there is one; otherwise it is the value from the closest earlier visit, in visit-number order, that has one, for the same subject and parameter. A gap before the first collected value stays missing, and zero is a collected value that is carried like any other.
Inputs
Under review1 source fileinput/vs.csv
Edit18 rows| USUBJID | PARAMCD | AVISITN | AVALCOL |
|---|---|---|---|
| SYSBP | 1 | 118 | |
| SYSBP | 2 | — | |
| SYSBP | 3 | — | |
| SYSBP | 4 | 142 | |
| DIABP | 1 | — | |
| DIABP | 2 | 78 | |
| SYSBP | 1 | — | |
| SYSBP | 2 | 0 | |
| SYSBP | 3 | — | |
| SYSBP | 1 | 132 | |
| SYSBP | 2 | — | |
| SYSBP | 3 | 128 | |
| SYSBP | 4 | — | |
| SYSBP | 5 | — | |
| SYSBP | 1 | 121 | |
| DIABP | 1 | — | |
| DIABP | 2 | — | |
| DIABP | 3 | — |
Expected output
Under review18 expected rowsexpected/advs.csv
Edit18 rows| USUBJID | PARAMCD | AVISITN | AVAL |
|---|---|---|---|
| SYSBP | 1 | 118 | |
| SYSBP | 2 | 118 | |
| SYSBP | 3 | 118 | |
| SYSBP | 4 | 142 | |
| DIABP | 1 | — | |
| DIABP | 2 | 78 | |
| SYSBP | 1 | — | |
| SYSBP | 2 | 0 | |
| SYSBP | 3 | 0 | |
| SYSBP | 1 | 132 | |
| SYSBP | 2 | 132 | |
| SYSBP | 3 | 128 | |
| SYSBP | 4 | 128 | |
| SYSBP | 5 | 128 | |
| SYSBP | 1 | 121 | |
| DIABP | 1 | — | |
| DIABP | 2 | — | |
| DIABP | 3 | — |
Human review and assessment
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADVS | USUBJID | Unique Subject Identifier | character | Copy value from VS.USUBJID. | Predecessor | ||
| ADVS | PARAMCD | Parameter Code | character | Copy value from VS.PARAMCD. | Predecessor | ||
| ADVS | AVISITN | Analysis Visit Number | numeric | Copy value from VS.AVISITN. | Predecessor | ||
| ADVS | AVAL | Analysis Value | numeric | Last observation carried forward from AVALCOL within each group of USUBJID, PARAMCD, ordered by AVISITN. | 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-advs-locf/full.md
Edit13 linesFollowing CDISC ADaM standards, use the provided VS dataset to create an ADVS dataset with one record per subject per parameter per analysis visit.
The output dataset should contain the following columns in this order: USUBJID, PARAMCD, AVISITN, AVAL
AVAL is the collected value when the record has one; otherwise it is the value from the closest earlier visit, in visit-number order, that has one, for the same subject and parameter. A gap before the first collected value has no value. A collected value of zero is carried like any other value.
Read the source datasets from /app/input and save the completed dataset as /app/output/advs.csv.
prompts/adam-advs-locf/conventions.md
Edit8 linesFollowing CDISC ADaM standards, use the provided VS dataset to create an ADVS dataset with one record per subject per parameter per analysis visit.
The output dataset should contain the following columns in this order: USUBJID, PARAMCD, AVISITN, AVAL
Read the source datasets from /app/input and save the completed dataset as /app/output/advs.csv.
prompts/adam-advs-locf/brief.md
Edit8 linesFollowing CDISC ADaM standards, use the provided VS dataset to create an ADVS dataset with one record per subject per parameter per analysis visit.
The output dataset should contain the following columns in this order: USUBJID, PARAMCD, AVISITN, AVAL
Read the source datasets from /app/input and save the completed dataset as /app/output/advs.csv.
R
Edit3 lineslibrary(yamaa)yamaa_spec("spec.yaml")$run()$outputPython
Edit3 linesimport yamaayamaa.spec("spec.yaml").run().outputsolutions/adam-advs-locf/result.R
Edit27 lines# Reference solution for the yamaa benchmark adam-advs-locf (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)library(tidyr)vs <- read_csv( "/app/input/vs.csv", col_types = cols(AVISITN = col_integer(), AVALCOL = col_double(), .default = col_character()))# The collected value, otherwise the closest earlier visit with one, in# visit-number order; a gap before the first stays missing.advs <- vs |> arrange(USUBJID, PARAMCD, AVISITN) |> group_by(USUBJID, PARAMCD) |> fill(AVALCOL, .direction = "down") |> mutate(AVAL = AVALCOL) |> ungroup() |> select(USUBJID, PARAMCD, AVISITN, AVAL)dir.create("/app/output", showWarnings = FALSE)write_csv(advs, "/app/output/advs.csv", na = "")solutions/adam-advs-locf/result.py
Edit61 lines# Reference solution for the yamaa benchmark adam-advs-locf (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 the ADVS dataset from the VS dataset.One record per subject per parameter per analysis visit. AVAL is thecollected value when the record has one; otherwise it is the value fromthe closest earlier visit, in visit-number order, that has one, for thesame subject and parameter (last observation carried forward). A gapbefore the first collected value has no value. A collected value ofzero is carried like any other value."""import csvINPUT_PATH = "/app/input/vs.csv"OUTPUT_PATH = "/app/output/advs.csv"def main() -> None: with open(INPUT_PATH, newline="") as f: rows = list(csv.DictReader(f)) # Walk the records in subject / parameter / visit-number order so # each record can see the closest earlier collected value of its # group, then map the results back to the original record order. order = sorted( range(len(rows)), key=lambda i: ( rows[i]["USUBJID"], rows[i]["PARAMCD"], int(rows[i]["AVISITN"]), ), ) last_value = {} aval = [""] * len(rows) for i in order: row = rows[i] key = (row["USUBJID"], row["PARAMCD"]) collected = row["AVALCOL"] if collected != "": last_value[key] = collected aval[i] = collected else: aval[i] = last_value.get(key, "") with open(OUTPUT_PATH, "w", newline="") as f: writer = csv.writer(f) writer.writerow(["USUBJID", "PARAMCD", "AVISITN", "AVAL"]) for i, row in enumerate(rows): writer.writerow( [row["USUBJID"], row["PARAMCD"], row["AVISITN"], aval[i]] )if __name__ == "__main__": main()solutions/adam-advs-locf/result.sas
Edit20 lines/* opensas reference solution for the yamaa benchmark adam-advs-locf. Reads the benchmark inputs and derives the requested output. Execute with the existing opensas runtime: opensas /app/output/result.sas. */data vs; length USUBJID PARAMCD $1024; infile "/app/input/vs.csv" dsd dlm="," firstobs=2 truncover lrecl=32767; input USUBJID : $char1024. PARAMCD : $char1024. AVISITN AVALCOL;run;proc sort data=vs out=ordered; by USUBJID PARAMCD AVISITN; run;data result; set ordered; by USUBJID PARAMCD; retain carried; if first.PARAMCD then carried=.; if not missing(AVALCOL) then carried=AVALCOL; AVAL=carried;run;proc export data=result(keep=USUBJID PARAMCD AVISITN AVAL) outfile="/app/output/advs.csv" dbms=csv replace; run;
yamaa