vector-db
vector-db
Purpose
This skill enables the management of vector databases for storing, indexing, and querying high-dimensional vectors, optimizing AI/ML workflows for tasks like similarity searches and embeddings.
When to Use
Use this skill for AI/ML applications requiring fast vector similarity queries, such as building recommendation engines, semantic search in NLP, or image retrieval systems. Apply it when dealing with large-scale vector data (e.g., embeddings from models like BERT) to avoid brute-force comparisons.
Key Capabilities
- Store vectors with metadata and perform efficient nearest-neighbor searches using indexes.
- Support distance metrics like cosine, Euclidean, and dot product for similarity calculations.
- Handle vector dimensions up to 2048 and scale to millions of entries.
- Integrate with embedding models for real-time vector generation and querying.
Usage Patterns
Invoke this skill via CLI for quick operations or through API calls in code. Always set the environment variable $VECTOR_DB_API_KEY for authentication before use. For CLI, prefix commands with vector-db and use JSON config files for complex setups (e.g., config.json with { "dimension": 768, "metric": "cosine" }). In code, use HTTP requests to the API endpoint, ensuring error checking on responses. Pattern: First, create an index; then, insert vectors; finally, query them.
Common Commands/API
Use the CLI tool vector-db or the API at https://api.openclaw.com/vector-db/v1. Authentication requires $VECTOR_DB_API_KEY in headers.