Design: Entity wiki & edge statements
Entity pages are compiled from the graph. They make connected facts readable without introducing another place to author or synchronize knowledge.
Single source of truth#
The graph is the knowledge source of truth: durable facts live as entities + triples, with Library documents retained as provenance. “Memories” is a first-person view, not a second write path. An entity wiki is a compiled view of an entity’s neighborhood, not a separately authored document store.
| Layer | Role |
|---|---|
| Library | Source documents |
| Graph | Walkable world model |
| Memories | First-person cards (owner-reachable) |
| Entity wiki | View-time article for any entity |
| Ontology | Extract vocabulary — not visibility |
Provenance (source_doc_id, doc meta.source) distinguishes “I said this” (chat) from sync/library — filter views by that; don’t fork schemas.
In the shipped Knowledge UI, selecting an entity opens its wiki: About, an optional Summary, relations grouped by predicate, direction and source badges, and source documents. Editing the wiki is intentionally not a product concept; correct the source or graph relation and the view recompiles.
Edge statements#
Triples keep a short predicate for routing/collapse (attended, works_at, breed) and an optional statement — grounded prose for display/citation (“Attended the Program on Negotiation”).
Prefer reifying rich middles as entities when walkable:
Person -[attended]-> Workshop· statement optionalExample Workshop -[at]-> Example Institute
Ask walks endpoints; UI/wiki prefer statement when present, else format_fact.
Wiki compilation (view-time)#
GET /v1/graph/entities/{id}/wiki (and Graph/Knowledge entity detail):
- Entity + verified one-hop neighbors, limited to durable predicates
- Sections: About (
description), Summary, Relations (grouped), Sources - A structural summary is always available; an optional cached LLM summary in kv (
entity.wiki.summary:{id}) is used only while its edge fingerprint matches - Neighborhoods with at least six durable verified edges may be marked for compaction by the
memory_groomworkflow
Do not persist wiki markdown as canonical.