liveBook · Manning

Entity and relationship extraction

As explained in Essential GraphRAG

Entity extraction is the process of identifying and describing entities of specified types in source text.

Entity and relationship extraction converts a text document into structured graph knowledge. It identifies entities from a supplied type list, records each entity’s name, type, and description, then finds clearly related entity pairs and assigns relationship descriptions and strength scores. section 7.2.2

A practical extraction workflow:

  • Choose entity types that match the dataset, including general categories such as people, organizations, and locations or domain-specific categories. section 7.1
  • Send each text chunk with an extraction prompt, parse the model’s delimited output, and separate nodes from relationships. section 7.2.2

The Odyssey

The Odyssey supplies recurring entities such as Ulysses, people, gods, mystical weapons, and events. Repeated appearances of Ulysses across chunks support testing entity extraction and cross-chunk relationships. section 7.1

How Essential GraphRAG covers it

How deep it goes
Specifies entity fields, relationship fields, delimiters, model parsing, graph import, and inspection queries.
Examples
Uses The Odyssey, Ulysses, Orestes, gods, creatures, weapons, events, and generated relationship descriptions.
What it assumes
Assumes text chunks, configured entity types, a callable chat model, parsing helpers, and an empty running Neo4j instance.
What you can do after
Builds a chunk-processing pipeline that extracts, imports, counts, and inspects graph entities and relationships.
How it connects
Connects entity extraction with relationship extraction, GraphRAG, text chunks, and Neo4j knowledge graphs.

Also explained in

Compare how 2 books explain entity and relationship extraction →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Essential GraphRAG. The section links point to the parts of the book it draws on.