A knowledge graph stores typed claims about identified entities; its value depends on stable identity and precise relation meaning.
Knowledge-graph contract: entity identity, relations and claims
Define the entity boundary
AI Trove may represent a lesson, concept, author and course as separate entity types. A lesson title is not its identity because titles change and duplicates exist. Use a stable internal key and a redirect or retirement record when content moves. Graph snapshot rules still matter, but a knowledge graph also needs explicit semantics for every claim.
Name directed predicates
A lesson teaches a concept; a concept is required by a lesson. Those statements point in different directions and should not be stored as one anonymous edge. Define allowed source and target types for each predicate. A page linking to another page does not prove that it teaches the linked concept, so editorial relationships and navigation links belong in separate predicates.
Make claims reviewable
Each relationship needs a claim ID, evidence record, extraction or editorial method, created time and current status. A machine-extracted claim can be provisional until reviewed. Distinguish absent evidence from a false claim. Raw input lineage lets an editor find the exact page version that supported a relation.
Exercise a fixture
Lesson L-47 teaches concept C-8 and requires C-3. Rename L-47, then verify its ID and claims remain stable. Add a second lesson with the old title and ensure it does not inherit L-47’s edges. Reverse the requires edge and confirm a schema check rejects the type or direction if it no longer matches the declared relation.
Implementation
def valid_claim(claim, allowed_relations):
relation = allowed_relations.get(claim["predicate"])
return relation is not None and (claim["subject_type"], claim["object_type"]) == relationPerformance and operating cost
A predicate validation is O(1) expected time with a relation registry. Validating N claims is O(N), while identity lookup and claim history storage scale with the number of entities, versions and evidence records.
Common Mistakes
- Do not use a mutable title as an entity key.
- Do not treat a navigation link as proof of a semantic relation.
- Do not collapse unknown and false claims into the same state.
