AI & XML / LLM test suite / Results / Test cases / FHIR_HFIR_07_Gastro-intestinal_json
Test case description
This test checks whether the model can generate a FHIR Bundle for a gastrointestinal HFIR history with a Patient and an Observation, including correct namespace and Bundle ID.
Source file | FHIR_HFIR_07_Gastrointestinal_json.txt |
|---|---|
Series | 2 |
Categories | fhir, json, hfir, bundle |
Evaluation | LLM judge |
Prompt SHA-256 | 17c9f5b2cead5c0d785d8506b8312569f76a3e7d141a53a4aff8b1dded552d94 |
LLM judge: The answer is evaluated with LLM support. A judge model compares the model’s answer with the domain expectation and decides whether its content meets it.
Expected result
Valid FHIR R4 JSON Bundle with a unique Bundle id, Patient, gastrointestinal Observation and H, F, I and R components in that order.
Expectation in the catalog | No |
|---|---|
Correct result in the catalog | Yes |
Judge instruction
Check Bundle identity, format-compliant FHIR namespace handling, gastrointestinal relevance and order of the four HFIR components.
Must be satisfied
The output consists solely of a syntactically valid JSON object. Markdown code fences may be removed for evaluation; extra prose, comments and trailing commas are not allowed.
The root object contains resourceType with value Bundle.
Bundle.entry is an array whose resource objects have the correct resourceType values Patient and Observation.
FHIR primitives are JSON values with the correct data type. XML attributes or namespace declarations must not be imitated.
The Observation has at least status and code. Observation.subject.reference consistently references the Patient in the Bundle.
Bundle.id is present, nonempty and a syntactically valid FHIR id value.
The Bundle contains a Patient and a linked Observation.
Observation.code or Observation.code.text identifies gastrointestinal symptoms or a semantically unambiguous equivalent.
The Observation contains exactly four component entries in order H, F, I, R.
Each component has a nonempty valueString or the format-compliant FHIR RDF representation of that valueString.
JSON requires no XML namespace; order comes from the component array.
Error criteria
The output is not a parseable JSON object or contains prose or comments outside JSON.
resourceType Bundle is missing, or Patient and Observation are not modeled in entry[].resource.
XML-style value attributes, xmlns fields treated as mandatory structure, or other mixed syntax are used.
Observation.status, Observation.code or the consistent Patient reference is missing.
Bundle.id is missing or not a valid FHIR id value.
Gastrointestinal relevance is missing or the Observation describes another clinical topic.
Components are incomplete, duplicated, out of order or not modeled as four separate components.
Judge note: FHIR JSON has no XML namespace. A missing xmlns field is therefore never an error. Valid FHIR R4 JSON structure is decisive. Clinical HFIR text is judged by semantic plausibility, not particular wording.
Prompt
Baue ein FHIR Bundle als json, das eine HFIR-Anamnese zur gastrointestinalen Symptomatik enthält.
Es soll einen Patient und eine Observation enthalten.
Verwende das korrekte FHIR-Namespace und eine eindeutige Bundle-ID.
Füge die HFIR-Teile H, F, I, R in der richtigen Reihenfolge ein.720 Runs 707 evaluated 20.6 % Score 7.8 % exactly correct
Help on evaluation, score and exact correctness
Score is a graded quality measure: correct = 100 %, mostly_correct = 80 %, partial = 50 %, wrong/not_answered = 0 %.
Exactly correct is stricter: only correct-labeled runs count. Mostly correct increases score but does not count as exactly correct.
Evaluated counts all runs with a substantive judgment. LLM-judge errors also count as evaluated, with score 0 %.
Model Category Access route