Best use case
agentdb-semantic-vector-search is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
---
Teams using agentdb-semantic-vector-search should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/agentdb-semantic-vector-search/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How agentdb-semantic-vector-search Compares
| Feature / Agent | agentdb-semantic-vector-search | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
---
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# AgentDB Semantic Vector Search
---
## LIBRARY-FIRST PROTOCOL (MANDATORY)
**Before writing ANY code, you MUST check:**
### Step 1: Library Catalog
- Location: `.claude/library/catalog.json`
- If match >70%: REUSE or ADAPT
### Step 2: Patterns Guide
- Location: `.claude/docs/inventories/LIBRARY-PATTERNS-GUIDE.md`
- If pattern exists: FOLLOW documented approach
### Step 3: Existing Projects
- Location: `D:\Projects\*`
- If found: EXTRACT and adapt
### Decision Matrix
| 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) |
---
## Overview
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.
## SOP Framework: 5-Phase Semantic Search
### Phase 1: Setup Vector Database (1-2 hours)
- Initialize AgentDB
- Configure embedding model
- Setup database schema
### Phase 2: Embed Documents (1-2 hours)
- Process document corpus
- Generate embeddings
- Store vectors with metadata
### Phase 3: Build Search Index (1-2 hours)
- Create HNSW index
- Optimize search parameters
- Test retrieval accuracy
### Phase 4: Implement Query Interface (1-2 hours)
- Create REST API endpoints
- Add filtering and ranking
- Implement hybrid search
### Phase 5: Refine and Optimize (1-2 hours)
- Improve relevance
- Add re-ranking
- Performance tuning
## Quick Start
```typescript
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' }
});
```
## Features
- **Semantic Search**: Meaning-based retrieval
- **Hybrid Search**: Vector + keyword search
- **Filtering**: Metadata-based filtering
- **Re-ranking**: Improve result relevance
- **RAG Integration**: Context for LLMs
## Success Metrics
- Retrieval accuracy > 90%
- Query latency < 100ms
- Relevant results in top-10: > 95%
- API uptime > 99.9%
## MCP Requirements
This skill operates using AgentDB's npm package and API only. No additional MCP servers required.
All AgentDB operations are performed through:
- npm CLI: `npx agentdb@latest`
- TypeScript/JavaScript API: `import { AgentDB } from 'agentdb-vector-search'`
## Additional Resources
- Full docs: SKILL.md
- AgentDB Vector Search: https://agentdb.dev/docs/vector-search
---
## Core Principles
AgentDB Semantic Vector Search operates on 3 fundamental principles for building intelligent document retrieval systems:
### Principle 1: Meaning Over Keywords
Semantic search retrieves documents based on meaning similarity rather than exact keyword matching, enabling context-aware retrieval.
In practice:
- Generate embeddings for documents using models like OpenAI ada-002 (1536 dimensions) to capture semantic meaning
- Store vectors with rich metadata (title, content, category, tags) to enable hybrid search combining semantic and keyword filters
- Search using query embeddings to find semantically similar documents even when exact keywords differ
- Implement distance metrics (cosine similarity, euclidean) to rank results by semantic relevance rather than keyword frequency
### Principle 2: Performance Through Indexing
Build HNSW indexes for 150x faster vector search compared to exhaustive search, essential for production-scale retrieval.
In practice:
- Create HNSW (Hierarchical Navigable Small World) indexes after document ingestion to enable fast approximate nearest neighbor search
- Optimize search parameters (ef_construction, M) based on accuracy vs speed tradeoffs for your use case
- Test retrieval accuracy with evaluation datasets to ensure index parameters maintain >90% recall at top-10 results
- Batch insert operations during document ingestion to amortize indexing overhead across multiple documents
### Principle 3: Context-Aware Retrieval
Enhance search with filtering, re-ranking, and hybrid approaches to improve relevance beyond pure vector similarity.
In practice:
- Add metadata filters to search queries (category, date range, author) to constrain results to relevant document subsets
- Implement re-ranking with cross-encoders or relevance models to improve ordering of top-K results after initial retrieval
- Build hybrid search combining vector similarity (semantic) with keyword matching (BM25) for robust retrieval
- Track query-document relevance metrics to continuously improve search quality through user feedback loops
---
## Common Anti-Patterns
| 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 |
---
## Conclusion
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.Related Skills
reasoningbank-with-agentdb
Implement ReasoningBank adaptive learning with AgentDBs 150x faster vector database. Includes trajectory tracking, verdict judgment, memory distillation, and pattern recognition. Use when building self-learning agents, optimizing decision-making, or implementing experience replay systems.
reasoningbank-adaptive-learning-with-agentdb
---
gemini-research
Use Gemini CLI for research with Google Search grounding and 1M token context
agentdb-vector-search-optimization
AgentDB Vector Search Optimization operates on 3 fundamental principles:
agentdb-reinforcement-learning-training
AgentDB Reinforcement Learning Training operates on 3 fundamental principles:
agentdb-persistent-memory-patterns
AgentDB Persistent Memory Patterns operates on 3 fundamental principles:
agentdb-performance-optimization
Apply quantization to reduce memory by 4-32x. Enable HNSW indexing for 150x faster search. Configure caching strategies and implement batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors. Deploy these optimizations to achieve 12,500x performance gains.
agentdb-learning-plugins
Create AI learning plugins using AgentDBs 9 reinforcement learning algorithms. Train Decision Transformer, Q-Learning, SARSA, and Actor-Critic models. Deploy these plugins to build self-learning agents, implement RL workflows, and optimize agent behavior through experience. Apply offline RL for safe learning from logged data.
agentdb-advanced-features
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
/*============================================================================*/
/* SKILL SKILL :: VERILINGUA x VERIX EDITION */
web-scraping
Structured data extraction from web pages using claude-in-chrome MCP with sequential-thinking planning. Focus on READ operations, data transformation, and pagination handling for multi-page extraction.
visual-testing
Screenshot-based visual comparison and regression testing using claude-in-chrome MCP. Captures, compares, and validates UI states to detect layout shifts, visual bugs, and design regressions across viewports.