LLM-Powered Information Extraction from Pediatric Cardiac MRI Reports

uk_national_health_service_(nhs) · Healthcare · year n/a · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Clinical information extraction from pediatric cardiac MRI reports

Great Ormond Street Hospital needed to extract structured clinical identifiers and measurements from heterogeneous unstructured cardiac MRI PDF reports so clinicians and researchers could analyze cohorts at scale.

Constraints:

Architecture

The team built a governed GRID environment with separate development and staging Linux servers, then developed two extraction pipelines: smaller LLMs used as question-answering models for patient identifiers, and a few-shot SetFit table-row classifier for headers, values, and non-relevant rows. Prompt context improved entity extraction, and the staging server ran pipelines on patient data without internet access.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  Dev_server["GRID development server"] --> Pipeline_components["Pipeline components"]
  Pipeline_components --> Staging_server["GRID staging server"]
  Staging_server --> Report_corpus["Patient report corpus"]
  Report_corpus --> Identifier_models["Identifier QA models"]
  Report_corpus --> Table_classifier["Table row classifier"]
  Identifier_models --> Structured_data["Structured clinical data"]
  Table_classifier --> Structured_data
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
GRID development server Internet-connected Linux server used to create pipelines and components without patient-data processing. GRID staging server, Pipeline components
GRID staging server Disconnected server where patient-data pipelines run under information-governance constraints. GRID development server, Patient report corpus
Pipeline components Reusable extraction components created in development and executed against patient data in staging. GRID development server, GRID staging server
Patient report corpus Unstructured cardiac MRI PDF reports containing identifiers, narrative text, and measurement tables. GRID staging server, Identifier QA models, Table row classifier
Identifier QA models Small LLMs run as question-answering models over report text chunks to extract patient identifiers. Patient report corpus, Structured clinical data
Table row classifier SetFit and SVM-based few-shot classifier for header rows, value rows, and incorrectly captured table rows. Patient report corpus, Structured clinical data
Structured clinical data Existing structured data points that become linkable once identifiers are extracted from reports. Identifier QA models, Table row classifier

Data flow

Pipelines and components are built on the internet-connected development server, then run against patient data on the disconnected staging server. LLM question-answering extracts identifiers from report text chunks so reports can link to structured data; table rows are labeled with a small annotated set, embedded by sentence transformers, and classified with an SVM head.

3 supporting quotes
“we create pipelines and components inside the development server and run on the bti data in the staging server”transcript, stated
“we used the capabilities of large language models as a question answering tool on this purpose”transcript, stated
“these embeddings are then used in a classification head a classical uh ML classifier”transcript, stated

Why this architecture

The hospital needed a controlled environment for patient data and methods that worked with heterogeneous reports without GPU-heavy infrastructure. LLM QA absorbed textual heterogeneity for identifiers, while SetFit addressed table-row classification where a small labeled set and recurring table patterns existed.

3 supporting quotes
“since it's an NHS tress we have lot of we have to consider the information governance very thoroughly”transcript, stated
“we used smaller large language models because since we don't have access to GPU power as for now we are using CPU Powers”transcript, stated
“we weren't able to scale it across the 10 years of data one was a heterogenous in the data”transcript, stated

Models used: Flan-T5 Large · Flan-T5 Small · BERT · RoBERTa · DistilRoBERTa · SetFit · sentence transformers · SVM classifier

Scale

Alternatives considered (roads not taken)

Manual review of unstructured reports

Rejected because: Manual extraction was time-consuming, required domain expertise, and could not scale to large volumes.

“a clinician would have to manually go over all these unstructured reports because this information is not present as part of our existing structure data”transcript, stated
“they can scale it up to a large volume of information”transcript, stated

Traditional NLP techniques for heterogeneous report text

Rejected because: The reports varied over time, so accounting for all changes and maintaining reliability would be difficult.

“we were not able to use tradition NLP techniques because we would have to ACC all the changes and the development and the relability of that will be a will be a big challenge”transcript, stated

Rule-based table extraction

