Review ask

As a clinical trial statistician or programmer, challenge anything in this benchmark: describe a problem in Comments, or propose a fix with the Edit button on any source file.

  1. Task: Would a real study need this derivation, specified this way? Does it follow CDISC ADaM: variable names, controlled terms, record structure? Flag any rule that is ambiguous or that a sponsor would handle differently.
  2. Inputs: Do they look like data collected in a real trial, and do they include the situations you would expect to meet in one?
  3. Expected output: Would independent QC programming reproduce every value from these inputs and rules?

The other tabs beside Comments are background for assessment, not under review.

Summary

Lifecycle: reviewedEditUnder review
What this benchmark means
README.md

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

Input: collected adverse events with their coded terms, plus supplemental records carrying the severity recorded for each event.

Variables:

  • AEDECOD is the dictionary-derived term collected for the event; always present from the collected record.
  • AESEV is the severity/intensity recorded for that event; empty when the event has no supplemental record, or the record carries no severity.

Note: severity is matched on the study and subject identifiers together with the event sequence number, so two events for one subject keep their own severities apart. A supplemental record for an event that was never collected is ignored: it creates no row.

Inputs

Under review
2 source files

input/ae.csv

Edit
8 rows
input/ae.csv
STUDYIDUSUBJIDAESEQAEDECOD
KN1891HEART ATTACK
KN1892NAUSEA
KN1893HEADACHE
KN1891HEADACHE
KN1892VOMITING
KN1891FATIGUE
KN1891RASH
KN1892NAUSEA

input/supp.csv

Edit
6 rows
input/supp.csv
STUDYIDUSUBJIDAESEQAESEV
KN1891SEVERE
KN1893MODERATE
KN1891MILD
KN1892—
KN1892SEVERE
KN1899MODERATE

Expected output

Under review
8 expected rows

expected/adae.csv

Edit
8 rows
expected/adae.csv
STUDYIDUSUBJIDAESEQAEDECODAESEV
KN1891HEART ATTACKSEVERE
KN1892NAUSEA—
KN1893HEADACHEMODERATE
KN1891HEADACHEMILD
KN1892VOMITING—
KN1891FATIGUE—
KN1891RASH—
KN1892NAUSEASEVERE
Shaded columns are derived— = missing value

Comments and assessment materials

Comments

Signed in with GitHub; saved in repository Discussions

Mapping spec

Generated from the benchmark YAML; do not edit by hand

Dataset NameVariable NameVariable LabelTypeCodelist/Controlled TermsCoreComputational MethodOrigin
ADAESTUDYIDStudy IdentifiercharacterCopy value from AE.STUDYID.Predecessor
ADAEUSUBJIDUnique Subject IdentifiercharacterCopy value from AE.USUBJID.Predecessor
ADAEAESEQSequence NumbernumericCopy value from AE.AESEQ.Predecessor
ADAEAEDECODDictionary-Derived TermcharacterCopy value from AE.AEDECOD.Predecessor
ADAEAESEVSeverity/IntensitycharacterCopy value from SUPP.AESEV.Predecessor
VersionDateAuthorDescriptionReviewerSign-off
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-severity/full.md

Edit
16 lines

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

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

AEDECOD is the dictionary-derived term collected for the event. AESEV is the severity recorded for that event, matched on the study and subject identifiers together with the event sequence number, so two events for one subject keep their own severities apart. AESEV has no value when the event has no supplemental record, or the record carries no severity. A supplemental record for an event that was never collected creates no row.

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

prompts/adam-adae-severity/conventions.md

Edit
8 lines

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

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

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

prompts/adam-adae-severity/brief.md

Edit
8 lines

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

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

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

yamaa code

Runs the yamaa specification; its result must match the expected output

run.R

Edit
4 lines
library(yamaa)adae <- yamaa_domain("spec.yaml")$outputadae

run.py

Edit
4 lines
import yamaaadae = yamaa.yamaa_domain("spec.yaml").outputadae

Solution without yamaa

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

solutions/adam-adae-severity/result.R

Edit
29 lines
# Reference solution for the yamaa benchmark adam-adae-severity (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()))supp <- read_csv(  "/app/input/supp.csv",  col_types = cols(AESEQ = col_integer(), .default = col_character())) |>  select(STUDYID, USUBJID, AESEQ, AESEV)# Severity is matched on the study and subject identifiers together with# the event sequence number. An event with no supplemental record, or a# record carrying no severity, has no value.adae <- ae |>  left_join(supp, by = c("STUDYID", "USUBJID", "AESEQ")) |>  mutate(AESEV = if_else(is.na(AESEV) | AESEV == "", NA_character_, AESEV)) |>  select(STUDYID, USUBJID, AESEQ, AEDECOD, AESEV)dir.create("/app/output", showWarnings = FALSE)write_csv(adae, "/app/output/adae.csv", na = "")

solutions/adam-adae-severity/result.py

Edit
26 lines
# Reference solution for the yamaa benchmark adam-adae-severity (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.from pathlib import Pathimport polars as plae = pl.read_csv("/app/input/ae.csv", infer_schema=False).with_columns(    pl.col("AESEQ").cast(pl.Int64))supp = pl.read_csv("/app/input/supp.csv", infer_schema=False).with_columns(    pl.col("AESEQ").cast(pl.Int64)).select("STUDYID", "USUBJID", "AESEQ", "AESEV")# Severity is matched on the study and subject identifiers together with# the event sequence number. An event with no supplemental record, or a# record carrying no severity, has no value.adae = ae.join(    supp, on=["STUDYID", "USUBJID", "AESEQ"], how="left", maintain_order="left").select("STUDYID", "USUBJID", "AESEQ", "AEDECOD", "AESEV")Path("/app/output").mkdir(exist_ok=True)adae.write_csv("/app/output/adae.csv")

solutions/adam-adae-severity/result.sas

Edit
25 lines
/* opensas reference solution for the yamaa benchmark adam-adae-severity.   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 $1024;  infile "/app/input/ae.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. AESEQ AEDECOD : $char1024.;run;data supp;  length STUDYID USUBJID AESEV $1024;  infile "/app/input/supp.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. AESEQ AESEV : $char1024.;run;proc sql;  create table result as  select a.*,b.AESEV from ae as a left join supp as b on a.STUDYID=b.STUDYID and a.USUBJID=b.USUBJID and a.AESEQ=b.AESEQ;quit;proc sql;  create table final as select STUDYID, USUBJID, AESEQ, AEDECOD, AESEV from result;quit;proc export data=final outfile="/app/output/adae.csv" dbms=csv replace; run;