Interactive explainer: Terraphim graph embeddings (real Rust crate compiled to WASM) #30
AlexMikhalev
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
New interactive page: https://terraphim.ai/docs/graph-embeddings-interactive/
A Terraphim graph embedding is a node plus its directed edges and integer counters — not a point in a vector space. The page demonstrates this with the actual terraphim_rolegraph Rust crate compiled to WebAssembly running in the browser: live Aho-Corasick matching over the thesaurus, step-by-step indexing of a real corpus (10 concepts, 23 directed edges), and a query ledger that decomposes every score into named node + named edge + document counts.
Honesty in both directions: out-of-vocabulary queries return an empty set rather than a fuzzy guess, synonym additions trigger a real automaton rebuild measured in milliseconds, and the comparison with node2vec, GCN, TransE, Cleora and dense vector DBs includes where the graph loses. It also references the hybrid retrieval already implemented: query_graph_with_trigger_fallback (TF-IDF trigger index) and search_sessions_hybrid (BM25 + KG boosts).
Everything on screen is the real algorithm — the same code paths the crate's tests exercise.
All reactions