Embeddings

ruvnet/ruflo/.agents/skills/embeddings

作者 ruvnet6051f6702b61无许可证74K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

仅含说明AI & Agents
AI 生成的概览

提供带 HNSW 索引、sql.js 持久化、量化和双曲支持的向量嵌入,用于语义搜索。

功能
该技能记录了一套用于创建和查询向量嵌入的命令行工作流。内容包括使用 sql.js SQLite 后端进行初始化、单条与批量文本嵌入、带 top-k 参数的语义搜索,以及与记忆存储和搜索的集成。它还列出了 HNSW 索引、双曲庞加莱球支持、归一化选项、分块以及 Int8/Int4/二进制量化等特性。
适用场景
适用于语义搜索、模式匹配、相似度查询和知识检索等需要基于含义进行匹配的场景。不适用于精确文本匹配、简单查找或不需要语义理解的情况。
运行要求
需要通过 npx 调用 claude-flow 命令行工具,因此需要 Node.js 以及用于获取软件包的网络访问。该技能不附带脚本,仅为说明文档。

Embeddings Skill

Purpose

Vector embeddings for semantic search and pattern matching with HNSW indexing.

Features

FeatureDescription
sql.jsCross-platform SQLite persistent cache (WASM)
HNSW150x-12,500x faster search
HyperbolicPoincare ball model for hierarchical data
NormalizationL2, L1, min-max, z-score
ChunkingConfigurable overlap and size
75x fasterWith agentic-flow ONNX integration

Commands

Initialize Embeddings

bash
npx claude-flow embeddings init --backend sqlite

Embed Text

bash
npx claude-flow embeddings embed --text "authentication patterns"

Batch Embed

bash
npx claude-flow embeddings batch --file documents.json

Semantic Search

bash
npx claude-flow embeddings search --query "security best practices" --top-k 5

Memory Integration

bash
# Store with embeddingsnpx claude-flow memory store --key "pattern-1" --value "description" --embed
# Search with embeddingsnpx claude-flow memory search --query "related patterns" --semantic

Quantization

TypeMemory ReductionSpeed
Int83.92xFast
Int47.84xFaster
Binary32xFastest

Best Practices

  1. Use HNSW for large pattern databases
  2. Enable quantization for memory efficiency
  3. Use hyperbolic for hierarchical relationships
  4. Normalize embeddings for consistency

来源与署名

来源:ruvnet/ruflo位于.agents/skills/embeddings提交6051f67

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架