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: 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:
AEDECODis the dictionary-derived term collected for the event; always present from the collected record.AESEVis 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 review2 source filesExpected output
Under review8 expected rowsexpected/adae.csv
Edit8 rows| STUDYID | USUBJID | AESEQ | AEDECOD | AESEV |
|---|---|---|---|---|
| KN189 | 1 | HEART ATTACK | SEVERE | |
| KN189 | 2 | NAUSEA | — | |
| KN189 | 3 | HEADACHE | MODERATE | |
| KN189 | 1 | HEADACHE | MILD | |
| KN189 | 2 | VOMITING | — | |
| KN189 | 1 | FATIGUE | — | |
| KN189 | 1 | RASH | — | |
| KN189 | 2 | NAUSEA | SEVERE |
Human review and assessment
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADAE | STUDYID | Study Identifier | character | Copy value from AE.STUDYID. | Predecessor | ||
| ADAE | USUBJID | Unique Subject Identifier | character | Copy value from AE.USUBJID. | Predecessor | ||
| ADAE | AESEQ | Sequence Number | numeric | Copy value from AE.AESEQ. | Predecessor | ||
| ADAE | AEDECOD | Dictionary-Derived Term | character | Copy value from AE.AEDECOD. | Predecessor | ||
| ADAE | AESEV | Severity/Intensity | character | Copy value from SUPP.AESEV. | Predecessor |
| 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-adae-severity/full.md
Edit16 linesFollowing 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; it is always present. AESEV is the severity/intensity recorded for the event. Severity is matched to an event on STUDYID, USUBJID, and AESEQ together, so two events for one subject keep their own severities apart. AESEV has no value when the event has no supplemental record, or when its supplemental 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
Edit8 linesFollowing 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
Edit8 linesFollowing 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.
R
Edit3 lineslibrary(yamaa)yamaa_spec("spec.yaml")$run()$outputPython
Edit3 linesimport yamaayamaa.spec("spec.yaml").run().outputsolutions/adam-adae-severity/result.R
Edit29 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
Edit57 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.import csvfrom pathlib import PathINPUT_DIR = Path("/app/input")OUTPUT_DIR = Path("/app/output")OUTPUT_COLUMNS = ["STUDYID", "USUBJID", "AESEQ", "AEDECOD", "AESEV"]def main(): severity_by_event = {} with (INPUT_DIR / "supp.csv").open(newline="", encoding="utf-8") as supp_file: supp_reader = csv.DictReader(supp_file) for supp_row in supp_reader: event_key = ( supp_row["STUDYID"], supp_row["USUBJID"], supp_row["AESEQ"], ) if event_key not in severity_by_event: severity_by_event[event_key] = supp_row.get("AESEV") or "" OUTPUT_DIR.mkdir(parents=True, exist_ok=True) with (INPUT_DIR / "ae.csv").open(newline="", encoding="utf-8") as ae_file, ( OUTPUT_DIR / "adae.csv" ).open("w", newline="", encoding="utf-8") as output_file: ae_reader = csv.DictReader(ae_file) writer = csv.DictWriter(output_file, fieldnames=OUTPUT_COLUMNS) writer.writeheader() for ae_row in ae_reader: event_key = ( ae_row["STUDYID"], ae_row["USUBJID"], ae_row["AESEQ"], ) writer.writerow( { "STUDYID": ae_row["STUDYID"], "USUBJID": ae_row["USUBJID"], "AESEQ": ae_row["AESEQ"], "AEDECOD": ae_row["AEDECOD"], "AESEV": severity_by_event.get(event_key, ""), } )if __name__ == "__main__": main()solutions/adam-adae-severity/result.sas
Edit25 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;
yamaa