vector-db-patterns
Embedding strategies, ANN algorithms, hybrid search, RAG chunking strategies, and reranking for semantic search and retrieval.
Profile →npx skills add vibeeval/vibecosystem --skill vector-db-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Vector DB Patterns Semantic search and retrieval-augmented generation (RAG) patterns with vector databases. ## Embedding Strategies ```typescript import { OpenAI } from 'openai' const openai = new OpenAI() // Batch embedding for efficiency (max 2048 inputs per request for text-embedding-3-small) async function embedTexts(texts: string[]): Promise<number[][]> { const BATCH_SIZE = 2048 const allEmbeddings: number[][] = [] for (let i = 0; i < texts.length; i += BATCH_SIZE) { const batch = texts.slice(i, i + BATCH_SIZE) const response = await openai.embeddings.create({ model: 'text-embedding-3-small', // 1536 dimensions, good cost/quality input: batch, dimensions: 512, // Reduce dims for speed (Matryoshka) }) allEmbeddings.push(...response.data.map(d => d.embedding)) } return allEmbeddings } // Embed with prefix for asymmetric retrieval async function embedForSearch(query: string): Promise<number[]> { const [embedding] = await embedTexts([`search_query: ${query}`]) return embedding } async function embedForStorage(document: string): Promise<number[]> { const [embedding] = await embedTexts([`search_document: ${document}`]) return embedding } ``` ## Chunking Strategies for RAG ```types
- Embedding Strategies
- Chunking Strategies for RAG
- Vector Search with Metadata Filtering
- Hybrid Search (Vector + Keyword)
- Reranking
- Checklist
- Anti-Patterns
What does the vector-db-patterns skill do?
Embedding strategies, ANN algorithms, hybrid search, RAG chunking strategies, and reranking for semantic search and retrieval.
How do I install it?
Run `npx skills add vibeeval/vibecosystem --skill vector-db-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From vibeeval/vibecosystem, a repository with 521 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.