Build a k-nearest-neighbour graph over a corpus’s embeddings, smooth the embeddings over it, derive structure embeddings from the graph alone — then ask the engine what produced each table and whether it still holds.
When to use this pattern. You derive tables from tables (a graph from embeddings, smoothed vectors from a graph) and need to know, later, exactly what produced a table, whether its bytes are still the ones recorded, whether it is stale against the definition you run now, and what depends on it.
A corpus’s embeddings become a k-nearest-neighbour graph; the graph smooths the embeddings (propagation) and, on its own, yields structure embeddings for nodes with no text. Every one of those tables records what produced it, so the engine answers the provenance questions a pipeline asks.
2026-10-03T07:44:56.917482Z WARN jammi_kernels::admission: fused-kernel domain check failed; falling back to the eager composition op="attention_block_fused" predicate="head_dim_is_attention_block_fixed_head_dim"
32.1 The neighbour graph
build_neighbor_graph writes the corpus’s k-nearest-neighbour edges as a table: 20 rows with k = 3 is 60 edges. Graph verbs take the source; the embedding table is the source’s current one unless embedding_table= names another. A result table reads in SQL as "jammi.<table>".
graph = db.build_neighbor_graph("corpus", k=3, exact=True)edges = db.sql(f'SELECT COUNT(*) AS n FROM "jammi.{graph}"').to_pylist()[0]["n"]print(f"neighbor graph: {edges} edges")assert edges ==60
neighbor graph: 60 edges
32.2 Propagate over it, and embed its structure
propagate_embeddings mixes each node’s vector with its neighbours’ (one hop; alpha is how much of the node itself is kept), a decoupled GNN layer whose output is a new, searchable embedding table. generate_structure_embeddings makes vectors from the graph’s shape alone, for nodes that carry no content to embed.
describe_table returns a table’s record: the producing verb and its parameters, the models that ran (none: propagation runs no model), and the tables it read, each anchored by digest. definition_hash identifies that definition.
described = db.describe_table(propagated)recorded = described["definition_hash"]print(f"produced by: {described['descriptor']['producer']}")print(f"models run: {len(described['env']['models'])}")for anchor in described["input_anchors"]:print(f" input {anchor['source'][:40]}… anchored by {anchor['kind']}")assert described["env"]["models"] == []
produced by: graph_propagation
models run: 0
input corpus__text_embedding_____w_jammi-ai_ja… anchored by result_digest
input corpus__neighbor_graph__20261003T0744569… anchored by result_digest
32.4 Does it still hold?
verify_materialization checks that the table’s bytes still hash to the recorded digest, and that the definition you expect is the one recorded. staleness asks whether the table is still the output of a definition: the recorded one is fresh (every input is another table, pinned by digest); a different one is stale, and the answer says why.
verdict = db.verify_materialization(propagated, expected_definition=recorded)print(f"verify against the recorded definition: {verdict['verdict']}")assert verdict["verdict"] =="match"fresh = db.staleness(propagated, recorded)print(f"staleness (recorded definition): {fresh['staleness']}")assert fresh["staleness"] =="fresh"stale = db.staleness(propagated, "0"*len(recorded))reasons =", ".join(r["reason"] for r in stale["reasons"])print(f"staleness (another definition): {stale['staleness']} ({reasons})")assert stale["staleness"] =="stale"
verify against the recorded definition: match
staleness (recorded definition): fresh
staleness (another definition): stale (definition_changed)
32.5 What depends on it
derives_from lists the tables built from a table: here, the graph and the propagated embeddings were both built from the base embeddings.
derived = db.derives_from(emb)for edge in derived:print(f"derives_from: {edge['derived'][:48]}… ({edge['kind']})")assert {graph, propagated} <= {edge["derived"] for edge in derived}
recompute re-runs a table’s recorded producer; with cascade="report_only" it reports what downstream is now stale without recomputing it. reconcile cross-checks the catalog against the object store; a dry run reclaims nothing.