Structured Modeling of Historical Relationships and Knowledge Graph Construction
This article walks through how to turn a historical character list into a queryable knowledge graph. It covers entity modeling with stable IDs and aliases, separating kinship from political ties, modeling events as nodes, attaching validity periods to every relationship, handling data quality and conflicting sources, and a practical five-layer architecture. The core takeaway: stable entity identifiers, time-bounded relationships, and confidence grading matter more than model complexity.
1. From a Character List to a Data Problem
The source material is a typical “character table”: each person has a name, birth and death years, identity labels, a relationship to the protagonist, and several events. On the surface this is narrative text, but in essence it is a mixture of entities + attributes + relationships + events. To turn it into computable data, the first step is not writing code but defining clearly what questions we want to answer.
Using this list as an example, we can pose three categories of questions:
- Relationship queries: Who was the protagonist’s lifelong supporter in the court? Who held both royal finance and seal-related offices?
- Temporal reasoning: Is it a contradiction if a person began their tenure only after another person died? Who was active in both diplomacy and military affairs during the 1530s?
- Group analysis: How many of these people ultimately died unnatural deaths (executed, burned at the stake), and is that correlated with their stance on the Reformation?
2. Entity Modeling: A Person Is Not a String
The most common mistake is treating the name as a primary key. In historical texts, the same person may appear under multiple spellings, and different people may share the same name. A design of “stable identifier + multiple aliases” is recommended:
{"entity_id": "P_0007","type": "Person","canonical_name": "Thomas Cromwell","aliases": ["Cromwell", "Thomas Cromwell"],"life_span": {"start": 1485, "end": 1540, "precision": "year"},"roles": ["Chief Minister", "Lord Privy Seal"],"faction": "Reformist","death_cause": "execution"}
There are three key points. First, entity_id is decoupled from the name, and alias normalization is handled by a separate module. Second, birth and death years must carry a precision marker, because the source material contains many estimates like “circa 1490”; if these are all treated as exact years, subsequent temporal reasoning will produce systematic bias. Third, identity labels should be split into multi-value fields rather than a single string, since one person is often simultaneously a diplomat, a soldier, and a poet.
3. Relationship Extraction: Distinguishing “Kinship” from “Politics”
The relationships in the list fall into four categories, which must not be conflated during modeling:
| Relationship Type | Example | Modeling Note |
|---|---|---|
| Bloodline | King and illegitimate son, father-daughter marriage alliance | Must support illegitimacy markers |
| Political dependency | Lifelong friend and supporter, agent | Directional, needs a time interval |
| Office | Lord Chancellor, Lord High Admiral, Constable of the Tower | Needs institution entity and term |
| Event participation | Building ships, plotting a conspiracy, arguing a divorce case | Should be modeled as event nodes |
It is recommended to make events independent nodes rather than directly connecting pairs of people, so that “multiple people participating in the same event with different roles” can be expressed:
(Person:Lisle) --[role:ship owner]--> (Event:Mary Rose construction)(Person:Celyon) --[role:builder]--> (Event:Mary Rose construction)(Event:Mary Rose construction) --[time]--> 1520s
4. The Time Dimension: The Real Difficulty of Historical Data
The biggest difference between a historical graph and a general graph is that almost every relationship has a validity period. A person “holding an office” is not a permanent fact but an interval fact. It is recommended to attach three attributes to each edge: valid_from, valid_to, and source_confidence, and to perform interval filtering at the query layer:
SELECT p.canonical_name, e.office_nameFROM person_office_edge eJOIN person p ON p.entity_id = e.person_idWHERE e.valid_from <= 1537AND (e.valid_to IS NULL OR e.valid_to >= 1537);
Only then can questions like “who held power in 1537” be answered correctly, and only then can both claims be preserved when data conflicts arise instead of forcibly overwriting one.
5. Data Quality and Conflict Handling
The source material itself has gaps: some people are missing the first character of their name, and some events have only an outcome with no year. Engineering should set up three validations:
- Completeness validation: if the missing rate of required fields (identifier, type, name) exceeds a threshold, ingestion is blocked.
- Consistency validation: birth-death interval legality, tenure interval must not precede the birth year, and the death event time must match the year of death.
- Source credibility grading: explicit record > inferred > doubtful. Low-confidence data does not participate in automatic reasoning and is used only for manual review.
6. Recommended Implementation Architecture
A runnable minimal solution typically consists of five layers: the text ingestion layer handles cleaning and sentence splitting; the extraction layer performs entity and relationship recognition; the normalization layer aligns aliases and institutions; the storage layer uses a graph structure to hold entities and relationships and columnar storage to handle attribute retrieval; the service layer provides graph query and visualization interfaces. If the data volume grows, you can introduce object storage to keep the raw corpus, a message queue to decouple extraction tasks, a container platform to run batch jobs, and logging and monitoring with alerting to track the extraction failure rate.
7. Common Pitfalls
- Storing only relationships without time, making all historical conclusions untrustworthy.
- Treating a “title” as an entity, causing confusion between institutions and positions; it should be split into three layers: institution, position, and appointment relationship.
- Pursuing fully automatic extraction in one pass while ignoring the manual review step; historical texts have complex references, so human-machine collaboration is more reliable.
- Over-normalizing and forcibly merging different people with the same name, damaging data credibility.
8. Summary
Turning a character table into a knowledge graph is not about how complex the model is, but about three things: entities have stable identifiers, relationships have time boundaries, and data has confidence grading. With these three in place, historical material can be transformed from static text into a data asset that supports querying and reasoning. The same approach can be transferred to scenarios such as organizational archives and compliance review that need to handle large numbers of people and appointment relationships.
