<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Big Data</journal-id>
<journal-title>Frontiers in Big Data</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Big Data</abbrev-journal-title>
<issn pub-type="epub">2624-909X</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fdata.2024.1463543</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Big Data</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Ontology extension by online clustering with large language model agents</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Wu</surname> <given-names>Guanchen</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/2721738/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/validation/"/>
<role content-type="https://credit.niso.org/contributor-roles/visualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Ling</surname> <given-names>Chen</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/investigation/"/>
<role content-type="https://credit.niso.org/contributor-roles/methodology/"/>
<role content-type="https://credit.niso.org/contributor-roles/supervision/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Graetz</surname> <given-names>Ilana</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/formal-analysis/"/>
<role content-type="https://credit.niso.org/contributor-roles/supervision/"/>
<role content-type="https://credit.niso.org/contributor-roles/validation/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Zhao</surname> <given-names>Liang</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/2763994/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/funding-acquisition/"/>
<role content-type="https://credit.niso.org/contributor-roles/project-administration/"/>
<role content-type="https://credit.niso.org/contributor-roles/resources/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Department of Computer Science, Emory University</institution>, <addr-line>Atlanta, GA</addr-line>, <country>United States</country></aff>
<aff id="aff2"><sup>2</sup><institution>Rollins School of Public Health, Emory University</institution>, <addr-line>Atlanta, GA</addr-line>, <country>United States</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Chang-Tien Lu, Virginia Tech, United States</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Yi He, College of William &#x00026; Mary, United States</p>
<p>You-Lu Xing, Anhui University, China</p></fn>
<corresp id="c001">&#x0002A;Correspondence: Liang Zhao <email>liang.zhao&#x00040;emory.edu</email></corresp>
</author-notes>
<pub-date pub-type="epub">
<day>07</day>
<month>10</month>
<year>2024</year>
</pub-date>
<pub-date pub-type="collection">
<year>2024</year>
</pub-date>
<volume>7</volume>
<elocation-id>1463543</elocation-id>
<history>
<date date-type="received">
<day>12</day>
<month>07</month>
<year>2024</year>
</date>
<date date-type="accepted">
<day>20</day>
<month>09</month>
<year>2024</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2024 Wu, Ling, Graetz and Zhao.</copyright-statement>
<copyright-year>2024</copyright-year>
<copyright-holder>Wu, Ling, Graetz and Zhao</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract>
<p>An ontology is a structured framework that categorizes entities, concepts, and relationships within a domain to facilitate shared understanding, and it is important in computational linguistics and knowledge representation. In this paper, we propose a novel framework to automatically extend an existing ontology from streaming data in a zero-shot manner. Specifically, the zero-shot ontology extension framework uses online and hierarchical clustering to integrate new knowledge into existing ontologies without substantial annotated data or domain-specific expertise. Focusing on the medical field, this approach leverages Large Language Models (LLMs) for two key tasks: Symptom Typing and Symptom Taxonomy among breast and bladder cancer survivors. Symptom Typing involves identifying and classifying medical symptoms from unstructured online patient forum data, while Symptom Taxonomy organizes and integrates these symptoms into an existing ontology. The combined use of online and hierarchical clustering enables real-time and structured categorization and integration of symptoms. The dual-phase model employs multiple LLMs to ensure accurate classification and seamless integration of new symptoms with minimal human oversight. The paper details the framework&#x00027;s development, experiments, quantitative analyses, and data visualizations, demonstrating its effectiveness in enhancing medical ontologies and advancing knowledge-based systems in healthcare.</p></abstract>
<kwd-group>
<kwd>ontology extension</kwd>
<kwd>online hierarchical clustering</kwd>
<kwd>large language model</kwd>
<kwd>medical ontology</kwd>
<kwd>zero-shot classification</kwd>
</kwd-group>
<counts>
<fig-count count="4"/>
<table-count count="4"/>
<equation-count count="0"/>
<ref-count count="10"/>
<page-count count="11"/>
<word-count count="6240"/>
</counts>
<custom-meta-wrap>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Data Mining and Management</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>1 Introduction</title>
<p>In computational linguistics and knowledge representation, an ontology is a structured framework that organizes information by categorizing entities, concepts, and relationships within a specific domain to facilitate shared understanding. Ontology extension aims to enhance these structures by integrating new concepts, entities, and relationships, thereby improving their completeness, accuracy, and utility. Ontology extension enriches knowledge bases, enabling more nuanced data analysis, and is crucial in fields like biomedical research, where it integrates emerging discoveries into existing medical ontologies, enhancing disease diagnosis and treatment personalization. In artificial intelligence, ontology extension contributes to developing sophisticated natural language processing systems that understand and process human language with greater nuance and precision.</p>
<p>The evolving nature of knowledge domains presents challenges for ontology extension, including maintaining consistency, preserving knowledge integrity, and merging diverse information sources without ground truth data. This motivates the design of a zero-shot ontology extension approach. Existing methods (Memariani et al., <xref ref-type="bibr" rid="B7">2021</xref>; Santosa et al., <xref ref-type="bibr" rid="B9">2021</xref>; Behr et al., <xref ref-type="bibr" rid="B2">2023</xref>) often rely on substantial annotated datasets or specific domain expertise, which are resource-intensive and may not transfer effectively to zero-shot scenarios. There is a need for a more flexible, data-independent model capable of accommodating new, unlabeled instances in a dynamic knowledge landscape without extensive retraining or expert intervention.</p>
<p>Zero-shot ontology extension faces two main challenges: (1) <italic>Symptom Typingidentifying and classifying medical symptoms from unstructured online patient forum</italic> data: This challenge entails the identification and classification of medical symptoms from unstructured online patient forum data. The complexity arises due to the nature of streaming and noisy data, which complicates the accurate detection and categorization of symptoms. (2) <italic>Symptom Taxonomyhierarchically organizing and integrating symptoms into a pre-existing ontology</italic>: This challenge involves the hierarchical organization and integration of symptoms into an existing ontology. The difficulty is multifaceted: First, it necessitates determining the appropriate upper branch within the hierarchical structure for the new symptom. Subsequently, it requires identifying whether there are semantically duplicated symptoms already present within the ontology. Finally, if the symptom does not align with any existing categories, it must be decided which category it should belong to, and this new relation must be added to the hierarchy. Thus, the challenges in zero-shot ontology extension are rooted in both the inherent characteristics of the data and the need for structured integration into a pre-existing ontological framework.</p>
<p>In this work, we propose a novel framework to address these challenges by employing LLM-powered agents and an online clustering system for efficient and effective Symptom Typing and Symptom Taxonomy. Specifically, given posts continuously from online health forums, we incorporate multiple LLM agents to identify and integrate new symptoms into existing ontology while considering the ontological hierarchy. The zero-shot framework can ensure accurate classification with minimal human oversight and without extensive labeled datasets.</p>
<p>This paper begins with an overview of related works, followed by the introduction of our proposed framework leveraging LLMs to address the challenges. We then present a series of experiments, including quantitative analysis and data visualization, to validate and demonstrate the efficacy of our framework. For our analysis, we used data from online patient forum discussion boards focused on breast and bladder cancer survivors.</p>
</sec>
<sec id="s2">
<title>2 Related work</title>
<p>Recent advancements in ontology extension methodologies have showcased diverse approaches to enriching and refining ontological structures. Deep learning techniques have been employed to automatically classify chemical structures within ontologies, significantly improving accuracy and providing insights into decision-making through attention-weight visualization (Memariani et al., <xref ref-type="bibr" rid="B7">2021</xref>). Similarly, classification techniques have been used to automate the extension of computer science ontologies (Santosa et al., <xref ref-type="bibr" rid="B9">2021</xref>). In the pharmacotherapeutic domain, semantic tagging and knowledge discovery methods from text corpora have been developed to automate ontology updates (Cruanes, <xref ref-type="bibr" rid="B4">2011</xref>). For catalytic sciences, NLP-based concept extraction identifies and incorporates new categories related to catalytic reactions (Behr et al., <xref ref-type="bibr" rid="B2">2023</xref>). Tools like Phrase2Onto leverage phrase-based topic modeling to facilitate ontology extension, proving effective in real-world applications and user studies (Pour et al., <xref ref-type="bibr" rid="B8">2023</xref>).</p>
<p>Despite these advancements, these methodologies face limitations, including heavy reliance on domain-specific knowledge, extensive manual effort, and difficulties in adapting to the dynamic nature of knowledge. Additionally, integrating and validating new knowledge within existing structures and accurately capturing nuanced relationships without significant human oversight pose further challenges. These limitations highlight the need for more adaptive and sophisticated approaches in ontology extension that address both static and evolving aspects of knowledge domains.</p>
<p>In response, our research introduces an innovative multi-agent framework empowered by LLMs (Bai et al., <xref ref-type="bibr" rid="B1">2024</xref>; Ling et al., <xref ref-type="bibr" rid="B6">2023</xref>) that leverages zero/few-shot learning paradigms to bypass the extensive pre-training phase typical of conventional approaches. This framework enhances adaptability and extends applicability across a wider array of tasks, offering a versatile solution to ontology extension challenges. We rigorously scrutinize our proposed framework using a dataset derived from health-related forum posts.</p>
</sec>
<sec id="s3">
<title>3 Method</title>
<sec>
<title>3.1 Problem formulation</title>
<p>In this paper, we addressed the problem of zero-shot ontology extension in the biomedical research domain, where new medical symptoms and their relations to one another constantly emerge. An ontology is a hierarchical structure with depth <italic>k</italic>, representing entities and their relationships within a domain to facilitate shared understanding. Our goal is to integrate novel symptoms into existing medical ontologies without requiring annotated data or substantial manual oversight. The problem is defined as follows:</p>
<p>Input:</p>
<list list-type="bullet">
<list-item><p>An existing ontology <italic>O</italic> with a hierarchical structure of depth <italic>k</italic>.</p></list-item>
<list-item><p>Online streaming data <italic>D</italic>, containing domain specific texts.</p></list-item>
</list>
<p>Output:</p>
<list list-type="bullet">
<list-item><p>An extended ontology &#x000D5;, with new entities from <italic>D</italic> integrated into the existing hierarchical structure while maintaining ontological consistency.</p></list-item>
</list>
</sec>
<sec>
<title>3.2 Framework introduction</title>
<p>In this section, we introduced the detailed architecture of our proposed framework, as illustrated in <xref ref-type="fig" rid="F1">Figure 1</xref>. Our study uses an existing hierarchical ontology and an online stream of unstructured textual data to generate an augmented hierarchical ontology. The initial step involves the precise identification and comprehensive summarization of entities within the streaming data. Entities refer to individual pieces of relevant information extracted from the text. Upon extraction, each entity is assigned to an appropriate cluster, which is a group of entities that share similar characteristics or are related in some meaningful way. For entities that align with pre-existing clusters, we check for semantic congruence to prevent duplication. For entities that do not fit into existing clusters, the framework dynamically creates new clusters to accommodate them.</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>Overview of our proposed framework.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fdata-07-1463543-g0001.tif"/>
</fig>
<sec>
<title>3.2.1 Challenges</title>
<p>While the problem may seem straightforward, existing methodologies fall short due to the following challenges: (1) handling continuously incoming data and (2) integrating multiple decision-making processes. Existing methods require meticulous fine-tuning and extensive model training, making them unsuitable for streaming data without prior dataset knowledge. The complexity of multi-dimensional ontology structures necessitates advanced decision-making capabilities beyond current methods. Additionally, the problem requires direct identification and summarization of entities from streaming data, with text summarization tasks needing a dedicated summarization model and identification tasks requiring a named entity recognition model. Existing methods struggle to integrate these tasks into a cohesive and effective process, highlighting the need for a more sophisticated intelligence system to manage these complex processes effectively.</p>
</sec>
</sec>
<sec>
<title>3.3 Online hierarchical clustering</title>
<p>Dealing with the complexities of streaming data requires us to process each piece of data as soon as it arrives. In this context, we conceptualize the ontology as an assemblage of clusters. Each cluster is represented by a centroid that typifies a general category of entities, with each constituent point representing a sub-type of these entities. In this work, we specifically target patient health forum post data, using medical symptom groups as clusters and medical symptoms as entities. In the following context, we will be using clusters to represent symptom groups and entities to represent medical symptoms. For example, as shown in <xref ref-type="fig" rid="F2">Figure 2</xref>, the term &#x0201C;<italic>Vasomotor Symptoms</italic>&#x0201D; encompasses a group of interrelated symptoms, referred to as a cluster. Within this cluster, symptoms such as &#x0201C;<italic>Hot Flashes</italic>,&#x0201D; &#x0201C;<italic>Sweating</italic>,&#x0201D; and &#x0201C;<italic>Trouble Sleeping</italic>&#x0201D; are designated as entities. This approach enhances our ability to categorize and analyze data effectively.</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p>The figure presents a partial structure of an ontology, delineating the interrelations among various symptoms. For each symptom extracted, we categorize it into the appropriate pre-existing symptom groups (<italic>S</italic><sub><italic>Gn</italic></sub>). In instances where the extracted symptom does not exhibit a <italic>R</italic><sub>2</sub> relationship with any <italic>S</italic><sub><italic>Gn</italic></sub>, we earmark it for subsequent scrutiny.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fdata-07-1463543-g0002.tif"/>
</fig>
<p>Consequently, our task can be transformed into identifying the appropriate cluster for each incoming data. If each of the identified symptoms does not correspond to any pre-existing clusters, a new cluster will be created to encompass the identified entity. However, the assignment of an entity to a cluster is not a straightforward task. Upon determining the relevant cluster for the incoming data, it is essential to conduct a thorough analysis of semantic similarity within the cluster in order to avoid redundancy. To facilitate this, we propose a novel verification model, the specifics of which are discussed in Section 3.3.</p>
<p>Specifically, the input data for our algorithm includes an ontology <italic>O</italic> with a hierarchical depth of <italic>k</italic>, organized as hierarchical clusters, along with online streaming data <italic>T</italic><sub><italic>H</italic></sub>. Additionally, the algorithm employs a set of sophisticated functions, <italic>f</italic><sub>1</sub> to <italic>f</italic><sub>6</sub>, designed to process the streaming data effectively. The algorithm operates on the streaming data <italic>T</italic><sub><italic>H</italic></sub>, examining each new sentence for relevant entities using function <italic>f</italic><sub>1</sub>. When entities are detected (function <italic>f</italic><sub>2</sub>), they are classified into existing clusters (function <italic>f</italic><sub>3</sub>), which can handle the classification hierarchically based on the structure of the ontology <italic>O</italic>. For each identified entity <italic>S</italic><sub><italic>Sn</italic></sub>, the algorithm determines whether it belongs to an existing cluster <italic>S</italic><sub><italic>Gn</italic></sub> or necessitates the creation of a new cluster <inline-formula><mml:math id="M2"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>G</mml:mi><mml:msup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x02032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> (functions <italic>f</italic><sub>4</sub> and <italic>f</italic><sub>5</sub>). Function <italic>f</italic><sub>4</sub> performs duplication checks and can also manage these checks hierarchically to ensure that entities are not redundantly assigned within the layered structure of <italic>O</italic>. Function <italic>f</italic><sub>5</sub> addresses the essential task of integrating symptoms that do not align with existing categories. It is responsible for creating new symptom clusters <inline-formula><mml:math id="M3"><mml:mrow><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>G</mml:mi><mml:msup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x02032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> within the ontology. Utilizing a zero/few-shot learning methodology, this agent evaluates symptoms for potential parallel associations, thereby enabling the establishment of new categories that augment the ontology&#x00027;s breadth. This function can handle hierarchical relationships to ensure new clusters fit seamlessly into the existing layered structure. Finally, function <italic>f</italic><sub>6</sub> verifies the correctness of the entity-cluster assignment. This iterative process continues as long as new streaming data is available, thereby enabling dynamic and hierarchical clustering of entities based on the evolving data stream.</p>
</sec>
<sec>
<title>3.4 Multi-agent framework</title>
<p>In order to build a more sophisticated intelligence system to manage all the complex processes as summarized in <xref ref-type="fig" rid="F5">Algorithm 1</xref>, we propose a novel multi-agent framework (Xi et al., <xref ref-type="bibr" rid="B10">2023</xref>; Chen et al., <xref ref-type="bibr" rid="B3">2024</xref>). In addition, in order to avoid extensive training on specific datasets, we strategically leverage LLMs as our executors to accomplish our task in a zero-shot manner. Specifically, we use LLM agents with specially designed prompts as the intelligent executors for functions <italic>f</italic><sub>1</sub> to <italic>f</italic><sub>6</sub>.</p>
<fig id="F5" position="float">
<label>Algorithm 1</label>
<caption><p>Online hierarchical clustering framework.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fdata-07-1463543-g0005.tif"/>
</fig>
<sec>
<title>3.4.1 <italic>f</italic><sub>1</sub>: Identification agent</title>
<p>Initially, our endeavor involves the comprehensive parsing and analysis of the entirety of a given forum post. Through extensive empirical experimentation, we observed that the large language model exhibits heightened accuracy in identifying the presence of symptoms within individual sentences, as opposed to extracting symptom-containing sentences directly from entire forum posts. Consequently, we undertake a critical preprocessing step where the forum post data is meticulously segmented into individual sentences. The identification model is then tasked with thoroughly analyzing each sentence to determine whether it encompasses any symptoms, with all positive instances being systematically collated into a comprehensive list for further examination.</p>
<boxed-text id="Box1">
<title>Identification Agent Prompt</title>
<p><bold>HumanMessage:</bold> &#x0201C;Does the following sentence contain any symptoms? Sentence:&#x0201D; &#x0002B; sentence</p>
<p><bold>SystemMessage:</bold> &#x0201C;Act as an experienced doctor. Given a sentence, if the sentence contains any symptoms, answer &#x02018;yes&#x00027;, otherwise answer &#x02018;no&#x00027;.&#x0201D;</p>
</boxed-text>
</sec>
<sec>
<title>3.4.2 <italic>f</italic><sub>2</sub>: Extraction agent</title>
<p>The second large language model is then engaged, taking the symptom-containing sentences identified by the first model as its input. Its role is to extract the specific symptoms mentioned within these sentences and catalog them into a separate list for subsequent analysis.</p>
<boxed-text id="Box2">
<title>Extraction Agent Prompt</title>
<p><bold>HumanMessage:</bold> &#x0201C;Which words in the following sentence contain symptoms? Sentence:&#x0201D; &#x0002B; sentence</p>
<p><bold>SystemMessage:</bold> &#x0201C;This is a set of symptom recognition problems. The &#x02018;Sentence&#x00027; is a sentence containing symptoms. The word &#x02018;symptom&#x00027; and treatments, like chemo, are not counted as symptoms. Also notice that human body parts, like knees and back, are not counted as symptoms. The goal is to return a Python list containing all possible symptoms, without any explainations. Here are some examples of what I want&#x02026;&#x0201D;</p>
</boxed-text>
</sec>
<sec>
<title>3.4.3 <italic>f</italic><sub>3</sub>: Classification agent</title>
<p>Following the extraction phase, the Classification Agent engages in the systematic categorization of the symptoms into pre-existing clusters, as dictated by the ontology&#x00027;s established criteria. This process is facilitated through the deployment of a large language model to assess the alignment of each symptom with the pre-existing clusters. The agent handles things hierarchically by first determining the broad category of the symptom and then further refining its classification within subcategories of that broad category. Symptoms that fail to align with any of these clusters are segregated for subsequent analysis, ensuring the structured and accurate integration of symptoms within the ontological framework.</p>
<boxed-text id="Box3">
<title>Classification Agent Prompt</title>
<p><bold>HumanMessage:</bold> &#x0201C;Which existing category should the following string belongs to? String:&#x0201D; &#x0002B; sentence</p>
<p><bold>SystemMessage:</bold> &#x0201C;This is a set of symptom classification problems. The &#x02018;String&#x00027; is a string describing symptoms. Use the following <monospace>symptom_dictionary.json</monospace> to answer the given questions. The structure of <monospace>symptom_dictionary.json</monospace> is: &#x02018;existing category 1&#x00027;: &#x02018;symptom 1&#x00027;, &#x02018;symptom 2&#x00027;, &#x02018;symptom 3&#x00027;, &#x02018;existing category 2&#x00027;: &#x02018;symptom 4&#x00027;, &#x02018;symptom 5&#x00027;, &#x02018;symptom 6&#x00027;. The goal is to classify the string into one existing category. You only need to answer the name of the existing category should the string belongs. No explanation is needed. If the string does not belong to any existing category, simply answer &#x02018;No&#x00027;. Here are some examples of what I want&#x02026;&#x0201D;</p>
</boxed-text>
</sec>
<sec>
<title>3.4.4 <italic>f</italic><sub>4</sub>: Duplication-check agent</title>
<p>The Duplication-Check Agent plays a crucial role in maintaining the integrity of the health symptom ontology by employing a zero/few-shot learning approach to prevent the inclusion of redundant symptoms. This method allows the agent to assess the uniqueness of symptoms without prior specific training on duplication cases. This agent possesses hierarchical capabilities by initially identifying duplicates at a broader categorical level, followed by a more detailed examination within finer subcategories. It relies on the intrinsic capabilities of language models to understand medical terminology and relationships, thus ensuring that only unique symptoms are added to the ontology. This hierarchical approach not only preserves the conciseness of the ontology but also enhances its utility for healthcare professionals by keeping the information distinct and valuable.</p>
<boxed-text id="Box4">
<title>Duplication-Check Agent Prompt</title>
<p><bold>HumanMessage:</bold> &#x0201C;Does this string a repeated occurrence in the <monospace>exist_symptoms</monospace>? String:&#x0201D; &#x0002B; sentence</p>
<p><bold>SystemMessage:</bold> &#x0201C;This is a set of symptom classification problems. The &#x02018;String&#x00027; is a string describing symptoms. Use the following list of <monospace>exist_symptoms</monospace> to answer the given questions. <monospace>exist_symptoms</monospace> is a list that contains several strings describing symptoms. The goal is to determine if the string is a repeated occurrence in the <monospace>exist_symptoms</monospace>. You only need to answer &#x00027;no&#x00027; if the string is not a repeated occurrence in the <monospace>exist_symptoms</monospace> and answer &#x02018;yes&#x00027; otherwise. No explanation is needed. &#x0002B; str(<monospace>exist_symptoms</monospace>) &#x0002B; Here are some examples of what I want&#x02026;&#x0201D;</p>
</boxed-text>
</sec>
<sec>
<title>3.4.5 <italic>f</italic><sub>5</sub>: Relation-generation agent</title>
<p>Addressing the essential task of integrating symptoms that do not align with existing categories, the Relation-Generation Agent is tasked with the creation of new symptom clusters <inline-formula><mml:math id="M4"><mml:msub><mml:mrow><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mi>G</mml:mi><mml:msup><mml:mrow><mml:mi>n</mml:mi></mml:mrow><mml:mrow><mml:mi>&#x02032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msub></mml:math></inline-formula> within the ontology. Utilizing a zero/few-shot learning methodology, this agent evaluates symptoms for potential parallel associations, thereby enabling the establishment of new categories that augment the ontology&#x00027;s breadth. This agent will assess the symptoms identified by the <italic>f</italic><sub>3</sub> agent, specifically focusing on those symptoms that fail to align with any existing clusters. If this agent identifies a symptom as belonging to a category that is not present in the original ontology, it subsequently integrates the new category-symptom relation into the ontology. The establishment of these new groups is instrumental in accommodating emerging medical knowledge and symptomatology within the ontology.</p>
<boxed-text id="Box5">
<title>Relation-Generation Agent Prompt</title>
<p><bold>HumanMessage:</bold> &#x0201C;Which broad category of symptoms does the given symptom belong to? Symptom:&#x0201D; &#x0002B; sentence</p>
<p><bold>SystemMessage:</bold> &#x0201C;This is a set of symptom classification problems. Act as an experienced doctor. The &#x02018;Symptom&#x00027; is a string representing symptoms. Given a symptom, the goal is to classify the symptom into a general type of medical symptom. List the symptoms in the format of &#x02018;XXX symptoms&#x00027;, such as Gastrointestinal symptoms, Gynecologic symptoms, and Musculoskeletal symptoms. No explanation is needed. Here are some examples of what I want&#x02026;&#x0201D;</p>
</boxed-text>
</sec>
<sec>
<title>3.4.6 <italic>f</italic><sub>6</sub>: Relation-verification agent</title>
<p>The final phase of our comprehensive methodology is characterized by the Relation-Verification Agent, which employs an advanced LLM agent to perform a thorough review of the augmented ontology. This agent meticulously scrutinizes the classification and categorization of symptoms, ensuring their precise alignment with the correct <italic>S</italic><sub><italic>Gn</italic></sub>. Through this rigorous verification process, the agent ensures the ontology&#x00027;s accuracy and relevance, thereby guaranteeing that the symptom categories reflect the most up-to-date medical insights and relationships.</p>
<boxed-text id="Box6">
<title>Relation-Verification Agent Prompt</title>
<p><bold>HumanMessage:</bold> &#x0201C;Does the string a symptom of the category? Category:&#x0201D; &#x0002B; category &#x0002B; &#x0201C;String:&#x0201D; &#x0002B; symptom</p>
<p><bold>SystemMessage:</bold> &#x0201C;Act as an experienced doctor. Given a string, if the string belongs to the given category, answer &#x02018;yes&#x00027;, otherwise answer &#x02018;no&#x00027;.&#x0201D;</p>
</boxed-text>
</sec>
</sec>
</sec>
<sec id="s4">
<title>4 Experiments</title>
<p>In this section, we will introduce the evaluation process of our proposed framework. First, we will introduce the dataset we used in the experiments, followed by the experiment process. Then we demonstrate the experimental results with a comprehensive discussion.</p>
<sec>
<title>4.1 Dataset</title>
<sec>
<title>4.1.1 Forum posts</title>
<p>We used two cancer-related datasets from online forums. The first dataset focuses on breast cancer, comprising various medicines and related user posts. The second dataset pertains to bladder cancer, structured as a hash table with keys such as <italic>datePublished, dateModified, author</italic>, and <italic>posts</italic>, the last of which contains the text of user-generated posts. These distinct structures allowed us to effectively evaluate our framework&#x00027;s performance through user discussions on breast and bladder cancer. We segmented the forum posts into individual sentences, resulting in &#x0007E;200,000 sentences for breast cancer and 76,000 for bladder cancer. For our experiments, we randomly selected 5,000 sentences from each dataset.</p>
</sec>
<sec>
<title>4.1.2 Symptom table</title>
<p>We used an ontology to categorize symptoms discussed in the posts. This ontology is based on a study of breast cancer survivors, ensuring relevance and comprehensiveness in symptom categorization (Hu et al., <xref ref-type="bibr" rid="B5">2022</xref>). The ontology includes categories such as Gastrointestinal symptoms (e.g., Change in Weight, Nausea), Gynecologic symptoms (e.g., Vaginal itching, Bleeding), Neuropsychologic symptoms (e.g., Headache, Dizziness), Vasomotor symptoms (e.g., Sweating, Hot flashes), Musculoskeletal symptoms (e.g., Joint pain, Muscle aches), Integumentary symptoms (e.g., Rash, Hair loss), Cardiorespiratory symptoms (e.g., Trouble breathing, Chest pain), Distress symptoms (e.g., Nervousness, Depression), and Despair symptoms (e.g., Feeling worthless, Hopelessness).</p>
</sec>
</sec>
<sec>
<title>4.2 Implementation details</title>
<p>To design an effective and efficient framework, we used the OpenAI <sc>GPT-3.5-Turbo</sc> model for less computationally intensive tasks, such as the identification agent (<italic>f</italic><sub>1</sub>). For more complex tasks, such as the relation-generation agent (<italic>f</italic><sub>5</sub>), we used the OpenAI <sc>GPT-4-0125-preview</sc> model. This selection was made to enhance performance while optimizing API costs. We conducted quantitative analysis by masking around 60% of the symptoms in the original ontology and running the framework on 5,000 data entries from each dataset. The effectiveness of newly extracted symptoms in recovering the masked ones was assessed using a fuzzy score based on the Levenshtein Distance, with a score above 40 indicating successful recovery. <xref ref-type="table" rid="T1">Table 1</xref> presents the experimental outcomes across both datasets, focusing on recall to determine the framework&#x00027;s ability to retrieve masked symptoms from the original ontology.</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Comparative analysis of symptom recovery performance in breast and bladder cancer forums using our proposed framework.</p></caption>
<table frame="box" rules="all">
<thead>
<tr style="background-color:#919498;color:#ffffff">
<th/>
<th valign="top" align="center" colspan="3"><bold>Breast cancer</bold></th>
<th valign="top" align="center" colspan="3"><bold>Bladder cancer</bold></th>
</tr>
</thead>
<tbody>
<tr style="background-color:#919498;color:#ffffff">
<td/>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
</tr>
<tr>
<td valign="top" align="left">Gastrointestinal symptoms</td>
<td valign="top" align="center">35.7</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">52.6</td>
<td valign="top" align="center">16.1</td>
<td valign="top" align="center">83.3</td>
<td valign="top" align="center">27.0</td>
</tr>
<tr>
<td valign="top" align="left">Gynecologic symptoms</td>
<td valign="top" align="center">33.3</td>
<td valign="top" align="center">80.0</td>
<td valign="top" align="center">47.1</td>
<td valign="top" align="center">80.0</td>
<td valign="top" align="center">66.7</td>
<td valign="top" align="center">72.3</td>
</tr>
<tr>
<td valign="top" align="left">Neuropsychologic symptoms</td>
<td valign="top" align="center">38.5</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">55.6</td>
<td valign="top" align="center">27.2</td>
<td valign="top" align="center">60.0</td>
<td valign="top" align="center">37.5</td>
</tr>
<tr>
<td valign="top" align="left">Vasomotor symptoms</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">75.0</td>
<td valign="top" align="center">60.0</td>
<td valign="top" align="center">66.7</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">80</td>
</tr>
<tr>
<td valign="top" align="left">Musculoskeletal symptoms</td>
<td valign="top" align="center">11.3</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">20.3</td>
<td valign="top" align="center">63.6</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">77.8</td>
</tr>
<tr>
<td valign="top" align="left">Integumentary symptoms</td>
<td valign="top" align="center">41.2</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">58.3</td>
<td valign="top" align="center">41.7</td>
<td valign="top" align="center">71.4</td>
<td valign="top" align="center">52.6</td>
</tr>
<tr>
<td valign="top" align="left">Cardiorespiratory symptoms</td>
<td valign="top" align="center">62.5</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">76.9</td>
<td valign="top" align="center">75.0</td>
<td valign="top" align="center">75.0</td>
<td valign="top" align="center">75.0</td>
</tr></tbody>
</table>
<table-wrap-foot>
<p>The table displays Precision (PR), Recall (RE), and F1 Scores in percentage for different symptom categories. Symptom recovery was assessed after masking 60%&#x02013;80% of symptoms in the original ontology, with the framework applied to 5,000 entries from each dataset. Recovery was determined by a fuzzy score greater than 40, based on the Levenshtein Distance, prioritizing recall to evaluate the ability to uncover the original ontology&#x00027;s symptoms.</p>
</table-wrap-foot>
</table-wrap>
<p>Given the unique challenges of our problem, existing methods were not directly applicable for two primary reasons: (1) Existing methods are limited to pre-existing ontologies and clean, structured sentences, whereas our study involves online streaming data. (2) Extensive data cleaning and classification efforts are required in our research environment. To address these challenges, we developed two baseline models to evaluate the efficacy of our proposed framework. In the first baseline model (<italic>separated approach</italic>), we implemented natural language processing techniques to extract entities from streaming data. These entities, alongside the original ontology, were subsequently input into an LLM to generate an extended ontology. This method aims to leverage the LLM&#x00027;s advanced capabilities in ontology expansion while maintaining a clear delineation between entity extraction and ontology generation tasks. The second baseline model (<italic>single-agent approach</italic>) involves providing the LLM with a segment of the streaming data in conjunction with the original ontology to directly produce an extended ontology. This iterative process entails continuously supplying the LLM with new posts and the previously generated extended ontology until a comprehensive extended ontology is achieved. A critical constraint encountered in this approach is the prompt context window limit inherent to the LLM, which precludes the simultaneous input of the entire dataset. To navigate this limitation, we adopted an iterative approach that enables the LLM to incrementally process the data. This iterative methodology ensures that the model effectively synthesizes the streaming data and progressively refines the ontology within the confines of the context window limitations.</p>
<p>Additionally, we conducted an ablation study to analyze the contribution of different components within our framework. Specifically, we removed the Duplication-Check Agent (<italic>f</italic><sub>4</sub>) and the Relation-Verification Agent (<italic>f</italic><sub>6</sub>) and performed experiments on both datasets. This study assessed the impact of these agents on the overall performance and robustness of our framework.</p>
</sec>
<sec>
<title>4.3 Results</title>
<p>The experimental outcomes, as shown in <xref ref-type="table" rid="T1">Table 1</xref>, demonstrate the framework&#x00027;s performance across different symptom categories for breast and bladder cancer. Our primary focus is on the recall metric, as a higher recall score indicates the framework&#x00027;s capability to accurately recover masked symptoms. Lower precision scores in the table do not necessarily reflect diminished accuracy; instead, they may indicate a broader capture of symptoms that are not incorrect or irrelevant to the domain. An inspection of <xref ref-type="table" rid="T1">Table 1</xref> reveals that half of the recall scores reached the maximum value of 100, indicating that the framework&#x00027;s generated augmented ontology accurately reconstructed the masked symptoms. The minimum recall score recorded is 60, showing substantial recovery for the remaining data. These results underscore the framework&#x00027;s efficacy in identifying and restoring symptom data, highlighting its potential utility in enhancing ontological structures.</p>
<p>We compared our proposed framework against two baseline models across both datasets, with the results presented in <xref ref-type="table" rid="T2">Tables 2</xref>, <xref ref-type="table" rid="T3">3</xref>. In these tables, a hyphen indicates that the baseline output did not add any new symptoms to the respective symptom category, while a score of 0.00 indicates that the added symptoms had a fuzzy score of &#x0003C; 40. <xref ref-type="table" rid="T2">Table 2</xref> shows that for the breast cancer dataset, the separated approach exhibited moderate performance with varying precision and recall scores across categories. For instance, Gastrointestinal symptoms had a precision of 50.0% and a recall of 28.6%, indicating some effectiveness in symptom recovery. However, certain categories, such as Gynecologic and Integumentary symptoms, had no additional symptoms generated. The single-agent approach showed improved recall in some categories, like Musculoskeletal symptoms (recall of 100), but struggled in others, reflected by zero precision and recall scores in several categories. <xref ref-type="table" rid="T3">Table 3</xref> illustrates performance on the bladder cancer dataset, where the separated approach had variable results, with Gastrointestinal symptoms achieving a recall of 60.0% but a precision of 23.1%. The single-agent approach generally had low performance, with most categories showing zero or no new symptoms added, highlighting the challenge of generating relevant symptoms for this dataset. These baseline comparisons underscore the superior capability of our proposed framework in effectively recovering and categorizing medical symptoms, surpassing the baselines in most evaluated metrics.</p>
<table-wrap position="float" id="T2">
<label>Table 2</label>
<caption><p>Results of the separated approach and single-agent approach on the breast cancer dataset, where 0.00 indicates that the augmented symptoms do not exhibit any association with the corresponding symptom category, and &#x02212; indicates that the output did not add any new symptoms to the respective symptom category.</p></caption>
<table frame="box" rules="all">
<thead>
<tr style="background-color:#919498;color:#ffffff">
<th/>
<th valign="top" align="center" colspan="3"><bold>Separated approach</bold></th>
<th valign="top" align="center" colspan="3"><bold>Single-agent approach</bold></th>
</tr>
</thead>
<tbody>
<tr style="background-color:#919498;color:#ffffff">
<td/>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
</tr>
<tr>
<td valign="top" align="left">Gastrointestinal symptoms</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">28.6</td>
<td valign="top" align="center">36.3</td>
<td valign="top" align="center">40.0</td>
<td valign="top" align="center">33.4</td>
<td valign="top" align="center">36.4</td>
</tr>
<tr>
<td valign="top" align="left">Gynecologic symptoms</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
</tr>
<tr>
<td valign="top" align="left">Neuropsychologic symptoms</td>
<td valign="top" align="center">16.7</td>
<td valign="top" align="center">25.0</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">28.6</td>
</tr>
<tr>
<td valign="top" align="left">Vasomotor symptoms</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">33.3</td>
<td valign="top" align="center">40.0</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">33.3</td>
<td valign="top" align="center">40.0</td>
</tr>
<tr>
<td valign="top" align="left">Musculoskeletal symptoms</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">80.0</td>
<td valign="top" align="center">32.0</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">66.7</td>
</tr>
<tr>
<td valign="top" align="left">Integumentary symptoms</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
</tr>
<tr>
<td valign="top" align="left">Cardiorespiratory symptoms</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
</tr></tbody>
</table>
</table-wrap>
<table-wrap position="float" id="T3">
<label>Table 3</label>
<caption><p>Results of the separated approach and single-agent approach on bladder cancer dataset, where 0.00 indicates that the augmented symptoms do not exhibit any association with the corresponding symptom category, and &#x02212; indicates that the output did not add any new symptoms to the respective symptom category.</p></caption>
<table frame="box" rules="all">
<thead>
<tr style="background-color:#919498;color:#ffffff">
<th/>
<th valign="top" align="center" colspan="3"><bold>Separated approach</bold></th>
<th valign="top" align="center" colspan="3"><bold>Single-agent approach</bold></th>
</tr>
</thead>
<tbody>
<tr style="background-color:#919498;color:#ffffff">
<td/>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
</tr>
<tr>
<td valign="top" align="left">Gastrointestinal symptoms</td>
<td valign="top" align="center">23.1</td>
<td valign="top" align="center">60.0</td>
<td valign="top" align="center">33.3</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">60.0</td>
<td valign="top" align="center">30.0</td>
</tr>
<tr>
<td valign="top" align="left">Gynecologic symptoms</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
</tr>
<tr>
<td valign="top" align="left">Neuropsychologic symptoms</td>
<td valign="top" align="center">16.7</td>
<td valign="top" align="center">25.0</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
</tr>
<tr>
<td valign="top" align="left">Vasomotor symptoms</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
</tr>
<tr>
<td valign="top" align="left">Musculoskeletal symptoms</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">80.0</td>
<td valign="top" align="center">32.0</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
</tr>
<tr>
<td valign="top" align="left">Integumentary symptoms</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
</tr>
<tr>
<td valign="top" align="left">Cardiorespiratory symptoms</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">&#x02013;</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
<td valign="top" align="center">0.00</td>
</tr></tbody>
</table>
</table-wrap>
<p>Additionally, the results of our ablation study are presented in <xref ref-type="table" rid="T4">Table 4</xref>. While some symptom categories show higher recall scores compared to our proposed framework, there are notable declines in other metrics, particularly low precision scores and a marked decrease in F1 scores. The higher recall scores in certain categories can be attributed to the removal of Agent <italic>f</italic><sub>4</sub> and Agent <italic>f</italic><sub>6</sub>, specifically the duplication-check agent and the relation-verification agent. The absence of these models in the ablation study prevented the framework from eliminating duplicate symptoms, thereby artificially inflating the recall scores relative to our proposed framework.</p>
<table-wrap position="float" id="T4">
<label>Table 4</label>
<caption><p>This table presents the outcomes of an ablation study assessing the performance impact of omitting Agent <italic>f</italic><sub>4</sub> and Agent <italic>f</italic><sub>6</sub> from our proposed framework.</p></caption>
<table frame="box" rules="all">
<thead>
<tr style="background-color:#919498;color:#ffffff">
<th/>
<th valign="top" align="center" colspan="6"><bold>Breast cancer</bold></th>
<th valign="top" align="center" colspan="6"><bold>Bladder cancer</bold></th>
</tr>
</thead>
<tbody>
<tr style="background-color:#919498;color:#ffffff">
<td/>
<td valign="top" align="center" colspan="3"><bold>Without agent</bold> <italic>f</italic><sub>4</sub></td>
<td valign="top" align="center" colspan="3"><bold>Without agent</bold> <italic>f</italic><sub>6</sub></td>
<td valign="top" align="center" colspan="3"><bold>Without agent</bold> <italic>f</italic><sub>4</sub></td>
<td valign="top" align="center" colspan="3"><bold>Without agent</bold> <italic>f</italic><sub>6</sub></td>
</tr>
 <tr style="background-color:#919498;color:#ffffff">
