[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EW9FF44A21VM5VXTWQG257":3,"skill-same:01M7EW9FF44A21VM5VXTWQG257":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7EW9FF44A21VM5VXTWQG257","vector-db-pro",null,"Vector database guidance — embeddings, indexing (HNSW\u002FIVF), hybrid search, metadata filtering, and production ops.","TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-vector-db-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: vector-db-pro\ndescription: Vector database guidance — embeddings, indexing (HNSW\u002FIVF), hybrid search, metadata filtering, and production ops.\ncategory: development\n---\n\n## Overview\n\nVector databases store embeddings and answer \"what's most similar?\" at scale — the retrieval backbone of RAG, semantic search, and recommendation. The core is approximate nearest neighbor (ANN) search: trading a little recall for orders-of-magnitude speed over brute force.\n\nThis skill covers choosing and operating vector stores: embedding strategy, index types (HNSW, IVF), hybrid search, metadata filtering, and the production concerns (updates, scaling, evaluation) that matter beyond the demo.\n\n## When to use\n\n- Choosing a vector database (Pinecone, Qdrant, Weaviate, pgvector, Milvus).\n- Tuning ANN indexes (recall vs latency vs memory).\n- Adding hybrid search (dense + keyword).\n- Filtering by metadata alongside similarity.\n- Operating vector DBs in production (updates, scaling, backups).\n- Deciding pgvector vs a dedicated vector DB.\n\n## Core concepts\n\n- **Embeddings.** Dense vectors capturing semantic meaning; the embedding model defines the space — retrieval quality starts here. Match model to domain (general vs code vs multilingual); keep the embedding model fixed for an index (changing it requires reindexing everything).\n- **Similarity metrics.** Cosine (normalized, angle-based — the default), dot product (magnitude-aware), Euclidean\u002FL2 (distance). Normalize vectors for cosine; the metric must match what the embedding model was trained with.\n- **ANN vs exact.** Exact search is O(n) — fine to ~100K vectors; ANN indexes (HNSW, IVF) give ~10-100x speedups at 95-99% recall. The recall\u002Flatency\u002Fmemory triangle is the central tuning tradeoff.\n- **HNSW.** Hierarchical Navigable Small World — graph-based, excellent recall\u002Flatency, higher memory. Parameters: `M` (connections), `ef_construction` (build quality), `ef_search` (query-time recall knob). The default choice for most workloads.\n- **IVF.** Inverted file index — clusters vectors, searches nearest clusters; `nlist` (clusters), `nprobe` (clusters searched). Lower memory than HNSW, needs training on representative data; good for very large datasets.\n- **Hybrid search.** Dense vectors (semantic) + BM25\u002Fkeyword (exact terms) fused via RRF (reciprocal rank fusion) or weighted scores — each covers the other's blind spots (semantic misses exact product codes; keyword misses paraphrases). Usually beats pure dense.\n- **Metadata filtering.** Pre-filter (filter then search — precise, can be slow on selective filters) vs post-filter (search then filter — fast, may return too few). Payload indexes on filtered fields; design filters into the schema from the start.\n- **Chunking interplay.** The vector DB stores what you chunk — embedding quality is bounded by chunk quality. Store chunk text + metadata + source references; the DB is only as good as its inputs.\n- **Updates and deletes.** Upserts by ID for changed documents; tombstones\u002Flazy deletion in some engines; versioning strategy for re-embedded content. Stale vectors are a correctness issue — plan the update path.\n- **Scaling.** Single-node (pgvector, embedded Qdrant — fine to millions), distributed (sharding, replication for 100M+). Most projects never outgrow single-node; don't pay distributed complexity early.\n- **pgvector vs dedicated.** pgvector (Postgres extension) — zero new infra, transactions, joins with relational data; dedicated (Qdrant\u002FWeaviate\u002FMilvus\u002FPinecone) — better ANN tuning, filtering, scale. pgvector wins until ~few million vectors or advanced filtering needs.\n- **Multitenancy.** Namespaces\u002Fcollections per tenant — data isolation for SaaS; metadata tenant filters as the lighter alternative (with careful filter enforcement).\n- **Evaluation.** Recall@k on labeled queries (does ANN find what exact search finds?), end-to-end RAG metrics — index tuning without measurement is superstition.\n- **Backup and DR.** Snapshot the vectors AND the source documents + embedding model version — restoring vectors without knowing how they were made is useless.\n- **Quantization.** Scalar\u002Fbinary quantization in the index — 4-32x memory reduction with small recall cost; enables bigger datasets on fixed hardware.\n- **Sparse vectors.** Learned sparse (SPLADE) or native sparse indexes — exact-term matching inside the vector DB; the alternative to separate keyword infrastructure.\n- **Disk-based indexes.** DiskANN-style SSD indexes for billion-scale without full RAM residency — very large corpora on modest hardware.\n\n## Practical workflow\n\n1. **Choose the embedding model.** Domain-appropriate, fixed for the index lifetime; record model + version with the index metadata.\n2. **Pick the store.** pgvector if you're on Postgres and under a few million vectors; dedicated when you need advanced ANN tuning, heavy filtering, or scale.\n3. **Design the schema.** Text + metadata (source, date, tenant, access level) + IDs linking to source docs; payload indexes on filtered fields:\n   ```python\n   # Qdrant-style: payload indexes for the fields you filter on\n   client.create_payload_index(collection, \"tenant_id\",\n                               field_type=\"keyword\")\n   client.create_payload_index(collection, \"doc_date\",\n                               field_type=\"datetime\")\n   ```\n4. **Tune the ANN index.** Start with defaults; measure recall@k vs latency; adjust `ef_search` (HNSW) or `nprobe` (IVF) — the query-time knobs. Document the chosen tradeoff.\n   ```python\n   # recall@k: what fraction of exact-search neighbors does ANN find?\n   exact = brute_force_search(query_vec, k=10)\n   approx = index.search(query_vec, k=10, params={\"ef\": 64})\n   recall = len(set(exact) & set(approx)) \u002F 10\n   ```\n\n5. **Add hybrid search.** BM25 alongside dense with RRF fusion; A\u002FB against pure dense on your queries — hybrid usually wins, verify on your data.\n6. **Implement updates.** Upsert-by-ID pipelines tied to document changes; re-embed on model changes (full reindex); monitor for stale\u002Fmissing vectors.\n7. **Secure tenancy.** Namespace-per-tenant or enforced metadata filters; test filter bypass attempts — cross-tenant leakage is the catastrophic failure.\n8. **Operate.** Backups (vectors + sources + model version), recall monitoring, capacity planning (quantization before sharding), runbooks for reindexing.\n\n## Common pitfalls\n\n- **Embedding model churn** — changing models without reindexing; mixed spaces silently degrade retrieval.\n- **Wrong similarity metric** — unnormalized vectors with cosine; match metric to training.\n- **ANN untuned** — default `ef_search` with poor recall; measure recall@k, tune query knobs.\n- **No hybrid search** — pure dense missing exact terms (SKUs, names); RRF fusion.\n- **Post-filter starvation** — selective filters returning too few results; pre-filter or overfetch.\n- **Missing payload indexes** — filtering scanning everything; index filtered fields.\n- **Stale vectors** — documents updated, embeddings not; upsert pipelines.\n- **pgvector at 100M scale** — wrong tool past its sweet spot; dedicated DBs for large scale.\n- **Distributed too early** — sharding complexity for 500K vectors; single-node first.\n- **Cross-tenant leakage** — filter bugs exposing data; test isolation explicitly.\n- **Backing up vectors only** — unrestorable without sources + model version; back up the recipe.\n- **Chunking ignored** — blaming the DB for chunk-quality problems; fix ingestion first.\n- **No recall evaluation** — tuning blind; labeled query sets for recall@k.\n- **ef_search left at default** — poor recall unnoticed; tune the query-time knob and measure.\n- **No quantization plan** — RAM exhaustion at scale; scalar\u002Fbinary quantization before sharding.\n","## Overview\n\nVector databases store embeddings and answer \"what's most similar?\" at scale — the retrieval backbone of RAG, semantic search, and recommendation. The core is approximate nearest neighbor (ANN) search: trading a little recall for orders-of-magnitude speed over brute force.\n\nThis skill covers choosing and operating vector stores: embedding strategy, index types (HNSW, IVF), hybrid search, metadata filtering, and the production concerns (updates, scaling, evaluation) that matter beyond the demo.\n\n## When to use\n\n- Choosing a vector database (Pinecone, Qdrant, Weaviate, pgvector, Milvus).\n- Tuning ANN indexes (recall vs latency vs memory).\n- Adding hybrid search (dense + keyword).\n- Filtering by metadata alongside similarity.\n- Operating vector DBs in production (updates, scaling, backups).\n- Deciding pgvector vs a dedicated vector DB.\n\n## Core concepts\n\n- **Embeddings.** Dense vectors capturing semantic meaning; the embedding model defines the space — retrieval quality starts here. Match model to domain (general vs code vs multilingual); keep the embedding model fixed for an index (changing it requires reindexing everything).\n- **Similarity metrics.** Cosine (normalized, angle-based — the default), dot product (magnitude-aware), Euclidean\u002FL2 (distance). Normalize vectors for cosine; the metric must match what the embedding model was trained with.\n- **ANN vs exact.** Exact search is O(n) — fine to ~100K vectors; ANN indexes (HNSW, IVF) give ~10-100x speedups at 95-99% recall. The recall\u002Flatency\u002Fmemory triangle is the central tuning tradeoff.\n- **HNSW.** Hierarchical Navigable Small World — graph-based, excellent recall\u002Flatency, higher memory. Parameters: `M` (connections), `ef_construction` (build quality), `ef_search` (query-time recall knob). The default choice for most workloads.\n- **IVF.** Inverted file index — clusters vectors, searches nearest clusters; `nlist` (clusters), `nprobe` (clusters searched). Lower memory than HNSW, needs training on representative data; good for very large datasets.\n- **Hybrid search.** Dense vectors (semantic) + BM25\u002Fkeyword (exact terms) fused via RRF (reciprocal rank fusion) or weighted scores — each covers the other's blind spots (semantic misses exact product codes; keyword misses paraphrases). Usually beats pure dense.\n- **Metadata filtering.** Pre-filter (filter then search — precise, can be slow on selective filters) vs post-filter (search then filter — fast, may return too few). Payload indexes on filtered fields; design filters into the schema from the start.\n- **Chunking interplay.** The vector DB stores what you chunk — embedding quality is bounded by chunk quality. Store chunk text + metadata + source references; the DB is only as good as its inputs.\n- **Updates and deletes.** Upserts by ID for changed documents; tombstones\u002Flazy deletion in some engines; versioning strategy for re-embedded content. Stale vectors are a correctness issue — plan the update path.\n- **Scaling.** Single-node (pgvector, embedded Qdrant — fine to millions), distributed (sharding, replication for 100M+). Most projects never outgrow single-node; don't pay distributed complexity early.\n- **pgvector vs dedicated.** pgvector (Postgres extension) — zero new infra, transactions, joins with relational data; dedicated (Qdrant\u002FWeaviate\u002FMilvus\u002FPinecone) — better ANN tuning, filtering, scale. pgvector wins until ~few million vectors or advanced filtering needs.\n- **Multitenancy.** Namespaces\u002Fcollections per tenant — data isolation for SaaS; metadata tenant filters as the lighter alternative (with careful filter enforcement).\n- **Evaluation.** Recall@k on labeled queries (does ANN find what exact search finds?), end-to-end RAG metrics — index tuning without measurement is superstition.\n- **Backup and DR.** Snapshot the vectors AND the source documents + embedding model version — restoring vectors without knowing how they were made is useless.\n- **Quantization.** Scalar\u002Fbinary quantization in the index — 4-32x memory reduction with small recall cost; enables bigger datasets on fixed hardware.\n- **Sparse vectors.** Learned sparse (SPLADE) or native sparse indexes — exact-term matching inside the vector DB; the alternative to separate keyword infrastructure.\n- **Disk-based indexes.** DiskANN-style SSD indexes for billion-scale without full RAM residency — very large corpora on modest hardware.\n\n## Practical workflow\n\n1. **Choose the embedding model.** Domain-appropriate, fixed for the index lifetime; record model + version with the index metadata.\n2. **Pick the store.** pgvector if you're on Postgres and under a few million vectors; dedicated when you need advanced ANN tuning, heavy filtering, or scale.\n3. **Design the schema.** Text + metadata (source, date, tenant, access level) + IDs linking to source docs; payload indexes on filtered fields:\n   ```python\n   # Qdrant-style: payload indexes for the fields you filter on\n   client.create_payload_index(collection, \"tenant_id\",\n                               field_type=\"keyword\")\n   client.create_payload_index(collection, \"doc_date\",\n                               field_type=\"datetime\")\n   ```\n4. **Tune the ANN index.** Start with defaults; measure recall@k vs latency; adjust `ef_search` (HNSW) or `nprobe` (IVF) — the query-time knobs. Document the chosen tradeoff.\n   ```python\n   # recall@k: what fraction of exact-search neighbors does ANN find?\n   exact = brute_force_search(query_vec, k=10)\n   approx = index.search(query_vec, k=10, params={\"ef\": 64})\n   recall = len(set(exact) & set(approx)) \u002F 10\n   ```\n\n5. **Add hybrid search.** BM25 alongside dense with RRF fusion; A\u002FB against pure dense on your queries — hybrid usually wins, verify on your data.\n6. **Implement updates.** Upsert-by-ID pipelines tied to document changes; re-embed on model changes (full reindex); monitor for stale\u002Fmissing vectors.\n7. **Secure tenancy.** Namespace-per-tenant or enforced metadata filters; test filter bypass attempts — cross-tenant leakage is the catastrophic failure.\n8. **Operate.** Backups (vectors + sources + model version), recall monitoring, capacity planning (quantization before sharding), runbooks for reindexing.\n\n## Common pitfalls\n\n- **Embedding model churn** — changing models without reindexing; mixed spaces silently degrade retrieval.\n- **Wrong similarity metric** — unnormalized vectors with cosine; match metric to training.\n- **ANN untuned** — default `ef_search` with poor recall; measure recall@k, tune query knobs.\n- **No hybrid search** — pure dense missing exact terms (SKUs, names); RRF fusion.\n- **Post-filter starvation** — selective filters returning too few results; pre-filter or overfetch.\n- **Missing payload indexes** — filtering scanning everything; index filtered fields.\n- **Stale vectors** — documents updated, embeddings not; upsert pipelines.\n- **pgvector at 100M scale** — wrong tool past its sweet spot; dedicated DBs for large scale.\n- **Distributed too early** — sharding complexity for 500K vectors; single-node first.\n- **Cross-tenant leakage** — filter bugs exposing data; test isolation explicitly.\n- **Backing up vectors only** — unrestorable without sources + model version; back up the recipe.\n- **Chunking ignored** — blaming the DB for chunk-quality problems; fix ingestion first.\n- **No recall evaluation** — tuning blind; labeled query sets for recall@k.\n- **ef_search left at default** — poor recall unnoticed; tune the query-time knob and measure.\n- **No quantization plan** — RAM exhaustion at scale; scalar\u002Fbinary quantization before sharding.\n",{"name":5,"category":24,"description":7},"development","main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-vector-db-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill vector-db-pro",{"tool":39,"command":40},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill vector-db-pro",{"tool":42,"command":43},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill vector-db-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-vector-db-pro\u002FSKILL.md",true,[],[48,55,63,70,77,84],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":59,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]