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: draftEditUnder review
What this benchmark means
README.md

Public entries: Python and R. Passing coverage requires an installed inventory.

Goal: one Analysis Dataset for Adverse Events (ADAE) row per serious adverse event (AE), carrying AEDECOD and AESER.

Input: collected adverse events with study, subject, and sequence (STUDYID, USUBJID, AESEQ), the dictionary term (AEDECOD), and whether the event was serious (AESER).

Variables:

  • AEDECOD is the dictionary term collected for the event.
  • AESER is Y on every row, because only serious events are kept.

Note: rows follow the order in which the events were collected, so the serious events of one subject stay interleaved with the serious events of other subjects exactly as collected. A non-serious event -- or one whose seriousness was never recorded (blank AESER) -- leaves no row.

Inputs

Under review
1 source file

input/ae.csv

Edit
9 rows
input/ae.csv
STUDYIDUSUBJIDAESEQAEDECODAESER
YAMAA-011HEADACHEY
YAMAA-012COUGHN
YAMAA-013NAUSEAY
YAMAA-011DIZZINESSN
YAMAA-012FEVERY
YAMAA-011BACK PAINN
YAMAA-012INFLUENZAN
YAMAA-011CHEST PAINY
YAMAA-011RUNNY NOSE—

Expected output

Under review
4 expected rows

expected/adae.csv

Edit
4 rows
expected/adae.csv
STUDYIDUSUBJIDAESEQAEDECODAESER
YAMAA-011HEADACHEY
YAMAA-013NAUSEAY
YAMAA-012FEVERY
YAMAA-011CHEST PAINY
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
ADAESTUDYIDStudy IdentifiercharacterSet per constructed row; see the Row construction sheet.Derived
ADAEUSUBJIDUnique Subject IdentifiercharacterSet per constructed row; see the Row construction sheet.Derived
ADAEAESEQSequence NumbernumericSet per constructed row; see the Row construction sheet.Derived
ADAEAEDECODDictionary-Derived TermcharacterSet per constructed row; see the Row construction sheet.Derived
ADAEAESERSerious EventcharacterSet per constructed row; see the Row construction sheet.Derived
TemplateInclude whenSTUDYIDUSUBJIDAESEQAEDECODAESER
seriousCopy STUDYID from the AE record matching on the shared output keys, where AE.AESER = 'Y', and no match yields blankCopy USUBJID from the AE record matching on the shared output keys, where AE.AESER = 'Y', and no match yields blankCopy AESEQ from the AE record matching on the shared output keys, where AE.AESER = 'Y', and no match yields blankCopy AEDECOD from the AE record matching on the shared output keys, where AE.AESER = 'Y', and no match yields blankCopy AESER from the AE record matching on the shared output keys, where AE.AESER = 'Y', and no match yields blank
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-adae-serious-events/full.md

Edit
16 lines

Following CDISC ADaM standards, use the provided AE dataset to create an ADAE dataset with one record per serious adverse event.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, AESEQ, AEDECOD, AESER

Keep only the events recorded as serious, those with AESER "Y". A non-serious event, or an event whose seriousness was never recorded (AESER has no value), leaves no row. AEDECOD is the dictionary term collected for the event. AESER is "Y" on every row, because only serious events are kept. Rows follow the order in which the events were collected, so the serious events of one subject stay interleaved with the serious events of other subjects exactly as collected.

Read the source datasets from /app/input and save the completed dataset as /app/output/adae.csv.

prompts/adam-adae-serious-events/conventions.md

Edit
10 lines

Following CDISC ADaM standards, use the provided AE dataset to create an ADAE dataset with one record per serious adverse event.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, AESEQ, AEDECOD, AESER

AESER is "Y" on every row.

Read the source datasets from /app/input and save the completed dataset as /app/output/adae.csv.

prompts/adam-adae-serious-events/brief.md

Edit
8 lines

Following CDISC ADaM standards, use the provided AE dataset to create an ADAE dataset with one record per serious adverse event.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, AESEQ, AEDECOD, AESER

Read the source datasets from /app/input and save the completed dataset as /app/output/adae.csv.

yamaa code

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

R

Edit
3 lines
library(yamaa)yamaa_spec("spec.yaml")$run()$output

Python

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

Solution without yamaa

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

solutions/adam-adae-serious-events/result.R

Edit
21 lines
# Reference solution for the yamaa benchmark adam-adae-serious-events (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)ae <- read_csv(  "/app/input/ae.csv",  col_types = cols(AESEQ = col_integer(), .default = col_character()))# Only serious events are kept; AESER is Y on every row.adae <- ae |>  filter(AESER %in% "Y") |>  select(STUDYID, USUBJID, AESEQ, AEDECOD, AESER)dir.create("/app/output", showWarnings = FALSE)write_csv(adae, "/app/output/adae.csv", na = "")

solutions/adam-adae-serious-events/result.py

Edit
37 lines
# Reference solution for the yamaa benchmark adam-adae-serious-events (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 ADAE: one record per serious adverse event (AESER == "Y").Reads AE from /app/input/ae.csv and writes the serious events, in theorder collected, to /app/output/adae.csv with columnsSTUDYID, USUBJID, AESEQ, AEDECOD, AESER."""import csvimport osINPUT_PATH = "/app/input/ae.csv"OUTPUT_PATH = "/app/output/adae.csv"COLUMNS = ["STUDYID", "USUBJID", "AESEQ", "AEDECOD", "AESER"]def main():    with open(INPUT_PATH, newline="", encoding="utf-8") as f:        rows = list(csv.DictReader(f))    serious = [row for row in rows if (row.get("AESER") or "") == "Y"]    os.makedirs(os.path.dirname(OUTPUT_PATH), exist_ok=True)    with open(OUTPUT_PATH, "w", newline="", encoding="utf-8") as f:        writer = csv.DictWriter(f, fieldnames=COLUMNS)        writer.writeheader()        for row in serious:            writer.writerow({col: row.get(col, "") for col in COLUMNS})if __name__ == "__main__":    main()

solutions/adam-adae-serious-events/result.sas

Edit
19 lines
/* opensas reference solution for the yamaa benchmark adam-adae-serious-events.   Reads the benchmark inputs and derives the requested output.   Execute with the existing opensas runtime: opensas /app/output/result.sas. */data ae;  length STUDYID USUBJID AEDECOD AESER $1024;  infile "/app/input/ae.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. AESEQ AEDECOD : $char1024. AESER : $char1024.;run;proc sql;  create table result as  select * from ae where AESER='Y';quit;proc sql;  create table final as select STUDYID, USUBJID, AESEQ, AEDECOD, AESER from result;quit;proc export data=final outfile="/app/output/adae.csv" dbms=csv replace; run;