liveBook · Manning

Annotation

As explained in Knowledge Graphs and LLMs in Action

An annotation is a statement or assertion about a subject that may include descriptive metadata such as provenance, authorship, and creation time.

An annotation records an assertion connecting a disease with a phenotypic feature, together with descriptive metadata such as source, author, and creation date. In a knowledge graph, this metadata supports provenance tracking and can be attached to the relationship itself. section 3.2.1 section 3.2.2

Choose the representation according to how the graph will be queried and maintained:

  • RDF n-ary relations create an annotation resource, often a blank node, that links the disease and phenotypic feature to source, author, and creation date. section 3.2.2
  • RDF named graphs keep the disease–feature statement in a graph and associate annotation metadata with that named graph. section 3.2.2
  • RDF-star attaches metadata directly to the quoted relationship, while LPG stores the same properties on the edge. section 3.2.2

Biomedical annotation

An annotation can connect OMIM:222100, insulin-dependent diabetes mellitus, with HP:0410050, decreased serum 1,5-anhydroglucitol. Its metadata records PMID:9357814, Nicole Vasilevsky, and 2018-02-23. An LPG query matches the disease and feature, then returns the edge’s source, creator, and creation date. section 3.2.1 section 3.2.2

Figure 3.6 Data transformation from a table row to a KG edge. Information in the table is adapted to define the properties of nodes and edges in the KG.
figure

Shows how a tabular annotation row becomes a knowledge-graph edge whose endpoints are nodes and whose provenance fields are edge properties. section 3.2.1

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Models annotations through RDF n-ary relations, named graphs, RDF-star, LPG edges, and corresponding retrieval queries.
Examples
Uses a disease–phenotype assertion with PubMed source, named author, and creation date as its central example.
What it assumes
Builds from ontology-based knowledge graphs and assumes disease, phenotypic-feature, RDF, and LPG representations.
What you can do after
Apply it via RDF or LPG modeling and retrieve annotation provenance with SPARQL or Cypher.
How it connects
Connects knowledge graphs, ontologies, RDF, RDF-star, LPG, provenance, SPARQL, and Cypher.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.