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: assign each subject a composite responder status (AVALC), its numeric companion (AVAL), and the reason behind the assignment (ARSN), for every analysis visit.

Input: percent change from baseline values (PCHG) under input parameter code EASI (Eczema Area and Severity Index), matched to a subject-level file carrying a serious adverse event flag (SAEFL) and a reason for discontinuation (DCSREAS). PARAMCD is fixed to RESP75 and PARAM to EASI-75 Response.

Variables:

  • AVALC is the responder status: RESPONDER, NON-RESPONDER, or NOT EVALUABLE.
  • ARSN records which check assigned the status: SAFETY OR DISCONTINUATION RULE, COMPONENT MISSING, THRESHOLD MET, or THRESHOLD NOT MET.
  • AVAL is 1 for a responder and 0 for a non-responder; it stays empty when the subject is not evaluable.

Note: the checks apply in a fixed order. A subject with a serious adverse event or any discontinuation reason is a non-responder whatever the efficacy value, even a missing one; otherwise a subject with no efficacy value is not evaluable, one with a percent change of -75 or less (a reduction of at least 75%) is a responder, and everyone else is a non-responder.

Inputs

Under review
2 source files

input/adrs_raw.csv

Edit
10 rows
input/adrs_raw.csv
STUDYIDUSUBJIDPARAMCDAVISITPCHG
YAMAA-01EASIWEEK 4-80
YAMAA-01EASIWEEK 8-88
YAMAA-01EASIWEEK 4-50
YAMAA-01EASIWEEK 4-75
YAMAA-01EASIWEEK 4-74.9
YAMAA-01EASIWEEK 4-90
YAMAA-01EASIWEEK 4—
YAMAA-01EASIWEEK 4—
YAMAA-01EASIWEEK 4-60
YAMAA-01EASIWEEK 4—

input/adsl.csv

Edit
9 rows
input/adsl.csv
STUDYIDUSUBJIDSAEFLDCSREAS
YAMAA-01——
YAMAA-01——
YAMAA-01——
YAMAA-01——
YAMAA-01Y—
YAMAA-01—ADVERSE EVENT
YAMAA-01——
YAMAA-01YLACK OF EFFICACY
YAMAA-01Y—

Expected output

Under review
10 expected rows

expected/adrs.csv

Edit
10 rows
expected/adrs.csv
STUDYIDUSUBJIDPARAMCDPARAMAVISITPCHGSAEFLDCSREASAVALCARSNAVAL
YAMAA-01RESP75EASI-75 ResponseWEEK 4-80——RESPONDERTHRESHOLD MET1
YAMAA-01RESP75EASI-75 ResponseWEEK 8-88——RESPONDERTHRESHOLD MET1
YAMAA-01RESP75EASI-75 ResponseWEEK 4-50——NON-RESPONDERTHRESHOLD NOT MET0
YAMAA-01RESP75EASI-75 ResponseWEEK 4-75——RESPONDERTHRESHOLD MET1
YAMAA-01RESP75EASI-75 ResponseWEEK 4-74.9——NON-RESPONDERTHRESHOLD NOT MET0
YAMAA-01RESP75EASI-75 ResponseWEEK 4-90Y—NON-RESPONDERSAFETY OR DISCONTINUATION RULE0
YAMAA-01RESP75EASI-75 ResponseWEEK 4——ADVERSE EVENTNON-RESPONDERSAFETY OR DISCONTINUATION RULE0
YAMAA-01RESP75EASI-75 ResponseWEEK 4———NOT EVALUABLECOMPONENT MISSING—
YAMAA-01RESP75EASI-75 ResponseWEEK 4-60YLACK OF EFFICACYNON-RESPONDERSAFETY OR DISCONTINUATION RULE0
YAMAA-01RESP75EASI-75 ResponseWEEK 4—Y—NON-RESPONDERSAFETY OR DISCONTINUATION RULE0
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
ADRSSTUDYIDStudy IdentifiercharacterCopy value from ADRS_RAW.STUDYID.Predecessor
ADRSUSUBJIDUnique Subject IdentifiercharacterCopy value from ADRS_RAW.USUBJID.Predecessor
ADRSPARAMCDParameter CodecharacterSet constant value "RESP75".Assigned
ADRSPARAMParametercharacterSet constant value "EASI-75 Response".Assigned
ADRSAVISITAnalysis VisitcharacterCopy value from ADRS_RAW.AVISIT.Predecessor
ADRSPCHGPercent Change from BaselinenumericCopy value from ADRS_RAW.PCHG.Predecessor
ADRSSAEFLSerious Adverse Event FlagcharacterCopy value from ADSL.SAEFL.Predecessor
ADRSDCSREASReason for DiscontinuationcharacterCopy value from ADSL.DCSREAS.Predecessor
ADRSAVALCAnalysis Value (C)characterRESPONDER, NON-RESPONDER, NOT EVALUABLERecode RULE: "SAFETY" → "NON-RESPONDER", "MISSING" → "NOT EVALUABLE", "THRESHOLD" → "RESPONDER", "OTHERWISE" → "NON-RESPONDER"; missing values stay missing; unlisted values are errors.Derived
ADRSARSNAnalysis ReasoncharacterRecode RULE: "SAFETY" → "SAFETY OR DISCONTINUATION RULE", "MISSING" → "COMPONENT MISSING", "THRESHOLD" → "THRESHOLD MET", "OTHERWISE" → "THRESHOLD NOT MET"; missing values stay missing; unlisted values are errors.Derived
ADRSAVALAnalysis ValuenumericIf AVALC = 'RESPONDER' then "1"; If AVALC = 'NON-RESPONDER' then "0"; otherwise blank.Derived
VariablePermitted values
AVALCRESPONDER, NON-RESPONDER, NOT EVALUABLE
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-adrs-composite-response/full.md

