---
title: "Document-level Clinical Entity and Relation extraction via"
description: "Bhattarai and colleagues use medical terminology from UMLS to improve the extraction of medications and their relationships from clinical text."
canonical: "https://research.elamur.ai/free/en/papers/bhattarai-2024-document-level-clinical-entity-relation/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bhattarai-2024-document-level-clinical-entity-relation/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / Document-level Clinical Entity and Relation extraction via Knowledge Base-Guided Generation

# Document-level Clinical Entity and Relation extraction via Knowledge Base-Guided Generation

Paper · 2024 · Kriti Bhattarai, Inez Y. Oh, Zachary B. Abrams et al.

**Authors:** Kriti Bhattarai, Inez Y. Oh, Zachary B. Abrams and Albert M. Lai · **Year:** 2024 · **Venue:** Proceedings of the 23rd Workshop on Biomedical Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[Cited by **3** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/bhattarai-2024-document-level-clinical-entity-relation/cited-by/) · Proceedings of the 23rd Workshop on Biomedical Natural Language Processing · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2024.bionlp-1.24/)
- [PDF](https://aclanthology.org/2024.bionlp-1.24.pdf)
- [DOI 10.18653/v1/2024.bionlp-1.24](https://doi.org/10.18653/v1/2024.bionlp-1.24)

## Summary

A discharge summary can name several medicines and describe why each was prescribed, how it was given, or what happened after the patient took it. Turning that account into structured information requires finding the medicines and linking each one to the right details. A system might recognize that a passage contains a dose and an adverse effect yet miss the abbreviated drug name that connects them to the patient’s treatment. Bhattarai and colleagues test whether a medical terminology resource can help with that part of clinical [information extraction](https://md.research.elamur.ai/free/en/concepts/information-extraction/).

The authors use the Unified Medical Language System, or UMLS, to give GPT a list of medication concepts drawn from the document it is about to read. A tool called MetaMap matches expressions in the text to UMLS concepts. The authors keep matches in medication-related categories and add them to a prompt that already contains the clinical text, extraction instructions, and examples. GPT then identifies pairs such as a drug and its dosage or a drug and an adverse effect. The list supplies vocabulary specific to the document, while the surrounding text supplies the evidence for how its entities are related.

The study compares this approach with ordinary prompting and with [retrieval-augmented generation](https://md.research.elamur.ai/free/en/concepts/retrieval-augmented-generation/), or RAG, which retrieves similar passages from an indexed copy of UMLS terminology. Direct concept guidance produced the highest reported micro-F1, a score that combines precision and recall, on both collections. With GPT-4-32k, micro-F1 on the n2c2 discharge summaries was 0.76 with ordinary prompting, 0.76 with RAG, and 0.80 with the mapped concepts. On the Adverse Drug Events corpus of published case reports, the corresponding scores were 0.82, 0.85, and 0.94. Direct guidance also improved the reported aggregate results for GPT-3.5-turbo on both collections.

The ADE results help explain what changed. GPT-4-32k had reported precision of 1.0 on that corpus both with ordinary prompting and with the mapped concepts, while recall rose from 0.70 to 0.89. Under the study’s scoring, the guided system recovered more annotated pairs while maintaining its reported precision. An example from a discharge summary shows additional strength pairs for Plavix, ASA, and Cipro after guidance was added. The comparisons support using document-specific terminology for medication extraction. They leave open how much of the benefit comes from the mappings themselves, the filtering of those mappings, or the concise way the concepts are presented.

## Deep dive: Document-level Clinical Entity and Relation extraction via Knowledge Base-Guided Generation

Bhattarai and colleagues use medical terminology from UMLS to improve the extraction of medications and their relationships from clinical text. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Finding the mentions and linking them

Clinical text records several kinds of information about medication use. A document can specify a drug, describe its route of administration, record its strength, and explain why it was given. Each of those items can have value on its own. For tasks that depend on the treatment described in the record, however, the connections matter just as much. A route is useful when it can be attached to the drug administered by that route. An adverse effect is informative when the text supports linking it to a particular drug.

The distinction is between identifying entities and extracting relations. Finding the spans of text that mention medicines, dosages, or effects is a form of [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/). Relation extraction adds a claim about how the entities are connected. A document can contain the right drug and the right dose somewhere in its text while still yielding an incorrect output if the dose is assigned to the wrong drug. Conversely, even a clear description of the connection is difficult to extract when the system fails to recognize one of the names involved.

The paper’s examples make the difference concrete. In the example used to illustrate a discharge summary, the drugs include omeprazole, prednisone, indomethacin, and ASA. The passage describes stomach protection in connection with some of the medication use and gives pain as the reason for prescribing ASA. Those details belong to different relationships. A system that recognizes the medical vocabulary still has to work out which wording describes a reason for treatment and which wording describes a possible adverse effect. Recording every drug alongside every medically meaningful phrase would lose the distinctions the annotations are intended to capture.

The ADE case-report example illustrates another difficulty. The passage discusses olanzapine in the treatment of a condition linked to clozapine, while also referring to the recurrence of hematologic effects. The drugs appear in the same account, but they play different roles. Evidence about which drug induced a condition comes from what the sentence says about the drug, rather than simply from the presence of a drug name near the name of a condition. Recognizing the names helps locate the possible participants in the relation. The wording determines whether the proposed relation is supported.

Working at document level lets the extraction system use the clinical text as a whole. That matters because the note supplies context for identifying a mention and deciding what it is connected to. A document-level input also creates more opportunities for confusion. Several drugs can be discussed in the same note, and the same kind of detail can occur beside different drugs. An evaluation that accepts whole documents therefore tests extraction in the presence of competing candidates. Establishing how well the system links mentions across sentence boundaries would require a separate breakdown of the results.

The target categories also depend on the collection. The discharge summaries distinguish the strength of a drug from its dosage, and record other attributes such as frequency, form, route, and duration. They also distinguish a reason for treatment from an adverse drug event. The case reports supply a narrower range of annotated relations for the experiment. The authors ask the extraction system for a specified kind of pair, so it needs to respect the distinctions of the particular task. A correct medication mention can take part in several different answers to requests about the same document.

#### Why prompt examples can leave gaps

The authors build on earlier clinical extraction work using [few-shot learning](https://md.research.elamur.ai/free/en/concepts/few-shot-learning/) in context. In this setting, examples within the prompt demonstrate what output the system should produce for a new input. An example can show how to connect a drug with a dosage and how to lay out the resulting pairs. The clinical text to be processed then occupies the same role as the example input. This use of demonstrations follows the prompting approach the authors trace to Brown and colleagues. [Language Models are Few-Shot Learners](https://md.research.elamur.ai/free/en/papers/brown-2020-language-models-few-shot-learners/)

The paper describes earlier studies that applied this approach to clinical entity extraction and related tasks. GPT can make use of contextual wording, which is valuable when the relation depends on how a patient’s treatment is discussed. Other earlier work showed that learned systems already capture some clinical knowledge. The difficulty the authors emphasize is coverage. A system can understand what the sentence is doing while overlooking a drug name, an abbreviation, an acronym, or an alias. The authors suggest that incomplete or dated domain-specific material in prior training could contribute to these misses. Their experiment approaches the issue through the information available at extraction time. [Large Language Models Encode Clinical Knowledge](https://md.research.elamur.ai/free/en/papers/singhal-2022-large-language-models-encode-clinical/)

The distinction between understanding the task and recognizing its vocabulary motivates the paper’s design. A dosage example tells the system what sort of relationship to extract. It cannot demonstrate how every possible drug name will be written in a discharge summary. Conversely, a terminology resource can provide a candidate interpretation of an abbreviation while leaving open whether the sentence supplies a dose, a strength, or a reason for the drug’s use. The authors preserve few-shot prompting for contextual interpretation and add a separate source of vocabulary for recognizing candidate medications.

A plain prompt makes this division of labor easy to see. It provides instructions, demonstrations, and text from the document. Recognizing the medication is part of the extraction operation. A guided prompt adds candidate concepts discovered before generation begins. These candidates are tied to wording already in the document, so the added information can address a miss that a more elaborate explanation of the task might leave untouched. The proposed benefit comes from giving different documents different terminology hints while retaining a common task format.

#### Why use a terminology resource?

UMLS brings biomedical terminology from many source vocabularies into one resource. The paper describes it as covering more than 1 million biomedical concepts from over 100 source vocabularies. That breadth matters because the terms found in clinical writing can include brand names and local writing conventions such as abbreviations. A terminology resource gives the extraction pipeline a place to look for possible matches when a medicine is mentioned in a form that might otherwise be skipped.

The paper situates this use of UMLS within earlier efforts to add domain knowledge to text processing. It describes prior work integrating knowledge bases with systems such as BERT and discusses a drug-identification study that used a bidirectional recurrent system and representations derived from a [knowledge graph](https://md.research.elamur.ai/free/en/concepts/knowledge-graph/). It also cites work on how medical knowledge bases complement automated identification of medical information. These examples establish the broader direction the authors adopt. Their specific implementation adds the outcome of document-level concept mapping to the prompt. [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/)

Retrieval was another route to using external information. The authors cite Almanac as an earlier clinical system that incorporated material from outside the generator and reported improved performance over its comparison systems. Their own RAG implementation retrieves from UMLS terminology. This gives the experiment a comparison grounded in the same resource. Both approaches make external terminology available at extraction time, but they choose the material with different operations.

With concept mapping, the selection starts at an expression in the note. The mapper proposes a UMLS concept to account for that expression, and the category filter decides whether the concept should reach the prompt. With retrieval, the selection starts from a representation of the prompt and searches for portions of the terminology file with similar representations. A portion can be relevant to the clinical content while containing more information than the particular term the generator needs. It can also rank well for a broad similarity that has little to do with the abbreviation whose recognition would change the answer.

That difference gives the paper a more specific question than whether access to more medical information helps. It asks whether a document-specific list of mapped medication concepts will guide extraction more effectively than retrieving similar pieces of a terminology resource. The plain prompt provides a baseline for each approach. The comparison between mapping and RAG then makes the delivery of external knowledge part of what the experiment measures.

### The method, step by step

#### From the clinical document to relation pairs

The guided pipeline starts with a clinical text and a request for a particular kind of medication relation. For a dosage task, the desired output consists of drugs paired with the dosages that the text attributes to them. For another task, the same prompt format asks for a different type of detail. The examples teach the shape of the answer, and the document provides the material from which the answer must be taken.

The authors first pass the document through MetaMap, a program for linking words and phrases in biomedical text to UMLS concepts. They describe MetaMap as using lexical and syntactic analysis together with semantic and concept mapping. In practical terms, this stage tries to turn expressions in the note into candidate entries in the terminology resource. It can return concepts outside the medication task because UMLS covers many kinds of biomedical information.

The pipeline next keeps candidates in designated medication-related categories. Its permitted categories are organic chemical, antibiotic, and pharmacologic substance. The selection defines which terminology hints get appended to the prompt. The clinical text itself remains available to the generator, including the words for reasons, effects, and medication attributes. The filter is applied to the mapped hints because the authors are targeting recognition of the medication side of the relation.

The resulting list is specific to the note. The prompt combines the note and ordinary extraction guidance with that list. Accordingly, different documents can be described by the same extraction instructions while bringing different medication candidates to the task. This is what the authors mean by a dynamic prompt. The text already varies by example, as it would in ordinary prompting, and the added terminology varies with it.

Finally, GPT produces the requested pairs from the document. The cues in the prompt can help it recognize a drug as an entity worth considering. Whether an entity has the requested relation still depends on the text. A candidate drug might occur in a note without any specified frequency, for example, or the nearest frequency expression might belong to a different drug. The concept mapping supplies a possible interpretation of the drug name without determining the answer to either question.

Extracting medication relations with document-specific UMLS concepts The steps in order.

#### The mapping and the medication filter

The paper represents its clinical inputs as a collection of texts. With subscripts written explicitly, the input notation is:

```
X = {x₁, x₂, …, xₙ}
```

Here `X` is the collection, and `xᵢ` is the clinical text at index `i`. The subscripts `1` and `n` indicate the first and final texts. In this expression, `n` denotes the number of input texts. The braces enclose the collection, the ellipsis continues the indexed sequence, and the equals sign identifies `X` with the collection displayed on its right.

MetaMap produces a concept set for each of those texts. The following expression uses `mᵢ` for the number of concepts associated with `xᵢ`, since the paper uses `n` again when describing the concept count.

```
Cᵢ = {cᵢ₁, cᵢ₂, …, cᵢₘᵢ}
```

`Cᵢ` is the set of concepts returned for clinical text `xᵢ`. The notation `cᵢⱼ` refers to the concept at index `j` in the results for text `i`. The right side lists the concepts from the first through the last, and `mᵢ` is the number returned for that text. The two indices keep a concept associated with a particular document, even when it also appears in the mappings for other documents.

A useful way to read this expression is as the output of an intermediate operation. At this point, the pipeline has candidates for what some of the note’s expressions mean. It has yet to establish that a particular candidate appears as the drug in a correctly extracted pair. The set can contain biomedical concepts from several categories, and its size can vary with the document. It is the material from which the authors select the extra guidance for the prompt.

The filter keeps only concepts in the permitted medication categories. The paper’s selection rule can be written as follows:

```
C_filtered,i = {cᵢⱼ ∈ Cᵢ | cᵢⱼ ∈ filtered groups}
```

`C_filtered,i` is the filtered set for text `i`, and `Cᵢ` is the corresponding set before filtering. The first membership symbol `∈` says that every candidate `cᵢⱼ` must come from that original set. The vertical bar introduces the condition for inclusion. The second membership expression means that the concept belongs to a permitted category. The words `filtered groups` refer to the organic chemical, antibiotic, and pharmacologic substance categories specified by the authors. The braces describe the set of concepts satisfying the condition.

The terminology source is broad, but the augmentation supplied to GPT is selective. That selection follows from the authors’ diagnosis of the problem. If the challenge is that a clinical extractor overlooks a medication name, a list aimed at medications gives it a narrower set of candidates to consider. Including other kinds of mapped concepts could change that balance, and the experiment defines its main approach around the restricted list.

The mapping step also affects which possible aids can reach GPT. The filter can preserve a relevant drug concept if the mapper has found it and assigned it to a permitted group. When either condition fails, the candidate is absent from the added list. The generator still receives the note and can extract a relation on the strength of the note itself. The pipeline therefore uses mapped candidates as additional evidence during prompting, rather than using them as the sole inventory of entities from which an answer can be assembled.

This distinction matters for interpreting the output examples. The authors show a list of several salient drug concepts related to the kinds of misses they observed. Some names can already be extracted from the clinical text under ordinary prompting. Others appear in the guided output. Adding a concept list can reinforce familiar terms as well as bring attention to a less readily recognized expression. The pipeline applies the same mapping and filtering operation to each note without first deciding which of its terms GPT would have missed.

#### How the prompt is assembled

The authors express the final prompt as a concatenation:

```
Pᵢ = Concat(P, C_filtered,i)
```

`Pᵢ` is the prompt used for clinical text `xᵢ`. `Concat` means to join the material in its arguments, which are separated by a comma. `P` is the initial prompt in the paper’s notation, and `C_filtered,i` is the list of mapped concepts retained for that instance. The sample prompt shows how the clinical text enters the initial material and how the list associated with that same text is supplied as an additional input. The subscript `i` links the assembled prompt to its document.

The prompt illustrates dosage extraction. The note is the place to look for evidence that a medicine has a particular dosage. The medication list comes from MetaMap, so it can help the system recognize a name in the note. A dosage still has to be found and paired within the text. The same design can be used for a request about a different relation by replacing the requested entity type. A frequency task, for example, asks about how frequently a medication is given, while the dosage task asks for a different kind of detail attached to the drug.

Few-shot demonstrations are part of the procedure. The system sees examples of the extraction behavior within the prompt, then produces an answer for the target document. The described workflow introduces UMLS at this prompting stage. Its account of the procedure centers on preparing the input and running extraction, rather than on updating GPT’s parameters with the corpus. Likewise, the reference annotations are the standard against which the outputs are evaluated. The medication list for a document is constructed from the document’s text and UMLS, so it represents a different source of information from the annotated relation pairs used for scoring.

The authors tried a few prompts and chose one that gave them a more specific output. They kept its format across the relation tasks and replaced the requested entity type for each run. Keeping that format common makes it easier to relate changes in aggregate performance to the presence and delivery of UMLS guidance. The small amount of prompt selection also matters when reading the result. The comparison describes what happened under the authors’ chosen format, and the study does not establish how similarly the approaches would behave under other demonstration choices or instructions.

The generators were GPT-4-32k, Version 0613, and GPT-3.5-turbo, Version 0301, accessed through the Microsoft Azure OpenAI REST API. The settings appendix includes 200 tokens under its entry for tokenization and context window. It also lists 0.95 and -1.0 alongside a set of generation settings, including temperature, top p, and a presence penalty, without a complete association between settings and values. In particular, the 200 tokens entry does not establish that the authors cut every clinical document to that length. The method names a document as the input each time and presents document-length distributions separately.

#### How retrieval supplies different context

The RAG comparison uses a different procedure to bring UMLS into the prompt. It begins with the UMLS concept-name and sources file, MRCONSO.RRF. The authors divide this file into chunks of 8192 tokens. A token is a unit of text used in computational processing. Chunking makes it possible to process the file in portions, each of which can then be represented by an embedding. An embedding is a numerical representation used to compare the content of one item with that of another.

The embeddings for those chunks go into a vector database. At extraction time, the prompt is compared with the stored representations. The authors retrieve the top 30 results by similarity to the prompt and add the retrieved material to it before generating the extraction. This makes the retrieval step a search for pieces of the resource that are relevant to the query as a whole. The resource is indexed before the clinical input arrives, while the choice of results depends on that input’s prompt.

A chunk is a different kind of unit from a matched concept. In the mapping procedure, a candidate is proposed in response to an expression and can pass or fail a category test. In the RAG procedure, a candidate is a block of terminology data selected by similarity. It can contain multiple entries, some relevant and some incidental to the extraction. The generator receives the retrieved context and must make use of whatever terminology within it bears on the request.

The distinction becomes important when a useful expression is short, such as ASA. The mapping route attempts to account for the expression in the document and supplies the concept if it passes the filter. The retrieval route can supply an entry useful for interpreting the abbreviation if that entry appears in material ranked highly for the prompt. The authors suggest that some useful concepts may be left outside the selected chunks. They frame this as a possible explanation for the results, since the retrieval experiment does not count how many required drug terms are present in the chosen material.

The two UMLS conditions therefore differ at several points. They select information with different methods, deliver it at different levels of granularity, and produce different kinds of context for the generator. The plain condition retains the few-shot extraction prompt without either addition. Together the conditions test the practical result of each way of supplying terminology. Understanding the mechanism behind a difference would require separating some of those design choices, which the study compares as complete approaches.

### Experiments and results

#### What the two collections ask the system to recover

The n2c2 collection used in the experiment comprises 303 deidentified discharge summaries from the MIMIC-III critical care database. Its medication-related annotations were produced by 3 subject matter experts and serve as the scoring reference. The task therefore draws on medical notes that describe the care of individual patients, with reference labels that specify how drugs connect to other concepts in those notes. [MIMIC-III](https://md.research.elamur.ai/free/en/papers/johnson-2016-mimic-iii-freely-accessible-critical/)

The authors identify 8 relation categories in the n2c2 collection. Medication administration contributes several of them. Frequency–drug records how frequently the drug is given, with 6288 annotated instances. Route–drug captures how it is given, with 11,038 instances. Form–drug concerns the form in which it appears, with 6636 instances. Duration–drug answers how long a treatment lasts, with 643 instances. These pairs all show ways to describe the use of a medication, but call for attention to different expressions in the note.

Strength–drug and dosage–drug are reported separately. There are 13,338 strength–drug instances and 4207 dosage–drug instances. The authors also report 5160 reason–drug instances and 2214 adverse-drug-event–drug instances. Those last categories connect a medicine to why it was used or to an effect associated with it. The counts are collection statistics for the individual relation categories. They show that some relations occur much more often than others, which is relevant when considering what a single score across categories conveys.

The second collection is the Adverse Drug Events corpus, referred to as ADE in the results. It contains MEDLINE case reports annotated by 5 people. The authors used the second version of the corpus, obtained from Hugging Face. The experiment uses 2 relation categories from this collection. There are 6821 drug–adverse-event instances and 279 drug–dosage instances. Here the disparity between categories is substantial, and the material is written as case reports rather than discharge summaries.

The collections test the approach in different settings. A discharge summary can contain multiple instructions and details about medication administration. The ADE corpus emphasizes events associated with medicines in published accounts, with dosage as the other target relation used in this study. As a consequence, a change in aggregate performance from one corpus to the other can reflect differences in the kinds of documents, the relation inventory, or the balance of examples. The most direct evidence for augmentation comes from comparing the different conditions on the same collection.

#### What the metrics tell us

The evaluation uses the annotated pairs as a reference and reports precision, recall, and micro-F1. Precision asks how many extracted pairs agree with the reference, out of the pairs that the system produces. Recall asks how many reference pairs the system recovers, out of the pairs it is expected to find. A system that extracts a few evident pairs can achieve high precision while leaving many reference pairs missing. A system that produces a broader list can increase recall while losing precision if it proposes unsupported links.

F1 combines precision and recall. It is useful here because the proposed augmentation could change both sides of the extraction problem. Drawing attention to more candidate drugs might raise recall by helping recover omitted pairs. It could also produce extra errors if the system accepts drug candidates too easily or attaches an attribute to the wrong medicine. Reading precision and recall alongside F1 helps distinguish those outcomes.

The aggregate table labels its scores micro-averaged across relation categories. In the usual interpretation of a micro-average, correct predictions, extra predictions, and missed reference pairs contribute through pooled counts. The individual category tables are useful because an aggregate can conceal differences in how the system handles a rare kind of pair and how it handles a common one. The paper also calls some rows averages, and some appendix figures are difficult to reconcile with the aggregate table. The comparisons below use the paper’s main table for the corpus-level scores and identify appendix values as per-relation evidence where their correspondence is clear.

For each generator, the plain condition is the comparison without UMLS augmentation. The RAG condition augments the prompt with retrieved terminology chunks, and the authors’ direct approach augments it with concepts mapped from the current document and filtered to the medication categories. Comparing these conditions within a generator avoids attributing a change due to using a different GPT version to the augmentation. Comparing them across both generators shows whether the same ordering occurs under each of the tested versions.

#### Results on the n2c2 discharge summaries

On the n2c2 collection, the best reported aggregate micro-F1 is 0.80 for GPT-4-32k with mapped UMLS concepts. Ordinary prompting and the retrieval condition each have micro-F1 of 0.76 for the same generator. The direct approach therefore leads under this measure. Retrieval changes the balance of precision and recall relative to ordinary prompting, but the main table reports the same displayed F1 for the conditions.

Prompting methods on n2c2 discharge summaries by micro-F1 Direct UMLS concept guidance gives the highest reported score for each generator.

**The numbers**

| System or setting | micro-F1 |
| --- | --- |
| GPT-3.5-turbo without augmentation | 0.73 |
| GPT-3.5-turbo with RAG | 0.74 |
| GPT-3.5-turbo with mapped UMLS concepts | 0.77 |
| GPT-4-32k without augmentation | 0.76 |
| GPT-4-32k with RAG | 0.76 |
| GPT-4-32k with mapped UMLS concepts (this paper) | 0.80 |

With GPT-4-32k on n2c2, direct concept guidance raises reported precision from 0.75 to 0.79 and recall from 0.76 to 0.80. The metrics thus point to gains both in the proportion of outputs that agree with the annotation and in the coverage of the reference. RAG has a reported precision of 0.77 and recall of 0.76. It offers a smaller precision gain under this generator and leaves the displayed recall at the baseline value.

The GPT-3.5-turbo results show a similar ordering for F1. Ordinary prompting scores 0.73 and RAG scores 0.74. Mapped concepts bring the score to 0.77. The reported precision and recall of the direct approach are both 0.77, compared with precision of 0.73 and recall of 0.74 in the plain condition. The retrieval condition has reported precision of 0.73 and recall of 0.74. Those displayed component scores match the plain condition at the precision shown in the table, while the reported F1 values differ. The displayed figures therefore give the overall pattern more clearly than they explain the smallest difference between settings.

Direct concept guidance with GPT-3.5-turbo also reaches a higher reported n2c2 micro-F1 than ordinary prompting with GPT-4-32k. This is a specific comparison within the discharge-summary experiment. It illustrates that changing the information in the prompt can matter enough to shift the ordering between generator and augmentation combinations. The ADE results give a different ordering for those particular combinations, showing why the scope of the n2c2 observation matters.

#### Results on the adverse-event case reports

The largest aggregate F1 in the study is reported for GPT-4-32k with mapped concepts on the ADE collection. It reaches 0.94, compared with 0.82 for the ordinary prompt and 0.85 for RAG. The retrieval approach improves the aggregate F1 over ordinary prompting here. Direct concept guidance yields the highest reported score.

Prompting methods on ADE case reports by micro-F1 Mapped UMLS concepts give the best reported result for each generator on the case reports.

**The numbers**

| System or setting | micro-F1 |
| --- | --- |
| GPT-3.5-turbo without augmentation | 0.596 |
| GPT-3.5-turbo with RAG | 0.64 |
| GPT-3.5-turbo with mapped UMLS concepts | 0.75 |
| GPT-4-32k without augmentation | 0.82 |
| GPT-4-32k with RAG | 0.85 |
| GPT-4-32k with mapped UMLS concepts (this paper) | 0.94 |

For GPT-4-32k, the reported aggregate precision is 1.0 in each ADE condition. The recall scores show where the improvement lies. Ordinary prompting reaches 0.70 recall, retrieval reaches 0.74, and the direct approach reaches 0.89. The experiment gives the clearest view of the proposed benefit in this condition. With mapped concepts, the generator extracts a larger share of the annotated pairs while retaining the same displayed precision. The size of this effect concerns the corpus and its scoring setup.

GPT-3.5-turbo has a lower baseline on the case reports and improves with either form of augmentation. Ordinary prompting gives precision of 0.625, recall of 0.57, and micro-F1 of 0.596. With retrieval, precision is 0.65, recall is 0.63, and micro-F1 is 0.64. Direct guidance reaches reported aggregate precision of 0.83, recall of 0.70, and micro-F1 of 0.75. The main table thus associates document-specific guidance with both stronger coverage and a higher share of correct outputs for this generator.

The ADE results also retain a distinction between the generators even after both receive mapped concepts. GPT-4-32k with direct guidance reaches micro-F1 of 0.94, and GPT-3.5-turbo with the same form of guidance reaches 0.75. The plain GPT-4-32k setting, at 0.82, already exceeds that guided GPT-3.5-turbo result. The augmentation consistently helps relative to each generator’s plain condition in the reported aggregates, while the system used to interpret the prompt still matters.

The authors describe the GPT-4-32k F1 gains with mapped UMLS as 4% on n2c2 and 12% on ADE. The tabulated scores specify the comparisons more directly. They show which metric and corpus each value belongs to, and they make it possible to see that the ADE result is mainly a change in reported recall for GPT-4-32k. The paper reports corpus-level comparisons and does not label these figures with a separate evaluation split.

#### Why the score needs the task definition

These results are scores for relation extraction under the authors’ prompts and reference annotations. A recovered pair can represent a drug and its dosage, a drug and its route, or another relationship specified by the task. A single summary value measures performance across a collection of such decisions. To interpret it, the reader needs to know both which questions were asked and which relations occur in the data.

For instance, a strong ADE aggregate can coexist with distinct results on dosage and adverse-event extraction because those tasks differ in both their wording and their representation in the collection. Likewise, matching the n2c2 aggregate micro-F1 of another condition leaves room for particular categories to improve or worsen. The appendix breaks down several of those comparisons. The individual scores show why the study’s practical result is stronger when stated as an aggregate advantage for document-specific guidance than when treated as a claim about every relation category.

### What the ablations show

#### Removing the concept list

The comparison closest to an ablation keeps the generator and the basic extraction prompt format and removes the mapped UMLS list. Ordinary prompting is the resulting condition. This tests the contribution of adding the selected concepts as a package. On both corpora and with both GPT versions, the main table reports higher micro-F1 when the list is included. The direction of that result is consistent across the tested comparisons even though the size and the precision–recall balance vary.

What changes with that package includes the names the generator sees as candidates, the fact that those names have been found in the current document, and the compact presentation of the names as guidance. The comparison tests the combined contribution of those properties. It provides no separate estimate for the effect of the category filter or for the effect of using UMLS terminology in place of another way of finding and displaying drug mentions.

The per-relation results offer examples of where the aggregate benefit appears. For GPT-4-32k on n2c2, the appendix places dosage–drug F1 at 0.77 with ordinary prompting and 0.82 with mapped concepts. Duration–drug F1 goes from 0.77 to 0.83. ADE–drug F1 on those discharge summaries goes from 0.71 to 0.77. These are different kinds of relations. The suggested drug vocabulary accompanies the extraction of administration details as well as the extraction of events associated with medications.

The n2c2 frequency results also show why it is useful to distinguish category-level findings from the overall ordering. The appendix reports frequency–drug F1 of 0.78 for ordinary GPT-4-32k prompting and 0.79 for the mapped approach. The GPT-4-32k RAG condition reaches 0.80 on that category. Retrieval can therefore be effective for individual relations in the same experiment where the mapping approach gives the highest aggregate score. The comparison is conditional on the type of relation being extracted.

Ranks can also differ across categories within the ADE corpus. For GPT-4-32k, the appendix’s ADE–drug row gives F1 of 0.84 with ordinary prompting and 0.97 after direct augmentation. The dosage–drug row gives 0.795 and 0.91 for the same conditions. The per-relation scores support the direction of the aggregate improvement. The precision entries for the guided setting are 1.00 on each of these rows. Recall rises from 0.73 to 0.93 for ADE–drug and from 0.66 to 0.85 for dosage–drug, so both rows illustrate recovery of additional annotated pairs under the reported evaluation.

#### Switching from mapped concepts to retrieved chunks

The RAG condition changes how the extra information is selected and inserted. It uses UMLS in a searchable form and supplies material that ranks highly against the prompt. This is a meaningful comparison because ordinary prompting already establishes the performance without UMLS. RAG tests whether providing relevant terminology by a more general retrieval method yields a similar improvement. In aggregate, the retrieval results lie below the direct approach in each corpus and generator comparison.

The per-relation results give a more detailed view of that outcome. For GPT-4-32k on ADE, the retrieval appendix reports 0.84 F1 for ADE–drug and 0.86 for dosage–drug. For the adverse-event relation, the F1 shown for RAG is the same as in the plain condition, while the retrieved context is associated with a better dosage score than ordinary prompting. On the n2c2 frequency task, retrieval also yields the highest F1 among the reported GPT-4-32k settings. These differences help explain the authors’ description of variable RAG performance across relations.

The authors’ proposed explanation is that relevant entries can fall outside the material retrieved for generation. An embedding represents a full chunk, and selecting chunks of high similarity can favor broadly related material. If an individual drug name is inside a chunk that shows little overall similarity to the prompt, the needed entry may be absent from the result. This possibility follows from the retrieval procedure, but the paper leaves it as a hypothesis. It gives no measurement of the availability of each needed UMLS concept in the retrieved context for the instances where extraction fails.

Other differences are also inseparable in this comparison. Mapping starts at the expression, applies medication-category filtering, and yields a focused list. RAG starts from a representation of the prompt and appends data in larger units. A result in favor of the mapped approach is evidence for that combination of choices against the authors’ RAG setup. It gives limited leverage for identifying which of those choices is responsible for the gap.

#### Looking at what appeared in the output

The qualitative strength extraction example provides a view of the changes that a score cannot identify. Several drug–strength pairs appear both with and without UMLS, including the pair for prednisone. The guided output additionally includes strength pairs for Plavix and Cipro, and it produces an extra pair involving ASA. The form of the last result matters. Aspirin already appears with a different strength in the example, so recognizing ASA helps produce an additional relation involving that surface form rather than simply adding a wholly unfamiliar medication to the output.

This example fits the idea that a terminology list can draw attention to a brand name or an abbreviation that the ordinary prompt skipped. It also illustrates how a missed entity mention can become a missed relation. Once a drug name is under consideration, the surrounding text can support a strength pair that would otherwise never be proposed. The output comparison shows that this happened in the example. It cannot establish why the plain condition skipped each expression or determine how often such omissions account for the aggregate gain.

Taken together, the paired runs, relation breakdowns, and example show complementary parts of the result. The aggregate measurements establish that the direct approach improves the scores in the tested settings. The category results show where extraction improves and where retrieval can be competitive. The output example makes the proposed link between recognizing medication vocabulary and recovering a pair concrete. A separate experiment that measures mention recognition before relation assignment would be needed to quantify how much each stage contributes.

### Limitations

#### Limits identified by the authors

The authors explicitly limit their study to medication concepts. The UMLS filter was chosen to help recognize drugs, and the evaluated relations all have a medication as one of their participants. Other clinical extraction tasks could call for different portions of the terminology resource and different treatment of the candidate concepts. The authors describe changing the prompt and the choice of UMLS entities as possible extensions. They also suggest investigating the relationships recorded in UMLS to support extraction beyond the medication categories used here.

Their second stated limit concerns the comparison between generators. The evaluation uses GPT-4-32k and GPT-3.5-turbo. The authors identify BioGPT and LAMA as systems they would like to include in a broader comparison. Improvements across both tested GPT versions support the use of mapped concepts in those settings. A broader experiment would be needed to determine whether systems with different prior exposure to biomedical terminology benefit in the same way or whether any benefit takes a different form.

The paper also explicitly treats its account of RAG’s weaker aggregate performance as provisional. The authors point to the possibility that the chosen chunks exclude concepts needed for the task and call for further experiments to test that idea. An overall F1 difference cannot establish which concepts were available in a specific prompt. A failure might arise after retrieval because the generator overlooked a relevant entry or linked it to the wrong phrase. The paper’s explanation is consistent with how the index operates, but its experiment does not trace those cases.

#### Limits visible in the evaluation

The evaluation changes one package of guidance at a time. It does not isolate the effect of each part of that package. For example, the authors do not report a condition using the complete list of MetaMap concepts before category filtering. The observed gain could depend heavily on the filter’s ability to keep the prompt focused, on the mapper’s ability to detect abbreviated names, or on a combination of both. The experiment establishes a benefit from the actual list used, leaving those contributions unresolved.

The same issue applies to the retrieval comparison. Chunk size, retrieval depth, the similarity-based query, the contents of the terminology file, and the eventual size and structure of the reference material all affect what reaches GPT. The authors describe a particular RAG setup using 8192-token chunks and the top 30 results. The results support a comparison against that setup. They provide no basis for ranking direct concept mapping against every possible retrieval design, including one that retrieves individual terminology entries or queries separately for expressions in the document.

The paper presents scores as comparisons on the annotated collections. It gives no uncertainty intervals for the main table and does not describe repeated generations from which a reader could assess variation across runs. It also does not clearly document separate evaluation split labels for the headline results or how demonstrations and prompt selection were separated from evaluation examples. This makes the corpus-level figures useful as reported comparisons but limits the study’s evidence about how stable the smaller score differences would be across prompt choices, runs, or held-out subsets.

Parts of the appendix also leave ambiguity about the relationship between its results and the main table. For example, the guided GPT-4-32k n2c2 condition has an appendix average F1 of 0.79, while the main table reports 0.80. The visible relation rows there omit the strength category listed in the corpus statistics. For GPT-3.5-turbo with UMLS on ADE, the appendix shows aggregate precision of 0.83 alongside relation-level precision values of 0.60 and 0.70. Under ordinary pooling over those rows, their aggregate precision would fall within the range of the component values. The paper does not explain the discrepancy. The main-table rankings are the reported headline results, while these ambiguities limit reconstruction of how every displayed aggregate was obtained.

There is a separate limit to the claim that UMLS supplies knowledge absent from GPT’s training. The paper observes that certain pairs appear after augmentation and offers the reasonable interpretation that the terminology hints helped the system notice the names. The experiment does not inspect what the generator previously learned or probe whether it could recognize those expressions under other instructions. It establishes an effect on extraction under the tested prompts. The output itself leaves open whether the useful information was previously unavailable to GPT or simply went unused in that context.

Document-level evaluation also leaves the difficulty of individual connections unclear. The input consists of clinical texts rather than isolated entity pairs, but the results do not group cases by how far apart the entities occur, whether essential evidence lies across sentences, or how many competing medication mentions the document contains. A higher overall score can consequently reflect better extraction of local relations, better use of distant context, or both. Understanding which kind of document-level reasoning improves would require a breakdown organized around the evidence needed to make the link.

Finally, the paper evaluates agreement with annotated relations in discharge summaries and case reports. The results concern extraction from these texts and the specific labels used to score the outputs. A reported precision of 1.0 on the ADE corpus describes the study’s evaluation with GPT-4-32k. It gives no estimate of the reliability of clinical decisions based on the output or the consequences of an extraction error in a patient-facing workflow. The study addresses the narrower question of whether mapped terminology helps recover the medication relationships encoded by these benchmarks.

### What came after

[Dissecting GraphRAG](https://md.research.elamur.ai/free/en/papers/nishida-2026-dissecting-graphrag-modular-analysis-knowledge/) cites the study and examines how knowledge structuring contributes to factoid [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/). Its title frames that investigation as an analysis of the modules of GraphRAG. The task shifts from extracting medication relationships from a clinical document to using structured knowledge to answer questions seeking specific facts.

The connection lies in how the system prepares external information for the generator. Bhattarai and colleagues compare retrieving pieces of a terminology source with mapping expressions in the current input to concepts and supplying a focused list. The later work addresses knowledge structuring within a question-answering pipeline. The citation documents a connection between the papers, while the account of the later work identifies neither a reuse of MetaMap or the UMLS filter nor a replication of the clinical experiments.

## Cite

Cite as Kriti Bhattarai, Inez Y. Oh, Zachary B. Abrams and Albert M. Lai. 2024. Document-level Clinical Entity and Relation extraction via Knowledge Base-Guided Generation. Proceedings of the 23rd Workshop on Biomedical Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2024.bionlp-1.24](https://doi.org/10.18653/v1/2024.bionlp-1.24)

```bibtex
@inproceedings{bhattarai2024document,
  title = {{Document-level Clinical Entity and Relation extraction via Knowledge Base-Guided Generation}},
  author = {Kriti Bhattarai, Inez Y. Oh, Zachary B. Abrams and Albert M. Lai},
  booktitle = {Proceedings of the 23rd Workshop on Biomedical Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.bionlp-1.24},
  url = {https://doi.org/10.18653/v1/2024.bionlp-1.24}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
