Embed hierarchical data in the Poincare ball model using ruvector.
Use this skill when your data has inherent hierarchy — dependency trees, module structures, taxonomies, org charts, ontologies. Hyperbolic space captures hierarchical distances with far fewer dimensions than Euclidean embeddings.
npm ls ruvector 2>/dev/null | grep '0.2.25' || npm install ruvector@0.2.25
--model poincare flag on embed text):
npx -y ruvector@0.2.25 embed text "hierarchical concept" -o concept.vec.json
npx -y ruvector@0.2.25 embed neural --help
For an ad-hoc projection, normalize the 384-dim vector to live inside the unit ball (x_i / (||x|| * (1 + epsilon))) and persist the projected coordinates alongside the original embedding.d(u, v) = arcosh(1 + 2 * ||u-v||^2 / ((1-||u||^2)(1-||v||^2)))
Distance grows logarithmically with tree depth, preserving hierarchy.mcp__claude-flow__memory_store({ key: "hyperbolic-CONCEPT", value: "COORDINATES_AND_NEIGHBORS", namespace: "hyperbolic-embeddings" })
| Property | Meaning |
|---|---|
| Norm close to 0 | Generic, root-level concept |
| Norm close to 1 | Specific, leaf-level concept |
| Small geodesic distance | Closely related in hierarchy |
| Large geodesic distance | Distant or different subtrees |