Skip to content

Knowledge Graph

A packet can carry knowledge_nodes[] — entities and concepts extracted from its sources, with typed relationships between them. This is the raw material the Registry turns into first-class edges for graph-aware retrieval, consensus, and authority scoring.

KnowledgeNode

FieldTypeNotes
idstringRequired
entity_namestringRequired
entity_typeenum (extensible)Required — see below
descriptionstring
source_idsstring[]Sources that evidence this entity
relationshipsobject[]Typed edges — see below
domain_dataobjectDomain-specific attributes

Entity types (extensible — x-/x_ for novel values):

compound · supplement · drug · condition · algorithm · parameter ·
concept · organism · gene · biomarker · food · other

Relationships

Each entry in relationships[]:

FieldTypeNotes
target_idstringRequired — the other entity
relationship_typeenum (extensible)Required — see below
strengthnumber 0–1Edge weight
evidence_gradeenumGrade of the evidence for this edge

Relationship types (extensible — x-/x_ for novel values):

synergistic · antagonistic · prerequisite · contraindicated ·
metabolizes · inhibits · activates · similar_to

How the registry uses the graph

When a packet is published, the registry persists these typed/weighted relationships as cross-packet edges and resolves entities to canonical identities. That graph then powers:

  • /entities/:name/relations — typed edges for an entity
  • /consensus/:name — grade-weighted, empirically-derived contested signal
  • /entities/:name/authority — global PageRank authority
  • /answer — graph-aware citation chains (entity → relation → entity → sources)

See Query the registry and Trust & safety.

→ Next: JSON Schema & Types · Actions & Agents (Layer E)

Released under the MIT License.