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: carry PARAMCD, PARAM, AVAL and AVALC into a laboratory
analysis dataset, and describe each parameter's analysis values
separately in the data-definition document.
Input: standardized laboratory results (SDTM LB), one record per subject and test, with the result as text, as a number when it is one, and its unit.
Variables:
PARAMCDis the laboratory test code: glucose, creatinine and the pregnancy test.PARAMnames the parameter, with its unit for the numeric tests, so the dataset needs no separate unit variable.AVALis the numeric result; missing for the pregnancy test. Glucose is described with no decimals and creatinine with one, and both require a value on every record.AVALCis the result as text. For the pregnancy test it is required and isNEGATIVEorPOSITIVE.
Note: the data-definition document lists, for each analysis value, one
definition per parameter, with the condition on PARAMCD that selects its
records; a definition that names no description, precision or codelist of its
own keeps the variable's. The exchange file adlb.json carries the variables
alone, each as wide as its longest value.
Inputs
Under review1 source fileinput/lb.csv
Edit6 rows| STUDYID | USUBJID | LBSEQ | LBTESTCD | LBTEST | LBSTRESC | LBSTRESN | LBSTRESU |
|---|---|---|---|---|---|---|---|
| CATH | 1 | GLUC | Glucose | 95 | 95 | mg/dL | |
| CATH | 2 | CREAT | Creatinine | 79.6 | 79.6 | umol/L | |
| CATH | 3 | HCG | Choriogonadotropin Beta | NEGATIVE | — | — | |
| CATH | 1 | GLUC | Glucose | 101 | 101 | mg/dL | |
| CATH | 2 | CREAT | Creatinine | 88.4 | 88.4 | umol/L | |
| CATH | 3 | HCG | Choriogonadotropin Beta | POSITIVE | — | — |
Expected output
Under review6 expected rowsexpected/adlb.csv
Edit6 rows| STUDYID | USUBJID | PARAMCD | PARAM | AVAL | AVALC |
|---|---|---|---|---|---|
| CATH | GLUC | Glucose (mg/dL) | 95 | 95 | |
| CATH | CREAT | Creatinine (umol/L) | 79.6 | 79.6 | |
| CATH | HCG | Choriogonadotropin Beta | — | NEGATIVE | |
| CATH | GLUC | Glucose (mg/dL) | 101 | 101 | |
| CATH | CREAT | Creatinine (umol/L) | 88.4 | 88.4 | |
| CATH | HCG | Choriogonadotropin Beta | — | POSITIVE |
expected/adlb.json
Edit{
"datasetJSONCreationDateTime": "2026-09-11T00:00:00",
"datasetJSONVersion": "1.1.0",
"fileOID": "CATH.adam.Define-XML_2.1.ADLB",
"sourceSystem": {"name": "yamaa", "version": "1.0"},
"studyOID": "STDY.CATH",
"metaDataVersionOID": "MDV.CATH.adam",
"metaDataRef": "define.xml",
"itemGroupOID": "IG.ADLB",
"records": 6,
"name": "ADLB",
"label": "Laboratory Analysis Dataset",
"columns": [
{"itemOID": "IT.ADLB.STUDYID", "name": "STUDYID", "label": "Study Identifier", "dataType": "string", "length": 4, "keySequence": 1},
{"itemOID": "IT.ADLB.USUBJID", "name": "USUBJID", "label": "Unique Subject Identifier", "dataType": "string", "length": 8, "keySequence": 2},
{"itemOID": "IT.ADLB.PARAMCD", "name": "PARAMCD", "label": "Parameter Code", "dataType": "string", "length": 5, "keySequence": 3},
{"itemOID": "IT.ADLB.PARAM", "name": "PARAM", "label": "Parameter", "dataType": "string", "length": 23},
{"itemOID": "IT.ADLB.AVAL", "name": "AVAL", "label": "Analysis Value", "dataType": "float", "length": 8},
{"itemOID": "IT.ADLB.AVALC", "name": "AVALC", "label": "Analysis Value (C)", "dataType": "string", "length": 8}
],
"rows": [
["CATH", "CATH-001", "GLUC", "Glucose (mg/dL)", 95, "95"],
["CATH", "CATH-001", "CREAT", "Creatinine (umol/L)", 79.6, "79.6"],
["CATH", "CATH-001", "HCG", "Choriogonadotropin Beta", null, "NEGATIVE"],
["CATH", "CATH-002", "GLUC", "Glucose (mg/dL)", 101, "101"],
["CATH", "CATH-002", "CREAT", "Creatinine (umol/L)", 88.4, "88.4"],
["CATH", "CATH-002", "HCG", "Choriogonadotropin Beta", null, "POSITIVE"]
]
}
expected/define.xml
EditDefine-XMLDefine-XML 2.1.11: CATH
Example study describing each analysis parameter's values; CATH-01; ADaMIG 1.3
| Dataset | Description | Class | Structure | Purpose | Keys | Documentation | Location |
|---|---|---|---|---|---|---|---|
| ADLB | Laboratory Analysis Dataset | BASIC DATA STRUCTURE | One record per subject per parameter | Analysis | STUDYID, USUBJID, PARAMCD | adlb.json |
ADLB
| Variable | Label / Description | Type | Length or Display Format | Controlled Terms or ISO Format | Origin / Source / Method / Comment |
|---|---|---|---|---|---|
| STUDYID | Study Identifier | text | 4 | Predecessor; LB.STUDYID | |
| USUBJID | Unique Subject Identifier | text | 8 | Predecessor; LB.USUBJID | |
| PARAMCD | Parameter Code | text | 5 | Predecessor; LB.LBTESTCD | |
| PARAM | Parameter | text | 23 | Assigned; Sponsor | |
| AVAL | Analysis Value | float | 8 | Predecessor; LB.LBSTRESN | |
| AVALC | Analysis Value (C) | text | 8 | Predecessor; LB.LBSTRESC |
| Where Condition | Variable | Label / Description | Type | Length or Display Format | Controlled Terms or ISO Format | Origin / Source / Method / Comment |
|---|---|---|---|---|---|---|
| PARAMCD = GLUC | AVAL | Glucose (mg/dL) | float | 8 | Predecessor; LB.LBSTRESN | |
| PARAMCD = CREAT | AVAL | Creatinine (umol/L) | float | 8 | Predecessor; LB.LBSTRESN |
| Where Condition | Variable | Label / Description | Type | Length or Display Format | Controlled Terms or ISO Format | Origin / Source / Method / Comment |
|---|---|---|---|---|---|---|
| PARAMCD = HCG | AVALC | Analysis Value (C) | text | 8 | Pregnancy Test Result (CL.HCGRS) NEGATIVE POSITIVE | Predecessor; LB.LBSTRESC |
Original source
<?xml version="1.0" encoding="UTF-8"?>
<ODM xmlns="http://www.cdisc.org/ns/odm/v1.3" xmlns:def="http://www.cdisc.org/ns/def/v2.1" xmlns:xlink="http://www.w3.org/1999/xlink" ODMVersion="1.3.2" FileType="Snapshot" FileOID="CATH.adam.Define-XML_2.1" CreationDateTime="2026-09-11T00:00:00" SourceSystem="yamaa" SourceSystemVersion="1.0" def:Context="Submission">
<Study OID="STDY.CATH">
<GlobalVariables>
<StudyName>CATH</StudyName>
<StudyDescription>Example study describing each analysis parameter's values</StudyDescription>
<ProtocolName>CATH-01</ProtocolName>
</GlobalVariables>
<MetaDataVersion OID="MDV.CATH.adam" Name="CATH adam metadata" def:DefineVersion="2.1.11">
<def:Standards>
<def:Standard OID="STD.ADaMIG" Name="ADaMIG" Type="IG" Version="1.3" Status="Final"/>
</def:Standards>
<def:ValueListDef OID="VL.ADLB.AVAL">
<ItemRef ItemOID="IT.ADLB.AVAL.GLUC" OrderNumber="1" Mandatory="Yes">
<def:WhereClauseRef WhereClauseOID="WC.ADLB.AVAL.GLUC"/>
</ItemRef>
<ItemRef ItemOID="IT.ADLB.AVAL.CREAT" OrderNumber="2" Mandatory="Yes">
<def:WhereClauseRef WhereClauseOID="WC.ADLB.AVAL.CREAT"/>
</ItemRef>
</def:ValueListDef>
<def:ValueListDef OID="VL.ADLB.AVALC">
<ItemRef ItemOID="IT.ADLB.AVALC.HCG" OrderNumber="1" Mandatory="Yes">
<def:WhereClauseRef WhereClauseOID="WC.ADLB.AVALC.HCG"/>
</ItemRef>
</def:ValueListDef>
<def:WhereClauseDef OID="WC.ADLB.AVAL.GLUC">
<RangeCheck Comparator="EQ" SoftHard="Soft" def:ItemOID="IT.ADLB.PARAMCD">
<CheckValue>GLUC</CheckValue>
</RangeCheck>
</def:WhereClauseDef>
<def:WhereClauseDef OID="WC.ADLB.AVAL.CREAT">
<RangeCheck Comparator="EQ" SoftHard="Soft" def:ItemOID="IT.ADLB.PARAMCD">
<CheckValue>CREAT</CheckValue>
</RangeCheck>
</def:WhereClauseDef>
<def:WhereClauseDef OID="WC.ADLB.AVALC.HCG">
<RangeCheck Comparator="EQ" SoftHard="Soft" def:ItemOID="IT.ADLB.PARAMCD">
<CheckValue>HCG</CheckValue>
</RangeCheck>
</def:WhereClauseDef>
<ItemGroupDef OID="IG.ADLB" Name="ADLB" Purpose="Analysis" SASDatasetName="ADLB" Repeating="Yes" IsReferenceData="No" def:Structure="One record per subject per parameter" def:ArchiveLocationID="LF.ADLB" def:StandardOID="STD.ADaMIG">
<Description>
<TranslatedText xml:lang="en">Laboratory Analysis Dataset</TranslatedText>
</Description>
<ItemRef ItemOID="IT.ADLB.STUDYID" OrderNumber="1" Mandatory="Yes" KeySequence="1"/>
<ItemRef ItemOID="IT.ADLB.USUBJID" OrderNumber="2" Mandatory="Yes" KeySequence="2"/>
<ItemRef ItemOID="IT.ADLB.PARAMCD" OrderNumber="3" Mandatory="Yes" KeySequence="3"/>
<ItemRef ItemOID="IT.ADLB.PARAM" OrderNumber="4" Mandatory="Yes"/>
<ItemRef ItemOID="IT.ADLB.AVAL" OrderNumber="5" Mandatory="No"/>
<ItemRef ItemOID="IT.ADLB.AVALC" OrderNumber="6" Mandatory="No"/>
<def:Class Name="BASIC DATA STRUCTURE"/>
<def:leaf ID="LF.ADLB" xlink:href="adlb.json">
<def:title>adlb.json</def:title>
</def:leaf>
</ItemGroupDef>
<ItemDef OID="IT.ADLB.STUDYID" Name="STUDYID" DataType="text" Length="4" SASFieldName="STUDYID">
<Description>
<TranslatedText xml:lang="en">Study Identifier</TranslatedText>
</Description>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.STUDYID</TranslatedText>
</Description>
</def:Origin>
</ItemDef>
<ItemDef OID="IT.ADLB.USUBJID" Name="USUBJID" DataType="text" Length="8" SASFieldName="USUBJID">
<Description>
<TranslatedText xml:lang="en">Unique Subject Identifier</TranslatedText>
</Description>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.USUBJID</TranslatedText>
</Description>
</def:Origin>
</ItemDef>
<ItemDef OID="IT.ADLB.PARAMCD" Name="PARAMCD" DataType="text" Length="5" SASFieldName="PARAMCD">
<Description>
<TranslatedText xml:lang="en">Parameter Code</TranslatedText>
</Description>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.LBTESTCD</TranslatedText>
</Description>
</def:Origin>
</ItemDef>
<ItemDef OID="IT.ADLB.PARAM" Name="PARAM" DataType="text" Length="23" SASFieldName="PARAM">
<Description>
<TranslatedText xml:lang="en">Parameter</TranslatedText>
</Description>
<def:Origin Type="Assigned" Source="Sponsor"/>
</ItemDef>
<ItemDef OID="IT.ADLB.AVAL" Name="AVAL" DataType="float" Length="8" SignificantDigits="1" SASFieldName="AVAL">
<Description>
<TranslatedText xml:lang="en">Analysis Value</TranslatedText>
</Description>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.LBSTRESN</TranslatedText>
</Description>
</def:Origin>
<def:ValueListRef ValueListOID="VL.ADLB.AVAL"/>
</ItemDef>
<ItemDef OID="IT.ADLB.AVAL.GLUC" Name="AVAL" DataType="float" Length="8" SignificantDigits="0" SASFieldName="AVAL">
<Description>
<TranslatedText xml:lang="en">Glucose (mg/dL)</TranslatedText>
</Description>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.LBSTRESN</TranslatedText>
</Description>
</def:Origin>
</ItemDef>
<ItemDef OID="IT.ADLB.AVAL.CREAT" Name="AVAL" DataType="float" Length="8" SignificantDigits="1" SASFieldName="AVAL">
<Description>
<TranslatedText xml:lang="en">Creatinine (umol/L)</TranslatedText>
</Description>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.LBSTRESN</TranslatedText>
</Description>
</def:Origin>
</ItemDef>
<ItemDef OID="IT.ADLB.AVALC" Name="AVALC" DataType="text" Length="8" SASFieldName="AVALC">
<Description>
<TranslatedText xml:lang="en">Analysis Value (C)</TranslatedText>
</Description>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.LBSTRESC</TranslatedText>
</Description>
</def:Origin>
<def:ValueListRef ValueListOID="VL.ADLB.AVALC"/>
</ItemDef>
<ItemDef OID="IT.ADLB.AVALC.HCG" Name="AVALC" DataType="text" Length="8" SASFieldName="AVALC">
<Description>
<TranslatedText xml:lang="en">Analysis Value (C)</TranslatedText>
</Description>
<CodeListRef CodeListOID="CL.HCGRS"/>
<def:Origin Type="Predecessor">
<Description>
<TranslatedText xml:lang="en">LB.LBSTRESC</TranslatedText>
</Description>
</def:Origin>
</ItemDef>
<CodeList OID="CL.HCGRS" Name="Pregnancy Test Result" DataType="text" def:IsNonStandard="Yes">
<EnumeratedItem CodedValue="NEGATIVE"/>
<EnumeratedItem CodedValue="POSITIVE"/>
</CodeList>
</MetaDataVersion>
</Study>
</ODM>
Human review and assessment
| Dataset Name | Variable Name | Variable Label | Type | Codelist/Controlled Terms | Core | Computational Method | Origin |
|---|---|---|---|---|---|---|---|
| ADLB | STUDYID | Study Identifier | character | Req | Copy value from LB.STUDYID. | Predecessor | |
| ADLB | USUBJID | Unique Subject Identifier | character | Req | Copy value from LB.USUBJID. | Predecessor | |
| ADLB | PARAMCD | Parameter Code | character | Req | Copy value from LB.LBTESTCD. | Predecessor | |
| ADLB | PARAM | Parameter | character | Req | Recode LB.LBTESTCD: "GLUC" → "Glucose (mg/dL)", "CREAT" → "Creatinine (umol/L)", "HCG" → "Choriogonadotropin Beta"; missing values stay missing; unlisted values are errors. | Assigned | |
| ADLB | AVAL | Analysis Value | numeric | Cond | Copy value from LB.LBSTRESN. | Predecessor | |
| ADLB | AVALC | Analysis Value (C) | character | Cond | Copy value from LB.LBSTRESC. | Predecessor |
| Codelist ID | Name | Value | Decode | Codelist NCI alias | Value NCI alias | Extensible | Extended value | SAS format | Dictionary | Version |
|---|---|---|---|---|---|---|---|---|---|---|
| HCGRS | Pregnancy Test Result | NEGATIVE | No | |||||||
| HCGRS | Pregnancy Test Result | POSITIVE | No |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 1.8 | 2026-11-19 | yamaa docs build | State open and closed range endpoints, including bounds of zero | ||
| 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-adlb-metadata/full.md
Edit13 linesFollowing CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVAL, AVALC
PARAMCD is the laboratory test code. PARAM is 'Glucose (mg/dL)' for GLUC, 'Creatinine (umol/L)' for CREAT and 'Choriogonadotropin Beta' for HCG. AVAL is the numeric standard result, not rounded, and has no value for the pregnancy test. AVALC is the standard result as text, exactly as reported.
Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.
prompts/adam-adlb-metadata/conventions.md
Edit11 linesFollowing CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVAL, AVALC
PARAM is 'Glucose (mg/dL)' for GLUC, 'Creatinine (umol/L)' for CREAT and 'Choriogonadotropin Beta' for HCG. AVAL is not rounded.
Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.
prompts/adam-adlb-metadata/brief.md
Edit8 linesFollowing CDISC ADaM standards, use the provided LB dataset to create an ADLB dataset with one record per subject per parameter.
The output dataset should contain the following columns in this order: STUDYID, USUBJID, PARAMCD, PARAM, AVAL, AVALC
Read the source datasets from /app/input and save the completed dataset as /app/output/adlb.csv.
R
Edit3 lineslibrary(yamaa)yamaa_project("project.yaml")$spec("ADLB")$run()$outputPython
Edit3 linesimport yamaayamaa.project("project.yaml").spec("ADLB").run().outputsolutions/adam-adlb-metadata/result.R
Edit31 lines# Reference solution for the yamaa benchmark adam-adlb-metadata (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)lb <- read_csv( "/app/input/lb.csv", col_types = cols(.default = col_character()))param <- c( GLUC = "Glucose (mg/dL)", CREAT = "Creatinine (umol/L)", HCG = "Choriogonadotropin Beta")adlb <- lb |> transmute( STUDYID, USUBJID, PARAMCD = LBTESTCD, PARAM = unname(param[LBTESTCD]), AVAL = as.numeric(LBSTRESN), AVALC = LBSTRESC )dir.create("/app/output", showWarnings = FALSE)write_csv(adlb, "/app/output/adlb.csv", na = "")solutions/adam-adlb-metadata/result.py
Edit28 lines# Reference solution for the yamaa benchmark adam-adlb-metadata (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 pllb = pl.read_csv("/app/input/lb.csv", infer_schema=False)param = { "GLUC": "Glucose (mg/dL)", "CREAT": "Creatinine (umol/L)", "HCG": "Choriogonadotropin Beta",}adlb = lb.select( pl.col("STUDYID"), pl.col("USUBJID"), pl.col("LBTESTCD").alias("PARAMCD"), pl.col("LBTESTCD").replace_strict(param).alias("PARAM"), pl.col("LBSTRESN").cast(pl.Float64).alias("AVAL"), pl.col("LBSTRESC").alias("AVALC"),)Path("/app/output").mkdir(exist_ok=True)adlb.write_csv("/app/output/adlb.csv")solutions/adam-adlb-metadata/result.sas
Edit26 lines/* opensas reference solution for the yamaa benchmark adam-adlb-metadata. Reads the benchmark inputs and derives the requested output. Execute with the existing opensas runtime: opensas /app/output/result.sas. */data lb; length STUDYID USUBJID LBTESTCD LBTEST LBSTRESC LBSTRESU $1024; infile "/app/input/lb.csv" dsd dlm="," firstobs=2 truncover lrecl=32767; input STUDYID : $char1024. USUBJID : $char1024. LBSEQ LBTESTCD : $char1024. LBTEST : $char1024. LBSTRESC : $char1024. LBSTRESN LBSTRESU : $char1024.;run;data result; set lb; length PARAMCD $8 PARAM $40 AVALC $200; PARAMCD = LBTESTCD; if LBTESTCD = 'GLUC' then PARAM = 'Glucose (mg/dL)'; else if LBTESTCD = 'CREAT' then PARAM = 'Creatinine (umol/L)'; else if LBTESTCD = 'HCG' then PARAM = 'Choriogonadotropin Beta'; AVAL = LBSTRESN; AVALC = LBSTRESC;run;proc sql; create table final as select STUDYID, USUBJID, PARAMCD, PARAM, AVAL, AVALC from result;quit;proc export data=final outfile="/app/output/adlb.csv" dbms=csv replace; run;
yamaa