Skip to content

11 — Knowledge graph

Gnosis

Subject–predicate–object triples appended to a Strand and indexed three ways. Pattern queries with wildcards, neighbor traversal, and provenance baked in. Build social graphs, ontologies, and reasoning surfaces that stay verifiable end-to-end.

A closer lookA relationship worth remembering.

Subject, predicate, and object form a triple. Connected triples create a knowledge graph, backed by an inspectable Strand history.

  1. 01Append a triple
  2. 02Connect the relationships
  3. 03Follow the provenance
01 — Concepts
01

Subject–predicate–object triples appended to a Strand.

02

Three-way indexing: by subject, by predicate, by object.

03

Pattern queries with wildcards across any position.

04

Neighbor traversal, multi-hop walks, provenance preserved per triple.

05

Social graphs, ontologies, reasoning — one substrate.

02 — Code

A handful of lines.

// Given an opened Gnosis graph on this configured WeaveNode.
node.gnosis_add("citations", "document:42", "cites", "document:7").await?;
let neighbors = node.gnosis_neighbors("citations", "document:42").await?;