Edit
20 lines

Following CDISC ADaM standards, use the provided ADRS_RAW and ADSL datasets to create an ADRS dataset with one record per subject and analysis visit.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVISIT, PCHG, SAEFL, DCSREAS, AVALC, ARSN, AVAL

PARAMCD is "RESP75" and PARAM is "EASI-75 Response" on every record. AVALC is "NON-RESPONDER" and ARSN is "SAFETY OR DISCONTINUATION RULE" when the subject's SAEFL is "Y" or the subject's DCSREAS has a value, whatever the percent change, even when the percent change has no value. Otherwise AVALC is "NOT EVALUABLE" and ARSN is "COMPONENT MISSING" when the percent change has no value. Otherwise AVALC is "RESPONDER" and ARSN is "THRESHOLD MET" when the percent change is -75 or less. Otherwise AVALC is "NON-RESPONDER" and ARSN is "THRESHOLD NOT MET". AVAL is 1 when AVALC is "RESPONDER", 0 when AVALC is "NON-RESPONDER", and has no value when AVALC is "NOT EVALUABLE".

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

prompts/adam-adrs-composite-response/conventions.md

Edit
15 lines

Following CDISC ADaM standards, use the provided ADRS_RAW and ADSL datasets to create an ADRS dataset with one record per subject and analysis visit.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVISIT, PCHG, SAEFL, DCSREAS, AVALC, ARSN, AVAL

PARAMCD is "RESP75" and PARAM is "EASI-75 Response" on every record. AVALC is "RESPONDER", "NON-RESPONDER", or "NOT EVALUABLE". ARSN is "THRESHOLD MET", "THRESHOLD NOT MET", "SAFETY OR DISCONTINUATION RULE", or "COMPONENT MISSING". AVAL is 1 for "RESPONDER", 0 for "NON-RESPONDER", or has no value.

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

prompts/adam-adrs-composite-response/brief.md

Edit
9 lines

Following CDISC ADaM standards, use the provided ADRS_RAW and ADSL datasets to create an ADRS dataset with one record per subject and analysis visit.

The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVISIT, PCHG, SAEFL, DCSREAS, AVALC, ARSN, AVAL

Read the source datasets from /app/input and save the completed dataset as /app/output/adrs.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-adrs-composite-response/result.R

Edit
51 lines
# Reference solution for the yamaa benchmark adam-adrs-composite-response (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)adsl <- read_csv(  "/app/input/adsl.csv",  col_types = cols(.default = col_character()))raw <- read_csv(  "/app/input/adrs_raw.csv",  col_types = cols(PCHG = col_double(), .default = col_character()))# The checks apply in a fixed order: a safety or discontinuation rule# first, then a missing component, then the 75% reduction threshold.adrs <- raw |>  left_join(select(adsl, USUBJID, SAEFL, DCSREAS), by = "USUBJID") |>  mutate(    PARAMCD = "RESP75",    PARAM = "EASI-75 Response",    safety = SAEFL %in% "Y" | (!is.na(DCSREAS) & DCSREAS != ""),    AVALC = case_when(      safety ~ "NON-RESPONDER",      is.na(PCHG) ~ "NOT EVALUABLE",      PCHG <= -75 ~ "RESPONDER",      .default = "NON-RESPONDER"    ),    ARSN = case_when(      safety ~ "SAFETY OR DISCONTINUATION RULE",      is.na(PCHG) ~ "COMPONENT MISSING",      PCHG <= -75 ~ "THRESHOLD MET",      .default = "THRESHOLD NOT MET"    ),    AVAL = case_when(      AVALC == "RESPONDER" ~ 1L,      AVALC == "NON-RESPONDER" ~ 0L    )  ) |>  select(    STUDYID, USUBJID, PARAMCD, PARAM, AVISIT, PCHG, SAEFL, DCSREAS,    AVALC, ARSN, AVAL  ) |>  arrange(USUBJID, AVISIT)dir.create("/app/output", showWarnings = FALSE)write_csv(adrs, "/app/output/adrs.csv", na = "")

solutions/adam-adrs-composite-response/result.py