Rejected because: Rules did not scale across the heterogeneous 10-year corpus and captured incorrect tabular information.

“we started with a rule based approach like can we just extract the tables using rules but it wasn't uh we weren't able to scale it across the 10 years of data”transcript, stated

Patterns

privacy-preserving-processing (safety)

Patient-data processing occurs on an internet-disconnected staging server while development happens separately.

“one is a development server which have access to the internet but we are not we are not permitted to process any patient data on it”transcript, stated
“the other one is a staging server which is uh disconnected from the internet but we can process the pipelines on patient data”transcript, stated

context-engineering (prompting)

Adding report context to extraction prompts improved model focus on the right patient identifier.

“by providing that promt performance of the models on extracting entities like name or the reference name has increased significantly”transcript, stated
“unless we provide a uh context that is an unstructured text from a report of a patient in the hospital the model is not getting the proper context”transcript, stated

fine-tuning-adaptation (model-adaptation)

SetFit fine-tuned sentence-transformer representations on a small labeled table-row dataset.

“we followed the few short learning approach called set fit it it is kind of very popular”transcript, stated
“they then F tune the sentence Transformer to be able to capture the representations of these examples”transcript, stated

eval-driven-development (evaluation)

The team compared model variants, prompt context, F1 validation, and attribution scores before choosing extraction/classification approaches.

“we did some evaluation s uh to see which kind of uh models are suitable for work”transcript, stated
“once uh the classific the classifier has been trained we then kind of um validated using the F1 score”transcript, stated

Tradeoffs

Use smaller CPU-friendly LLMs

Chose small language models on available CPU infrastructure over GPU-heavy large-model processing.

Rationale: The team did not have GPU access, so extraction had to fit local compute constraints.

“we used smaller large language models because since we don't have access to GPU power as for now we are using CPU Powers”transcript, stated

Use SetFit for table-row classification

Chose few-shot sentence-transformer classifier with an SVM head over rules over heterogeneous PDF table extraction.

Rationale: The data had recurring table patterns but limited labeled examples, making few-shot classification more appropriate than brittle rules.

“because we had a very few or a less number of examples labeled we followed the few short learning approach called set fit”transcript, stated

Gotchas (what bit them)

Patient data could not be processed on ordinary internet-connected development machines.

Root cause: NHS information-governance constraints required careful separation of development and patient-data execution.

Resolution: Build GRID with separate development and staging servers.

“we cannot rely on our laptop for this process so we have to figure out an ecosystem inside our unit to process work like this”transcript, stated

Rule-based table extraction captured incorrect tabular information.

Root cause: PDF tables varied over 10 years and produced heterogeneous/incorrect table captures.

Resolution: Train a few-shot SetFit classifier on annotated table rows.

“we found that a lot of uh incorrect information were captured as tabular information that kind of reduced the performance of a rule-based approach”transcript, stated

Some models hallucinated or performed poorly on identifiers.

Root cause: Small models and large-number identifiers were unevenly suited to the extraction task.

Resolution: Evaluate multiple small models and prompt context; avoid reporting models that hallucinated badly.

“I have avoided reporting some of the models which were hallucinating and was not at all giving a good Result”transcript, stated

Evaluation

The team compared small LLMs for identifier extraction, tested prompt context effects, inspected attribution behavior, and validated SetFit table classification with F1 score on a held-out validation split.

Metrics: 15,000 reports over 10 years · 280 training examples and 80 validation examples · F1 validation for table-row classification · processing reduced from days to a few hours

“the other study we did was to was to include a prompt which which will give context to the large language model about what is the report”transcript, stated
“our uh annotated data was we split them into 280 examples for training and 80 examples for validation”transcript, stated

Outcomes

The work targets nearly 15,000 cardiac MRI reports accumulated over 10 years at a pediatric NHS hospital.

“these 15,000 reports will now be able to link up the other structured data that we are providing”transcript, stated
“we can see a significant boost in the performance uh with the help of uh uh a few short learning approach”transcript, stated