用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill agentdb-semantic-vector-search命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | agentdb-semantic-vector-search |
| description | --- Use when this capability is needed. |
| metadata | {"author":"dnyoussef"} |
Before writing ANY code, you MUST check:
.claude/library/catalog.json.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.mdD:\Projects\*| Match | Action |
|---|---|
| Library >90% | REUSE directly |
| Library 70-90% | ADAPT minimally |
| Pattern exists | FOLLOW pattern |
| In project | EXTRACT |
| No match | BUILD (add to library after) |
Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Build RAG systems, semantic search engines, and knowledge bases.
import { AgentDB, EmbeddingModel } from 'agentdb-vector-search';
// Initialize
const db = new AgentDB({ name: 'semantic-search', dimensions: 1536 });
const embedder = new EmbeddingModel('openai/ada-002');
// Embed documents
for (const doc of documents) {
const embedding = await embedder.embed(doc.text);
await db.insert({
id: doc.id,
vector: embedding,
metadata: { title: doc.title, content: doc.text }
});
}
// Search
const query = 'machine learning tutorials';
const queryEmbedding = await embedder.embed(query);
const results = await db.search({
vector: queryEmbedding,
topK: 10,
filter: { category: 'tech' }
});
This skill operates using AgentDB's npm package and API only. No additional MCP servers required.
All AgentDB operations are performed through:
npx agentdb@latestimport { AgentDB } from 'agentdb-vector-search'AgentDB Semantic Vector Search operates on 3 fundamental principles for building intelligent document retrieval systems:
Semantic search retrieves documents based on meaning similarity rather than exact keyword matching, enabling context-aware retrieval.
In practice:
Build HNSW indexes for 150x faster vector search compared to exhaustive search, essential for production-scale retrieval.
In practice:
Enhance search with filtering, re-ranking, and hybrid approaches to improve relevance beyond pure vector similarity.
In practice:
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Exhaustive Search Without Indexing | Searching all vectors linearly has O(N) complexity, causing query latency to scale linearly with dataset size and becoming unusable at >10k documents | Build HNSW index (Phase 3) to enable approximate nearest neighbor search with O(log N) complexity, achieving <100ms queries at millions of documents |
| Single-Model Embeddings | Using only vector similarity ignores keyword signals and metadata, causing retrieval to miss exact matches and fail when embeddings don't capture query intent | Implement hybrid search combining vector similarity with keyword search (BM25) and metadata filtering to leverage multiple retrieval signals |
| Ignoring Retrieval Metrics | Deploying semantic search without measuring precision/recall creates invisible quality issues where search appears to work but returns irrelevant results | Establish retrieval accuracy baselines (>90% recall@10 target) with evaluation datasets and track metrics continuously to detect degradation |
AgentDB Semantic Vector Search enables building production-grade document retrieval systems for RAG applications, knowledge bases, and search engines. By prioritizing meaning over keywords, leveraging HNSW indexing for performance, and implementing context-aware retrieval strategies, it provides the foundation for intelligent information retrieval.
This skill excels at building RAG systems where LLMs need relevant context, semantic search engines for large document collections, and recommendation systems based on content similarity. Use this when keyword search is insufficient because users search by concept rather than exact terms, or when you need to retrieve contextually relevant documents even when query phrasing differs from document text.
The 5-phase framework (setup database, embed documents, build index, implement query interface, refine optimization) provides a systematic path from initial prototype to production deployment with <100ms query latency and >90% retrieval accuracy at scale.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.