Edit
107 lines
# Reference solution for the yamaa benchmark adam-adrs-composite-response (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 ADRS (EASI-75 composite response) from ADRS_RAW and ADSL.One record per subject and analysis visit from ADRS_RAW, enriched with thesubject-level SAEFL and DCSREAS from ADSL. A subject flagged by the safetyor discontinuation rule is a non-responder whatever the percent change;otherwise a missing percent change is not evaluable, a percent change of-75 or less is a responder, and anything else is a non-responder."""import csvimport osINPUT_DIR = "/app/input"OUTPUT_DIR = "/app/output"def read_csv(path):    with open(path, newline="", encoding="utf-8") as handle:        return list(csv.DictReader(handle))def main():    raw = read_csv(os.path.join(INPUT_DIR, "adrs_raw.csv"))    adsl = read_csv(os.path.join(INPUT_DIR, "adsl.csv"))    subjects = {}    for row in adsl:        subjects[(row["STUDYID"], row["USUBJID"])] = row    out_rows = []    for row in raw:        key = (row["STUDYID"], row["USUBJID"])        subject = subjects.get(key, {})        saefl = subject.get("SAEFL", "") or ""        dcsreas = subject.get("DCSREAS", "") or ""        pchg_text = row["PCHG"]        pchg = None        if pchg_text is not None and pchg_text.strip() != "":            pchg = float(pchg_text)        if saefl == "Y" or dcsreas != "":            avalc = "NON-RESPONDER"            arsn = "SAFETY OR DISCONTINUATION RULE"        elif pchg is None:            avalc = "NOT EVALUABLE"            arsn = "COMPONENT MISSING"        elif pchg <= -75:            avalc = "RESPONDER"            arsn = "THRESHOLD MET"        else:            avalc = "NON-RESPONDER"            arsn = "THRESHOLD NOT MET"        if avalc == "RESPONDER":            aval = "1"        elif avalc == "NON-RESPONDER":            aval = "0"        else:            aval = ""        out_rows.append(            {                "STUDYID": row["STUDYID"],                "USUBJID": row["USUBJID"],                "PARAMCD": "RESP75",                "PARAM": "EASI-75 Response",                "AVISIT": row["AVISIT"],                "PCHG": pchg_text,                "SAEFL": saefl,                "DCSREAS": dcsreas,                "AVALC": avalc,                "ARSN": arsn,                "AVAL": aval,            }        )    fieldnames = [        "STUDYID",        "USUBJID",        "PARAMCD",        "PARAM",        "AVISIT",        "PCHG",        "SAEFL",        "DCSREAS",        "AVALC",        "ARSN",        "AVAL",    ]    os.makedirs(OUTPUT_DIR, exist_ok=True)    with open(        os.path.join(OUTPUT_DIR, "adrs.csv"), "w", newline="", encoding="utf-8"    ) as handle:        writer = csv.DictWriter(handle, fieldnames=fieldnames)        writer.writeheader()        writer.writerows(out_rows)if __name__ == "__main__":    main()

solutions/adam-adrs-composite-response/result.sas

Edit
30 lines
/* opensas reference solution for the yamaa benchmark adam-adrs-composite-response.   Reads the benchmark inputs and derives the requested output.   Execute with the existing opensas runtime: opensas /app/output/result.sas. */data adrs_raw;  length STUDYID USUBJID PARAMCD AVISIT $1024;  infile "/app/input/adrs_raw.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. PARAMCD : $char1024. AVISIT : $char1024. PCHG;run;data adsl;  length STUDYID USUBJID SAEFL DCSREAS $1024;  infile "/app/input/adsl.csv" dsd dlm="," firstobs=2 truncover lrecl=32767;  input STUDYID : $char1024. USUBJID : $char1024. SAEFL : $char1024. DCSREAS : $char1024.;run;proc sql; create table joined as select a.*,b.SAEFL,b.DCSREAS from adrs_raw as a left join adsl as b on a.STUDYID=b.STUDYID and a.USUBJID=b.USUBJID; quit;data result;  length PARAM $40 AVALC $20 ARSN $40;  set joined; PARAMCD='RESP75'; PARAM='EASI-75 Response';  if SAEFL='Y' or not missing(DCSREAS) then do; AVALC='NON-RESPONDER'; ARSN='SAFETY OR DISCONTINUATION RULE'; AVAL=0; end;  else if missing(PCHG) then do; AVALC='NOT EVALUABLE'; ARSN='COMPONENT MISSING'; end;  else if PCHG<=-75 then do; AVALC='RESPONDER'; ARSN='THRESHOLD MET'; AVAL=1; end;  else do; AVALC='NON-RESPONDER'; ARSN='THRESHOLD NOT MET'; AVAL=0; end;run;proc sql;  create table final as select STUDYID, USUBJID, PARAMCD, PARAM, AVISIT, PCHG, SAEFL, DCSREAS, AVALC, ARSN, AVAL from result;quit;proc export data=final outfile="/app/output/adrs.csv" dbms=csv replace; run;