← Latest papers
💬 NLP

Serialisation Strategy Matters: How FHIR Data Format Affects LLM Medication Reconciliation

This study demonstrates that the FHIR data serialization strategy significantly impacts medication reconciliation performance in large language models, with clinical narrative formats optimizing results for models up to 8B parameters while raw JSON becomes superior for 70B models, revealing that omission is the dominant failure mode and that domain pretraining alone is insufficient for structured extraction.

Original authors: Sanjoy Pator

Published 2026-04-24
📖 6 min read🧠 Deep dive

Original authors: Sanjoy Pator

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a doctor handing over a patient's care to a colleague. The most dangerous thing that can happen is a medication gets lost in the shuffle—a pill the patient takes every day is forgotten, or a dose is accidentally doubled. This is called Medication Reconciliation, and it's a high-stakes game of "spot the difference."

Today, hospitals are trying to use AI (Large Language Models) to help with this. The AI reads the patient's digital records (which are stored in a format called FHIR) and tries to list out exactly what the patient is currently taking.

But here's the problem: The AI is smart, but it's also picky about how information is served to it. This paper asks a simple question: Does the way we format the data matter?

Think of it like ordering food. If you ask a chef for a meal, does it matter if you give them a raw list of ingredients in a messy spreadsheet, or a beautifully written recipe card? The ingredients are the same, but the presentation might change whether the chef cooks the right dish.

Here is what the researchers discovered, broken down into simple analogies:

1. The Four "Serving Styles"

The researchers tested four different ways to present the patient's data to the AI:

  • Raw JSON: This is the "Database Dump." It's like handing the chef a massive, unorganized pile of raw ingredients with technical labels (like "Item #402: Sodium Chloride"). It's accurate but hard for humans (and smaller AIs) to read quickly.
  • Markdown Table: A neat grid, like a spreadsheet. Columns for "Drug," "Dose," and "Status."
  • Clinical Narrative: A story. "Here is what the patient is taking right now: Aspirin, Metformin. Here is what they stopped taking last year..." This is written in plain English sentences.
  • Chronological Timeline: A history book. "In 2010 they took X. In 2015 they stopped. In 2020 they started Y." The AI has to read the whole timeline to figure out what is active today.

2. The "Size Matters" Rule

The biggest discovery is that the best format depends entirely on how "smart" (how big) the AI model is.

  • For the "Small" AI (7B–8B parameters): Think of this as a very bright intern. They are smart, but they get overwhelmed by messy data.

    • The Result: When you gave the intern the messy "Raw JSON" (the database dump), they got confused and missed drugs. But when you gave them the Clinical Narrative (the plain English story), they performed brilliantly.
    • The Analogy: It's like asking a student to solve a math problem. If you give them a wall of numbers, they might miss a step. If you write out the problem in a clear sentence, they get it right.
    • The Gain: Switching to the "Story" format improved the small AI's accuracy by nearly 20%. That's a huge difference in medicine.
  • For the "Super" AI (70B parameters): Think of this as a genius professor with a photographic memory.

    • The Result: The professor doesn't need the story. They can look at the messy "Raw JSON" database dump and instantly understand it. In fact, the messy data worked slightly better for them than the story format.
    • The Twist: However, even the genius professor struggled with the "Timeline" format. When forced to read a long history book to figure out what's happening now, they got confused.

3. The "Missing Pill" Problem

The researchers found a scary pattern: The AI is much more likely to forget a drug than to invent one.

  • The Analogy: Imagine the AI is a security guard checking a list of people allowed in a building.
    • Hallucination (False Positive): The guard invents a person who isn't there. (The AI says the patient is taking a drug they aren't).
    • Omission (False Negative): The guard misses a person who is there. (The AI forgets to list a drug the patient is actually taking).
  • The Finding: In every single test, the AI was far better at not inventing fake drugs than it was at remembering all the real ones.
  • Why this matters: This changes how doctors should use the AI. They shouldn't worry, "Is the AI making up drugs?" They should worry, "Did the AI miss any drugs?" The doctor's job becomes checking for missing items, not checking for fake ones.

4. The "Polypharmacy" Ceiling

There is a limit to how many drugs the "Small AI" can handle at once.

  • If a patient is taking 1 to 7 drugs, the small AI does a great job.
  • If a patient is taking 8 to 10+ drugs (common in elderly patients with multiple conditions), the small AI's brain "short-circuits." It starts dropping drugs from the list.
  • The Takeaway: The patients who need the most help (those with many medications) are the ones the small AIs fail the most. Only the "Super AI" (70B) can handle these complex cases reliably.

5. The "Domain Expert" Trap

The researchers tested a model called BioMistral, which was trained specifically on medical textbooks (PubMed). You'd think this "Medical Expert" would be the best.

  • The Result: It failed completely. It produced gibberish or just repeated the prompt.
  • The Lesson: Just because an AI knows medical words doesn't mean it knows how to follow instructions. The "General Purpose" AI (which was taught how to listen and follow rules) worked perfectly, while the "Medical Expert" (which knew the facts but forgot how to talk) was useless. Instruction-following is more important than medical knowledge for this specific task.

Summary: What Should Hospitals Do?

This paper gives clear, practical advice for hospitals trying to use AI:

  1. If you use a smaller, cheaper AI: Don't feed it raw code. Convert the patient data into a plain English story (Clinical Narrative). It will save lives by reducing errors.
  2. If you use a massive, expensive AI: You can feed it the raw data directly. It's fast and accurate.
  3. Always check for missing drugs: Since the AI tends to forget things rather than make them up, human doctors must always double-check the list to ensure nothing was left out.
  4. Beware of the "Medical Expert" trap: Don't assume a model trained only on medical texts will work better. A general AI that knows how to follow instructions is often safer.

In short: The format of the data is just as important as the intelligence of the AI. Serving the right "dish" to the right "chef" is the key to patient safety.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →