Agent skill

vector-databases

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/cuba6112/skillfactory/tree/main/skills/vector-databases

SKILL.md

Vector Databases

Overview

Model data as vectors with payload metadata, then run similarity search with optional filters or multi-stage retrieval. Keep index maintenance in the loop so performance does not degrade as the collection changes.

When to Use

  • Use this skill when the frontmatter triggers apply; otherwise start with a simple keyword search or database query.

Decision Tree

  1. Do you need metadata filters for access control or faceting?
    • Yes: store payloads and use filtered search.
  2. Do you need to blend multiple signals (dense + sparse or multi-step)?
    • Yes: use a multi-stage hybrid query plan.
  3. Is search latency degrading after heavy updates or deletes?
    • Yes: run optimizer/maintenance operations.

Workflows

1. Point Ingestion With Payloads

  1. Generate embeddings for each document or chunk.
  2. Attach a payload with filterable fields (tenant, source, timestamp).
  3. Upsert points into a collection with consistent vector dimensions.

2. Filtered Similarity Search

  1. Build a metadata filter from the request constraints.
  2. Embed the query and run a similarity search scoped to the filter.
  3. Return the top-k results with payload metadata for downstream ranking.

3. Multi-Stage Hybrid Retrieval

  1. Run a first-stage query to get broad recall (dense or sparse).
  2. Use a second-stage query or re-ranker to refine results.
  3. Merge and normalize scores before returning the final list.

4. Index Maintenance Pass

  1. Monitor update/delete volume and query latency.
  2. Run optimizer operations (vacuum/merge/index rebuild) on a schedule.
  3. Verify recall/latency before and after maintenance.

Non-Obvious Insights

  • Payload design is retrieval design: without payload fields, you cannot filter or enforce access constraints.
  • Hybrid retrieval is often multi-stage; plan for intermediate candidate sets and score normalization.
  • Optimizer operations are part of normal maintenance, not one-off recovery tasks.

Evidence

  • "Points are a record which consists of a vector and an optional payload." - Qdrant
  • "there are use-cases when the best search is obtained by combining multiple queries, or by performing the search in more than one stage." - Qdrant
  • "inverted index, a vector index and an object store interact with each other" - Weaviate
  • "Optimizer describes options to rebuild database structures for faster search. They include a vacuum, a merge, and an indexing optimizer." - Qdrant

Scripts

  • scripts/vector-databases_tool.py: CLI for building points, validating dimensions, and combining hybrid scores.
  • scripts/vector-databases_tool.js: Node.js CLI for the same tasks.

Dependencies

  • Python 3.11+ or Node 18+. Use your DB client for actual ingestion/search.

References

  • references/README.md

Expand your agent's capabilities with these related and highly-rated skills.

cuba6112/skillfactory

prompt-engineering

Comprehensive prompt engineering techniques for Claude models. Use this skill when crafting, optimizing, or debugging prompts for Claude API, Claude Code, or any Claude-powered application. Covers system prompts, role prompting, multishot examples, chain of thought, XML structuring, long context handling, extended thinking, prompt chaining, Claude 4.x-specific best practices, and agentic orchestration including subagents, agent loops, skills, MCP integration, and multi-agent workflows.

0 0
Explore
cuba6112/skillfactory

adk-rag-agent

Build RAG (Retrieval-Augmented Generation) agents with Google ADK and Vertex AI RAG Engine. Use when implementing document Q&A, knowledge base search, or citation-backed responses. Covers VertexAiRagRetrieval tool, corpus setup, and citation formatting.

0 0
Explore
cuba6112/skillfactory

headless-cli-agents

Build agentic systems using Claude CLI in headless mode or the Claude Agent SDK. Use when building automation pipelines, CI/CD integrations, multi-agent orchestration, or programmatic Claude interactions. Covers CLI flags (-p, --output-format), session management (--resume, --continue), Python SDK (claude-agent-sdk), custom tools, and agent loop patterns.

0 0
Explore
cuba6112/skillfactory

notion-knowledge-capture

Capture conversations and decisions into structured Notion pages; use when turning chats/notes into wiki entries, how-tos, decisions, or FAQs with proper linking.

0 0
Explore
cuba6112/skillfactory

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

0 0
Explore
cuba6112/skillfactory

gh-fix-ci

Inspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize failure context, then create a fix plan and implement after user approval. Use when a user asks to debug or fix failing PR CI/CD checks on GitHub Actions and wants a plan + code changes; for external checks (e.g., Buildkite), only report the details URL and mark them out of scope.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results