AI & XML / LLM test suite / Results / Test cases / FHIR_HFIR_02_Bundle-Collection_ttl
Test case description
This test checks whether the model can generate a FHIR Bundle of type collection with a Patient resource and an Observation representing HFIR through Observation.component with valueString.
Source file | FHIR_HFIR_02_BundleCollection_ttl.txt |
|---|---|
Series | 2 |
Categories | fhir, ttl, hfir, bundle |
Evaluation | LLM judge |
Prompt SHA-256 | d73afad8df61c7a19af012b7bbd34150e0b04878b690ec5b65d5b27cff37c647 |
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 RDF/Turtle Bundle of type collection with Patient, Observation and four HFIR valueString components modeled exclusively as Observation.component.
Expectation in the catalog | No |
|---|---|
Correct result in the catalog | Yes |
Judge instruction
Check Bundle.type collection, the Patient–Observation relationship and HFIR represented exclusively in four structured components.
Must be satisfied
The output consists solely of syntactically valid Turtle and can be parsed as an RDF graph. Markdown code fences may be removed for evaluation; extra prose is not allowed.
The prefix fhir is bound to http://hl7.org/fhir/.
Exactly one node is typed as fhir:Bundle and marked as the root resource with fhir:nodeRole fhir:treeRoot.
Patient and Observation are modeled as fhir:Patient and fhir:Observation resources and reachable through the FHIR Bundle structure.
FHIR primitives use R4 RDF modeling with fhir:value. Repeated elements have consistent, gapless fhir:index values starting at 0.
The Observation has valid FHIR RDF statements for status and code. The subject Reference contains a consistent fhir:Reference.reference and preferably a resolvable fhir:link to the Patient.
Bundle.type is exactly collection.
The Bundle contains exactly one Patient and one Observation.
HFIR content is modeled exclusively in exactly four Observation.component entries H, F, I and R.
Each HFIR component uses valueString or its format-compliant FHIR RDF representation and contains a nonempty value.
Error criteria
The output is not parseable Turtle, binds fhir incorrectly or contains prose outside the RDF serialization.
The graph uses only invented predicates instead of FHIR R4 RDF properties.
More than one node is marked as treeRoot or the root is not a Bundle.
Primitive values are not represented with fhir:value, or repetitions have duplicate or gap-containing fhir:index values.
Patient, Observation, status, code or the subject Reference pointing to the Patient is missing.
Bundle.type is missing or is not collection.
HFIR is additionally or exclusively modeled as Observation.valueString, note, extension, narrative or a separate resource.
An HFIR component uses a value type other than valueString or is empty.
The graph contains additional clinical Bundle resources beyond the required Patient and Observation resources, although the test requires exactly those two resources.
Judge note: Evaluate the official FHIR R4 RDF representation. Turtle is an RDF graph, but the order of repeated FHIR elements is defined by fhir:index. Clinical HFIR text is judged by semantic plausibility, not particular wording.
Prompt
Baue ein FHIR Bundle als ttl mit type collection.
Erzeuge eine Patient-Ressource mit zufälliger ID.
Danach eine Observation, in der die HFIR-Elemente als Observation.component vorkommen.
Jeder Abschnitt H, F, I, R soll valueString nutzen.
Inhaltlich soll es eine typische Anamnese aus der Allgemeinmedizin sein.
Gib nur FHIR ttl aus.737 Runs 720 evaluated 17.0 % Score 9.3 % 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