
Loading summary
A
Welcome to the Health AI Brief. Breaking down the AI shaping our world one concept at a time.
B
Medical notes are notoriously unstructured. We jump from social history to current medications to a random lab result in the middle of a paragraph. When we paste this wall of text into an AI, the model's attention mechanism has to work incredibly hard to figure out what is a command and what's patient data. How do the world's leading AI engineers ensure the model doesn't get confused? They often use XML tags. These are simple labels enclosed in brackets, like patient history at the start of a section and patient history at the end. These tags act as mental boundaries for the AI. They clearly separate your instructions from the data. When the AI sees these tags, it understands exactly where the blood ends and where the imaging begins. Think of it like a set of coloured dividers in a physical patient file. Without them, you're just flipping through a stack of 200 loose pages. With them, your eyes and the AI's attention mechanism can go straight to the relevant tap. It reduces the cognitive load on the model, leading to significantly fewer errors in extraction and summary. So the clinical takeaways are. First, to sandwich your data, aim to wrap any text in clear tags like history or tests. This tells the AI everything inside here is data, not an instruction. Second is structure your outputs. You can also tell an AI provide your answer in XML tag diagnosis tags. This makes it much easier to copy and paste the results back into a different work stream. Third is to reduce hallucination. By clearly separating your task from the context using XML tags, you can prevent an AI from accidentally thinking a previous task's information is part of your current instruction. So that's XML tags in a nutshell. An attempt to take messy, unstructured data and enforce a structure that makes it easier for the AI to read.
Podcast: The Health AI Brief
Host: Stephen A
Date: April 30, 2026
In this quick-hit episode of The Health AI Brief, Stephen A explores how major tech companies use XML tags to bring much-needed order to notoriously chaotic medical charts. The focus is on how XML—simple, structural markup—guides large AI models to interpret medical data efficiently, leading to better accuracy, fewer errors, and a streamlined workflow for clinicians.
Main Theme: Bringing structure to medical notes with XML tags for optimal AI performance in healthcare documentation.
"Medical notes are notoriously unstructured. We jump from social history to current medications to a random lab result in the middle of a paragraph." — Stephen A
<patient history> or <tests>, that wrap around sections of text."Think of it like a set of coloured dividers in a physical patient file. Without them, you're just flipping through a stack of 200 loose pages. With them, your eyes and the AI's attention mechanism can go straight to the relevant tap." — Stephen A
Stephen A breaks down practical applications for clinicians, emphasizing three primary best practices:
a. Sandwich Your Data
Use clear tags around any patient data (e.g., <history>). This signals to the AI where data begins and ends, making it easier for the model to process and less likely to confuse context with instructions.
"Aim to wrap any text in clear tags like history or tests. This tells the AI everything inside here is data, not an instruction." — Stephen A
b. Structure Your Outputs
When requesting outputs, instruct the AI to provide answers in a specific tag format (e.g., <diagnosis>), streamlining integration back into EHR systems or workflows.
"You can also tell an AI provide your answer in XML tag diagnosis tags. This makes it much easier to copy and paste the results back into a different work stream." — Stephen A
c. Reduce Hallucination
By using XML tags to separate tasks from context, you help prevent the AI from pulling irrelevant data from earlier requests, minimizing hallucinated or inaccurate outputs.
"By clearly separating your task from the context using XML tags, you can prevent an AI from accidentally thinking a previous task's information is part of your current instruction." — Stephen A
On cognitive load and error reduction:
"It reduces the cognitive load on the model, leading to significantly fewer errors in extraction and summary." — Stephen A [00:55]
On the value of structure in AI workflows:
"So that's XML tags in a nutshell. An attempt to take messy, unstructured data and enforce a structure that makes it easier for the AI to read." — Stephen A [02:15]
XML tags are a practical, high-yield tool for adding structure to unstructured medical notes, enabling AI models to work more accurately and efficiently—ultimately streamlining clinician workflows and improving patient data integrity.