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 從公開儲存庫中收錄這些內容。

檢舉或申請下架