Entity extraction
Named entity recognition · NER · Relation extraction
Finding the named things in text (people, systems, places, dates) and, usually, the relationships between them, as structured records.
In DocSlurpGlossary entry
On this page
Entity extraction pulls the named things out of text and records them as data. Classic named entity recognition (NER) tags spans with a type: person, organization, location, date. For a knowledge graph you also want relation extraction: the links between entities, written as subject, predicate, object.
From travel-desk-guide.pdf p. 7, “The CFO pre-approves every charter flight to London,” an extractor might return:
{
"entities": [
{ "name": "CFO", "type": "person" },
{ "name": "London", "type": "location" }
],
"relationships": [
{ "subject": "CFO", "predicate": "pre-approves charter flights to", "object": "London" }
]
}
Older systems trained a tagger per entity type. Today a language model with structured output does both steps from a prompt that lists the allowed types, which lets each project use its own vocabulary (party, clause, obligation for contracts).
In DocSlurp
When GraphRAG is enabled, the worker reads each document in windows (1, 4 or 12 depending on the lean, standard or deep setting), asks the model for typed entities and triples, and drops anything below a confidence floor (core/worker/src/graph/extract.ts). Types outside the project vocabulary become concept. Without a model key, it falls back to capitalized-phrase heuristics and links entities that appear in the same chunk.
The gotcha
Mentions are not entities. “London”, “the UK office” and “FBO” may all be the same thing, and “Mercury” may be two different things. DocSlurp merges entities whose normalized name and type match, so spelling variants and synonyms stay separate unless the model returns them as aliases. The normalizer also keeps only ASCII letters, digits, spaces and hyphens: “Zürich” becomes “zrich”, and a name written entirely in another script normalizes to nothing and is skipped.
In DocSlurp
In DocSlurp
With GraphRAG enabled, a language model reads each document in windows and returns typed entities and subject-predicate-object triples; without a model key it falls back to capitalized-phrase heuristics (core/worker/src/graph/extract.ts). Entities merge by normalized name and type.