Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add m3taz-ahmed/ai-globals --skill vector-db-lordgit clone --depth 1 https://github.com/m3taz-ahmed/ai-globalsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/m3taz-ahmed/ai-globals/vector-db-lord)<a href="https://agentmods.dev/skills/m3taz-ahmed/ai-globals/vector-db-lord"><img src="https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/vector-db-lord/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/m3taz-ahmed/ai-globals/vector-db-lord"><img src="https://agentmods.dev/badge/skills/m3taz-ahmed/ai-globals/vector-db-lord.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00041 | $0.01616 |
| Opus 5 | $0.00020 | $0.00808 |
| Sonnet 5 | $0.00008 | $0.00323 |
| Haiku 4.5 | $0.00004 | $0.00162 |
Grade A, and why
vector-db-lord scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Vector DB Lord
[OBJ] Design and optimize vector search and RAG systems — from DB selection and hybrid search to quantization, reranking, and evaluation — for production-grade retrieval at scale.
Problem
Vector search looks simple in a tutorial: embed, store, query. In production it breaks: pure dense search misses keyword matches, recall drops at scale, costs explode with billions of vectors, and stale embeddings return irrelevant results. RAG without hybrid search, reranking, and evaluation is a demo, not a system.
Rules
- [REQ] Vector DB selection. Pinecone serverless (managed, auto-scaling, good for start-ups), Weaviate 1.39 (hybrid built-in, modules for embeddings), Qdrant 1.13+ (Rust, fast filtering, self-hostable), Milvus (scale, billions of vectors, distributed), pgvector 0.8.2 (Postgres extension, good if already on PG), Chroma (embedded, prototyping), turbopuffer (serverless, S3-backed, cheap). Match DB to scale, hosting, and team expertise.
- [REQ] Hybrid search. Combine BM25 (keyword/lexical) + dense (semantic) + sparse (learned sparse like SPLADE). Weighted fusion or reciprocal rank fusion (RRF). Pure dense misses exact keyword matches; pure BM25 misses semantic similarity. Hybrid is the default for production RAG.
- [REQ] Query-time rescoring. Retrieve top-K (oversample, e.g., K=100) with fast approximate search, then rescore top-N (e.g., N=20) with a cross-encoder or ColBERT-style late interaction. Rescoring improves precision without full reranking cost.
- [REQ] MMR for diversity. Use Maximal Marginal Relevance (MMR) when result diversity matters (exploratory search, recommendation). MMR balances relevance and novelty — prevents top-K from being near-duplicates. Tunable λ: 1.0 = pure relevance, 0.0 = pure diversity.
- [REQ] Multi-vector / ColBERT late interaction. For high-precision retrieval, use ColBERT or multi-vector representations. Store token-level embeddings; late interaction scoring at query time. Higher storage cost but significantly better recall than single-vector.
- [REQ] Quantization. Use quantization to reduce memory and speed up search: 8-bit scalar (simple, 4× memory reduction, minimal recall loss), 4-bit (more aggressive, test recall), product quantization (PQ, good for billions), binary quantization (extreme compression, use for first-stage retrieval + rescore with full vectors).
- [REQ] Reranking. Always rerank top candidates with a cross-encoder model (Cohere Rerank, bge-reranker, Jina Reranker). Cross-encoders see query + document jointly, unlike bi-encoders. Reranking is the single highest-ROI step in RAG pipelines.
- [REQ] Knowledge graphs for agentic RAG. For agentic RAG, combine vector search with a knowledge graph (entity-relationship). The agent retrieves entities, traverses relationships, and synthesizes. GraphRAG (Microsoft) or Neo4j + vector hybrid. Pure vector RAG misses multi-hop reasoning.
- [REQ] Index selection. HNSW (default — fast query, high memory, good recall), IVF (good for billion-scale, lower recall, tunable nprobe), DiskANN (disk-based, good for large datasets that don't fit in RAM). Choose based on dataset size, latency target, and memory budget.
- [REQ] Filtering strategies. Pre-filtering (filter before vector search — accurate but slow if filter is selective), post-filtering (filter after — fast but may return too few results), in-filter (filter during search — Qdrant/Weaviate support this). Use in-filtering when available; it balances speed and accuracy.
- [REQ] Metadata management. Store metadata alongside vectors (source, date, tags, permissions). Filter on metadata at query time. Keep metadata schema consistent — schema drift breaks filters. Version metadata schema like any other schema.
- [REQ] Embedding model selection. Match embedding model to task: general (text-embedding-3-large, bge-m3), multilingual (multilingual-e5), domain-specific (BioBERT for medical, CodeBERT for code). Benchmark on YOUR data — don't trust the model's published benchmarks.
- [REQ] Chunking strategies. Chunk by semantic boundaries (paragraphs, sections) not fixed token count. Overlap chunks by 10-20% to preserve context. For code, chunk by function/class. For markdown, chunk by headers. Document the chunking strategy — it affects recall as much as the embedding model.
- [REQ] Evaluation metrics. Measure: recall@k (did the relevant doc appear in top-k?), nDCG (graded relevance, position-weighted), MRR (mean reciprocal rank, for single-relevant-answer queries). Evaluate on a held-out test set with human-labeled relevance. No RAG system ships without retrieval evaluation.
- [REQ] Cost optimization. Quantize vectors (8-bit or PQ), use serverless where possible (Pinecone serverless, turbopuffer), cache frequent queries, batch embedding API calls, use smaller embedding models for first-stage retrieval + larger for reranking. Monitor cost per 1K queries.
- [REQ] Scaling strategies. Vertical (bigger machine — HNSW in RAM) up to ~10M vectors. Horizontal sharding (partition by metadata or hash) for >10M. Disk-based (DiskANN) for datasets >RAM. Hybrid: hot data in RAM (HNSW), cold data on disk (DiskANN). Plan scaling before you need it.
- [REQ] Incremental updates. Support incremental insert/update/delete without rebuilding the index. HNSW supports this natively. For IVF, periodic rebuild needed. Document the update strategy — stale vectors return stale results.
- [PROHIBIT] Deploying a RAG system without hybrid search, reranking, and a retrieval evaluation test set — pure dense search without evaluation is a prototype, not production.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago Changed · +1 lines b71e888ca0c4
- 6d ago First seen · 66 lines · 41 tokens per session scan A e2686bb07d16
vector-db-lord is a skill published in the GitHub repository m3taz-ahmed/ai-globals (5 stars, last pushed yesterday), licensed MIT. It adds 41 tokens to every session and 1,616 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-06.
Other skills, from other repositories
qdrant
Vector search engine for production RAG systems.
chroma
Embedding database for RAG and semantic search.
pinecone
Managed vector DB for production RAG and search.
similarity-search-patterns
Implement efficient similarity search with vector databases. Use when building semantic search, implementing nearest neighbor queries, or optimizing retrieval performance.
pgvector-semantic-search
Use this skill for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search. Trigger when user asks to: Store or search vector embeddings in PostgreSQL Set up semantic search, similarity search, or nearest neighbor search Create HNSW or IVFFlat indexes for vectors…
postgres-hybrid-text-search
Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). Trigger when user asks to: Combine keyword and semantic search Implement hybrid search or multi-modal retrieval Use BM25/pgtextsearch with pgvector together Implement RRF (Reciprocal…