liveBook · Manning

Textual path summarization

As explained in Knowledge Graphs and LLMs in Action

Textual path summarization is the condensation of a graph path’s relationships and entities into a concise natural-language description.

Textual path summarization condenses relationships extracted from graph paths into a concise natural-language context. In named entity disambiguation, it helps a large language model compare candidate biomedical entities using relational evidence rather than isolated labels. section 8.4.3 section 8.5

A practical pipeline separates graph retrieval from language processing:

  • Detect short paths between candidate entities, limiting path length and excluding highly connected hub nodes that produce generic relationships. section 8.4.3
  • Translate each path into a sentence while preserving the exact entity names and returning structured JSON. section 8.4.3
  • Summarize the resulting sentences into shared context that emphasizes recurring entities and relationships. section 8.4.3
  • Pass the summary to the final disambiguation prompt alongside the original sentence and candidate entities. section 8.4.3

Biomedical candidate context

Paths linking Congenital Zika virus infection through Congenital to Micrencephaly, Acrocephaly, and other malformations become a summary stating that the infection is associated with various congenital malformations sharing a common link to Congenital. section 8.4.3

Figure 8.6 NED CD steps: (1) detecting the shortest paths between all the candidates related to the entity mentions in the sentence; (2) translating detected paths into natural language sentences; (3) summarizing those sentences into useful text for disambiguation
figure

The pipeline is organized as shortest-path detection, path translation into natural-language sentences, and summarization for disambiguation. section 8.4.3

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Explains a three-stage pipeline with prompts and outputs, while deferring broader validation and reliability procedures.
Examples
Uses SNOMED paths involving Congenital Zika virus infection, Congenital, Micrencephaly, and other congenital malformations.
What it assumes
Assumes graph entities, relationships, candidate generation, and LLM prompting, while demonstrating the translation and summarization steps.
What you can do after
Apply it to convert ontology paths into compact context for more accurate candidate-entity disambiguation.
How it connects
Connects named entity disambiguation with knowledge graphs, shortest-path algorithms, large language models, and domain ontologies.

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.