Skip to main content
QUICK REVIEW

[Paper Review] Structured prompt interrogation and recursive extraction of semantics (SPIRES): A method for populating knowledge bases using zero-shot learning

J. Harry Caufield, Harshad Hegde|arXiv (Cornell University)|Apr 5, 2023
Biomedical Text Mining and OntologiesBiochemistry, Genetics and Molecular Biology52 references14 citations
TL;DR

SPIRES uses zero-shot learning with a flexible, schema-driven prompting approach to extract and ground nested knowledge for populating knowledge bases, with open-source OntoGPT implementation and strong grounding performance. It enables new tasks without training data and leverages ontologies for identifier grounding.

ABSTRACT

Creating knowledge bases and ontologies is a time consuming task that relies on a manual curation. AI/NLP approaches can assist expert curators in populating these knowledge bases, but current approaches rely on extensive training data, and are not able to populate arbitrary complex nested knowledge schemas. Here we present Structured Prompt Interrogation and Recursive Extraction of Semantics (SPIRES), a Knowledge Extraction approach that relies on the ability of Large Language Models (LLMs) to perform zero-shot learning (ZSL) and general-purpose query answering from flexible prompts and return information conforming to a specified schema. Given a detailed, user-defined knowledge schema and an input text, SPIRES recursively performs prompt interrogation against GPT-3+ to obtain a set of responses matching the provided schema. SPIRES uses existing ontologies and vocabularies to provide identifiers for all matched elements. We present examples of use of SPIRES in different domains, including extraction of food recipes, multi-species cellular signaling pathways, disease treatments, multi-step drug mechanisms, and chemical to disease causation graphs. Current SPIRES accuracy is comparable to the mid-range of existing Relation Extraction (RE) methods, but has the advantage of easy customization, flexibility, and, crucially, the ability to perform new tasks in the absence of any training data. This method supports a general strategy of leveraging the language interpreting capabilities of LLMs to assemble knowledge bases, assisting manual knowledge curation and acquisition while supporting validation with publicly-available databases and ontologies external to the LLM. SPIRES is available as part of the open source OntoGPT package: https://github.com/ monarch-initiative/ontogpt.

Motivation & Objective

  • Enable automatic population of complex, nested knowledge schemas from natural language text without task-specific training data.
  • Leverage LLMs for prompt-based extraction while grounding entities to persistent identifiers from external ontologies.
  • Provide a flexible, schema-driven framework that can handle nested attribute structures and translation to OWL for reasoning.
  • Demonstrate SPIRES across multiple domains and compare grounding accuracy with baseline LLM prompting.

Proposed method

  • Define a knowledge schema S as a collection of classes with attributes and value ranges, including multivalued attributes and nested inlined classes.
  • Generate a structured prompt p from S, a target class C, and input text T, using a pseudo-YAML attribute template and a TextIntro block.
  • Query an LLM to complete the prompt and obtain a response r in a structured form.
  • Parse r to recursively populate an instance i conforming to S, grounding leaf entities to identifiers via ontologies (e.g., FOODON, Wikidata) and tools (Gilda, OGER).
  • Optionally translate the populated instance to OWL and reason with OWL tools (ROBOT, Elk).
  • Provide an OntoGPT-based Python implementation that uses LinkML for schema definition and OAKlib for grounding, with pre-made schemas for multiple domains.
Figure 1: Example schema. Boxes denote classes and arrows denote attributes whose range are classes (compound attributes). Crows feet above boxes denote multivalued attributes. Attributes whose ranges are primitives or value sets are shown within each box. Here, the top level container class “Recipe
Figure 1: Example schema. Boxes denote classes and arrows denote attributes whose range are classes (compound attributes). Crows feet above boxes denote multivalued attributes. Attributes whose ranges are primitives or value sets are shown within each box. Here, the top level container class “Recipe

Experimental results

Research questions

  • RQ1Can SPIRES populate arbitrarily nested knowledge schemas from unstructured text without any training data?
  • RQ2To what extent does SPIRES improve entity grounding to persistent ontology identifiers compared with plain LLM prompting?
  • RQ3How well does SPIRES perform on established biomedical relation extraction tasks when grounded to MeSH/ontologies?
  • RQ4What is the practicality and accuracy of SPIRES across diverse domains (recipes, signaling pathways, disease treatments, etc.)?

Key findings

  • SPIRES achieved high grounding accuracy, e.g., 98 of 100 GO term groundings with GPT-3.5-turbo and 97 of 100 with GPT-4-turbo.
  • GPT-3.5-turbo without SPIRES frequently produced near-zero correct identifiers for GO terms, illustrating mass hallucination without grounding.
  • On the EMAPA ontology, SPIRES yielded correct identifiers for all 100 terms with GPT-3.5-turbo, while GPT-4-turbo consistently refused grounding for some ontologies.
  • In the BioCreative Chemical-Disease Relation task, SPIRES with chunking yielded F=41.16 (P=0.43, R=0.39) and no-chunking yielded F=36.64 (P=0.63, R=0.26) with GPT-3.5-turbo, while GPT-4-turbo achieved F=43.80 (P=0.69, R=0.32).
  • SPIRES with GPT-3.5-turbo reached mixed but competitive performance on BC5CDR, placing it just below the average of the 18 teams that used training data; GPT-4-turbo showed different grounding behavior.
  • Grounding significantly improves over prompt-only approaches, supporting the viability of zero-shot, schema-driven KB population without new training data.
Figure 2: Example of a portion of text to parse and a corresponding instantiation of the recipe schema from Figure 1 , using YAML syntax. Input text is truncated for brevity; the full input is available at https://github.com/monarch-initiative/ontogpt/blob/main/tests/input/cases/recipe-spaghetti.txt
Figure 2: Example of a portion of text to parse and a corresponding instantiation of the recipe schema from Figure 1 , using YAML syntax. Input text is truncated for brevity; the full input is available at https://github.com/monarch-initiative/ontogpt/blob/main/tests/input/cases/recipe-spaghetti.txt

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.