<td/>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
<td valign="top" align="center"><bold>PR</bold></td>
<td valign="top" align="center"><bold>RE</bold></td>
<td valign="top" align="center"><bold>F1</bold></td>
</tr>
<tr>
<td valign="top" align="left">Gastrointestinal symptoms</td>
<td valign="top" align="center">17.2</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">29.4</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">33.3</td>
<td valign="top" align="center">14.6</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">25.5</td>
<td valign="top" align="center">17.1</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">29.3</td>
</tr>
<tr>
<td valign="top" align="left">Gynecologic symptoms</td>
<td valign="top" align="center">21.7</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">35.7</td>
<td valign="top" align="center">44.4</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">61.5</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">75.0</td>
<td valign="top" align="center">60.0</td>
<td valign="top" align="center">66.7</td>
<td valign="top" align="center">80.0</td>
<td valign="top" align="center">72.7</td>
</tr>
<tr>
<td valign="top" align="left">Neuropsychologic symptoms</td>
<td valign="top" align="center">6.06</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">11.4</td>
<td valign="top" align="center">9.30</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">17.0</td>
<td valign="top" align="center">17.4</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">29.6</td>
<td valign="top" align="center">20.0</td>
<td valign="top" align="center">75.0</td>
<td valign="top" align="center">31.6</td>
</tr>
<tr>
<td valign="top" align="left">Vasomotor symptoms</td>
<td valign="top" align="center">9.38</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">17.1</td>
<td valign="top" align="center">28.6</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">44.5</td>
<td valign="top" align="center">42.9</td>
<td valign="top" align="center">75.0</td>
<td valign="top" align="center">54.5</td>
<td valign="top" align="center">33.3</td>
<td valign="top" align="center">66.7</td>
<td valign="top" align="center">44.4</td>
</tr>
<tr>
<td valign="top" align="left">Musculoskeletal symptoms</td>
<td valign="top" align="center">3.31</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">6.41</td>
<td valign="top" align="center">6.06</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">11.43</td>
<td valign="top" align="center">27.3</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">42.9</td>
<td valign="top" align="center">25.0</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">40.0</td>
</tr>
<tr>
<td valign="top" align="left">Integumentary symptoms</td>
<td valign="top" align="center">10.7</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">19.4</td>
<td valign="top" align="center">12.2</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">21.8</td>
<td valign="top" align="center">38.9</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">56.0</td>
<td valign="top" align="center">30.8</td>
<td valign="top" align="center">80.0</td>
<td valign="top" align="center">44.4</td>
</tr>
<tr>
<td valign="top" align="left">Cardiorespiratory symptoms</td>
<td valign="top" align="center">12.9</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">22.9</td>
<td valign="top" align="center">23.5</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">38.1</td>
<td valign="top" align="center">28.6</td>
<td valign="top" align="center">100</td>
<td valign="top" align="center">44.5</td>
<td valign="top" align="center">50.0</td>
<td valign="top" align="center">66.7</td>
<td valign="top" align="center">57.1</td>
</tr></tbody>
</table>
<table-wrap-foot>
<p>Precision (PR), recall (RE), and F1 scores are reported for various symptom categories within datasets pertaining to breast and bladder cancer. The study&#x00027;s objective was to isolate and identify the contribution of specific models to the task of symptom classification and recovery, as measured by the established metrics of precision, recall, and F1.</p>
</table-wrap-foot>
</table-wrap>
<p>In the data visualization segment of our study, we rendered three distinct graphs, each corresponding to one of the pre-existing symptom groups within the ontology. In these visual representations, blue nodes symbolize the symptoms initially contained in the ontology, while red nodes denote the symptoms introduced in the augmented ontology. We depicted the centroids of the clusters formed by the original symptom sets alongside those formed by the augmented symptoms and quantified the distance between these centroids. The minimal inter-centroid distances suggest a substantial semantic correlation between the symptoms incorporated into the augmented ontology and those pre-existing within the original ontology. This proximity implies that the additions to the ontology are semantically coherent, aligning closely with the established symptomatology.</p>
</sec>
<sec>
<title>4.4 Data visualization</title>
<p>In addition to quantitative analysis, our study incorporated data visualization to interpret the experimental results more intuitively. Initially, symptoms extracted from the augmented ontology were encoded using a BERT model to capture the high-dimensional semantic features of each symptom. These encoded features were then subjected to dimensionality reduction using Latent Dirichlet Allocation (LDA) to project the data into a two-dimensional space, facilitating a visual assessment of clustering characteristics. The resulting visualization, depicted in <xref ref-type="fig" rid="F3">Figure 3</xref>, illustrates distinct clustering of symptom types, where each cluster is represented by a unique color corresponding to different symptom categories. The clear segregation of clusters indicates that symptoms within the same category are closely aligned in the reduced dimensional space, demonstrating spatial coherence and distinct separation from other categories. Moreover, <xref ref-type="fig" rid="F4">Figure 4</xref> presents the visualization results of the augmented ontology using LDA, further highlighting the clustering characteristics within each category. Points of the same color are tightly grouped together, indicating high semantic consistency. The distinct clustering observed in <xref ref-type="fig" rid="F4">Figure 4</xref> reinforces the reliability of our approach in maintaining semantic integrity and coherence across the augmented ontology, thereby validating the framework&#x00027;s capability in effectively extending and organizing medical symptom data.</p>
<fig id="F3" position="float">
<label>Figure 3</label>
<caption><p>Visualization of the original ontology. This figure displays the results of a two-dimensional Latent Dirichlet Allocation (LDA) projection of symptom vectors categorized into various medical symptom types. Each point represents a symptom vector, and different colors denote distinct symptom categories, such as gastrointestinal symptoms and gynecologic symptoms. The visualization displays the clustering characteristics within each category, with points of the same color grouped closely together, indicating a high degree of semantic coherence. This effective clustering demonstrates the robustness of our framework in accurately categorizing and organizing complex medical symptoms into clearly defined groups, thereby validating the framework&#x00027;s effectiveness in enhancing the comprehensiveness and utility of medical ontologies.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fdata-07-1463543-g0003.tif"/>
</fig>
<fig id="F4" position="float">
<label>Figure 4</label>
<caption><p>Visualization of the augmented ontology. This figure displays the results of a two-dimensional Latent Dirichlet Allocation (LDA) projection of symptom vectors categorized into various medical symptom types. Each point represents a symptom vector, and different colors denote distinct symptom categories, such as gastrointestinal symptoms and gynecologic symptoms. The visualization displays the clustering characteristics within each category, with points of the same color grouped closely together, indicating a high degree of semantic coherence. This effective clustering demonstrates the robustness of our framework in accurately categorizing and organizing complex medical symptoms into clearly defined groups, thereby validating the framework&#x00027;s effectiveness in enhancing the comprehensiveness and utility of medical ontologies.</p></caption>
<graphic mimetype="image" mime-subtype="tiff" xlink:href="fdata-07-1463543-g0004.tif"/>
</fig>
</sec>
</sec>
<sec sec-type="conclusions" id="s5">
<title>5 Conclusion</title>
<p>In this paper, we explored the problem of zero-shot ontology extension and presented a comprehensive solution that incorporates unlabelled instances into existing ontologies. We leveraged LLMs to identify and integrate new entities and relationships, enhancing the structure and utility of ontological frameworks. Through experiments using patient discussion board data, we identified symptoms related to breast and bladder cancer and their treatments, demonstrating our framework&#x00027;s practical application. Our quantitative analysis and data visualization showed that our proposed framework improves the precision of entity classification and ensures that newly added entities maintain semantic coherence with the existing ontology. Furthermore, this approach has significant implications, including the potential to monitor in real-time the toxicity reported by patients for newly approved treatments, thereby improving patient safety and treatment efficacy.</p>
<p>However, it is important to note a limitation in our study. The original ontology we used in this paper is grounded in a comprehensive analysis of symptoms experienced by breast cancer survivors. This foundation ensures both relevance and thoroughness in symptom categorization. Consequently, it is important to acknowledge that many adverse symptoms pertinent to bladder cancer survivors, particularly those related to urinary issues, may not be adequately represented, as these issues are less common among breast cancer survivors. Being transparent about these limitations is crucial for the continued development and reliability of our ontology extension methodologies.</p>
<p>For future work, we aim to expand the framework&#x00027;s capabilities by incorporating multimodal data processing, allowing it to extend ontologies using diverse data types beyond text. For example, we plan to integrate medical imaging data and electronic health records (EHRs) to enhance the identification and classification of symptoms and treatments. Medical imaging data could be sourced from publicly available databases such as the Cancer Imaging Archive, while EHRs could be obtained from healthcare institutions with appropriate ethical approvals and data-sharing agreements.</p>
<p>Beyond the medical field, the framework also has potential applications in other domains, such as social networks. For instance, the framework could be used to automatically extend a social network ontology by analyzing new user data. Input data might include a user&#x00027;s profile features, activity patterns, and interactions, while the original social network ontology could contain categories like tags or groups based on interests, behavior, and preferences. The framework would then classify the new user into the most relevant category within the ontology. By leveraging zero-shot learning, the framework could identify and categorize emerging user behaviors or interests without requiring domain-specific training, showcasing its flexibility. We also plan to explore the framework&#x00027;s utility in areas like law and finance, where ontology extension could streamline complex document organization or enhance monitoring efforts. Through these advancements, we aim to establish our framework as a versatile tool in the evolving field of knowledge representation and engineering.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s6">
<title>Data availability statement</title>
<p>The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.</p>
</sec>
<sec sec-type="author-contributions" id="s7">
<title>Author contributions</title>
<p>GW: Validation, Visualization, Writing &#x02013; original draft, Writing &#x02013; review &#x00026; editing. CL: Conceptualization, Investigation, Methodology, Supervision, Writing &#x02013; review &#x00026; editing. IG: Conceptualization, Formal analysis, Supervision, Validation, Writing &#x02013; review &#x00026; editing. LZ: Funding acquisition, Project administration, Resources, Writing &#x02013; review &#x00026; editing.</p>
</sec>
<sec sec-type="funding-information" id="s8">
<title>Funding</title>
<p>The author(s) declare that no financial support was received for the research, authorship, and/or publication of this article.</p>
</sec>
<ack>
<p>The authors acknowledge the use of OpenAI GPT-3.5-TURBO during this study.</p>
</ack>
<sec sec-type="COI-statement" id="conf1">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s9">
<title>Publisher&#x00027;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bai</surname> <given-names>G.</given-names></name> <name><surname>Chai</surname> <given-names>Z.</given-names></name> <name><surname>Ling</surname> <given-names>C.</given-names></name> <name><surname>Wang</surname> <given-names>S.</given-names></name> <name><surname>Lu</surname> <given-names>J.</given-names></name> <name><surname>Zhang</surname> <given-names>N.</given-names></name> <etal/></person-group>. (<year>2024</year>). <article-title>Beyond efficiency: a systematic survey of resource-efficient large language models</article-title>. <source>arXiv</source> [Preprint]. arXiv:2401.00625. <pub-id pub-id-type="doi">10.48550/arXiv.2401.00625</pub-id></citation>
</ref>
<ref id="B2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Behr</surname> <given-names>A. S.</given-names></name> <name><surname>V&#x000F6;lkenrath</surname> <given-names>M.</given-names></name> <name><surname>Kockmann</surname> <given-names>N.</given-names></name></person-group> (<year>2023</year>). <article-title>Ontology extension with NLP-based concept extraction for domain experts in catalytic sciences</article-title>. <source>Knowl. Inf. Syst</source>. <volume>65</volume>, <fpage>5503</fpage>&#x02013;<lpage>5522</lpage>. <pub-id pub-id-type="doi">10.1007/s10115-023-01919-1</pub-id></citation>
</ref>
<ref id="B3">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Chen</surname> <given-names>P.</given-names></name> <name><surname>Han</surname> <given-names>B.</given-names></name> <name><surname>Zhang</surname> <given-names>S.</given-names></name></person-group> (<year>2024</year>). <article-title>&#x0201C;CoMM: collaborative multi-agent, multi-reasoning-path prompting for complex problem solving,&#x0201D;</article-title> in <source>Findings of the Association for Computational Linguistics: NAACL 2024</source> (<publisher-loc>Mexico City</publisher-loc>: <publisher-name>ACL</publisher-name>), <fpage>1720</fpage>&#x02013;<lpage>1738</lpage>.</citation>
</ref>
<ref id="B4">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Cruanes</surname> <given-names>J.</given-names></name></person-group> (<year>2011</year>). <article-title>&#x0201C;Ontology extension and population: an approach for the pharmacotherapeutic domain,&#x0201D;</article-title> in <source>Natural Language Processing and Information Systems: 16th International Conference on Applications of Natural Language to Information Systems, NLDB 2011, Alicante, Spain, June 28-30, 2011. Proceedings 16</source> (<publisher-loc>New York, NY</publisher-loc>: <publisher-name>Springer</publisher-name>), <fpage>342</fpage>&#x02013;<lpage>347</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-642-22327-3_51</pub-id></citation>
</ref>
<ref id="B5">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hu</surname> <given-names>X.</given-names></name> <name><surname>Walker</surname> <given-names>M. S.</given-names></name> <name><surname>Stepanski</surname> <given-names>E.</given-names></name> <name><surname>Kaplan</surname> <given-names>C. M.</given-names></name> <name><surname>Martin</surname> <given-names>M. Y.</given-names></name> <name><surname>Vidal</surname> <given-names>G. A.</given-names></name> <etal/></person-group>. (<year>2022</year>). <article-title>Racial differences in patient-reported symptoms and adherence to adjuvant endocrine therapy among women with early-stage, hormone receptor-positive breast cancer</article-title>. <source>JAMA Netw. Open</source> <volume>5</volume>:<fpage>e2225485</fpage>. <pub-id pub-id-type="doi">10.1001/jamanetworkopen.2022.25485</pub-id><pub-id pub-id-type="pmid">35947386</pub-id></citation></ref>
<ref id="B6">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ling</surname> <given-names>C.</given-names></name> <name><surname>Zhao</surname> <given-names>X.</given-names></name> <name><surname>Lu</surname> <given-names>J.</given-names></name> <name><surname>Deng</surname> <given-names>C.</given-names></name> <name><surname>Zheng</surname> <given-names>C.</given-names></name> <name><surname>Wang</surname> <given-names>J.</given-names></name> <etal/></person-group>. (<year>2023</year>). <article-title>Domain specialization as the key to make large language models disruptive: a comprehensive survey</article-title>. <source>arXiv</source> [Preprint]. arXiv:2305.18703. <pub-id pub-id-type="doi">10.48550/arXiv.2305.18703</pub-id></citation>
</ref>
<ref id="B7">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Memariani</surname> <given-names>A.</given-names></name> <name><surname>Glauer</surname> <given-names>M.</given-names></name> <name><surname>Neuhaus</surname> <given-names>F.</given-names></name> <name><surname>Mossakowski</surname> <given-names>T.</given-names></name> <name><surname>Hastings</surname> <given-names>J.</given-names></name></person-group> (<year>2021</year>). <article-title>Automated and explainable ontology extension based on deep learning: a case study in the chemical domain</article-title>. <source>arXiv</source> [Preprint]. arXiv:2109.09202. <pub-id pub-id-type="doi">10.48550/arXiv.2109.09202</pub-id></citation>
</ref>
<ref id="B8">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pour</surname> <given-names>M. A. N.</given-names></name> <name><surname>Li</surname> <given-names>H.</given-names></name> <name><surname>Armiento</surname> <given-names>R.</given-names></name> <name><surname>Lambrix</surname> <given-names>P.</given-names></name></person-group> (<year>2023</year>). <article-title>Phrase2onto: a tool to support ontology extension</article-title>. <source>Procedia Comput. Sci</source>. <volume>225</volume>, <fpage>1415</fpage>&#x02013;<lpage>1424</lpage>. <pub-id pub-id-type="doi">10.1016/j.procs.2023.10.130</pub-id></citation>
</ref>
<ref id="B9">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Santosa</surname> <given-names>N. C.</given-names></name> <name><surname>Miyazaki</surname> <given-names>J.</given-names></name> <name><surname>Han</surname> <given-names>H.</given-names></name></person-group> (<year>2021</year>). <article-title>Automating computer science ontology extension with classification techniques</article-title>. <source>IEEE Access</source> <volume>9</volume>, <fpage>161815</fpage>&#x02013;<lpage>161833</lpage>. <pub-id pub-id-type="doi">10.1109/ACCESS.2021.3131627</pub-id></citation>
</ref>
<ref id="B10">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Xi</surname> <given-names>Z.</given-names></name> <name><surname>Chen</surname> <given-names>W.</given-names></name> <name><surname>Guo</surname> <given-names>X.</given-names></name> <name><surname>He</surname> <given-names>W.</given-names></name> <name><surname>Ding</surname> <given-names>Y.</given-names></name> <name><surname>Hong</surname> <given-names>B.</given-names></name> <etal/></person-group>. (<year>2023</year>). <article-title>The rise and potential of large language model based agents: a survey</article-title>. <source>arXiv</source> [Preprint]. arXiv:2309.07864. <pub-id pub-id-type="doi">10.48550/arXiv.2309.07864</pub-id><pub-id pub-id-type="pmid">27885969</pub-id></citation></ref>
</ref-list>
</back>
</article>