Embed hierarchical data via npx ruvector@0.2.25 embed text and project into the Poincare ball in user code (no --model poincare flag in 0.2.25)
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-vector-hyperbolic-bdc22779c6c0 ,按照其中的说明把「vector-hyperbolic」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
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__plugin_ruflo-core_ruflo__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 |