Select and optimize embedding models for semantic search

Embedding strategies

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

Embedding strategies cover

Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.

---
name: embedding-strategies
description: Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.
---

# Embedding Strategies

Guide to selecting and optimizing embedding models for vector search applications.

## When to Use This Skill

- Choosing embedding models for RAG
- Optimizing chunking strategies
- Fine-tuning embeddings for domains
- Comparing embedding model performance
- Reducing embedding dimensions
- Handling multilingual content

Overview

Guide to selecting and optimizing embedding models for vector search applications.

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill embedding-strategies -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/llm-application-dev/skills/embedding-strategies
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/bce4027e954f3226f55d/embedding-strategies.zip" -OutFile "$env:TEMP\embedding-strategies.zip"; Expand-Archive "$env:TEMP\embedding-strategies.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md2.8 KB
  • references/1 file · 16.4 KB
Read the files here
wshobson/4236bb92 files
SKILL.md
Show the full text66 lines

Embedding Strategies

Guide to selecting and optimizing embedding models for vector search applications.

When to Use This Skill

  • Choosing embedding models for RAG
  • Optimizing chunking strategies
  • Fine-tuning embeddings for domains
  • Comparing embedding model performance
  • Reducing embedding dimensions
  • Handling multilingual content

Core Concepts

1. Embedding Model Comparison (2026)
Model Dimensions Max Tokens Best For
voyage-3-large 1024 32000 Claude apps (Anthropic recommended)
voyage-3 1024 32000 Claude apps, cost-effective
voyage-code-3 1024 32000 Code search
voyage-finance-2 1024 32000 Financial documents
voyage-law-2 1024 32000 Legal documents
text-embedding-3-large 3072 8191 OpenAI apps, high accuracy
text-embedding-3-small 1536 8191 OpenAI apps, cost-effective
bge-large-en-v1.5 1024 512 Open source, local deployment
all-MiniLM-L6-v2 384 256 Fast, lightweight
multilingual-e5-large 1024 512 Multi-language
2. Embedding Pipeline
Document → Chunking → Preprocessing → Embedding Model → Vector
                ↓
        [Overlap, Size]  [Clean, Normalize]  [API/Local]

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's
  • Match model to use case: Code vs prose vs multilingual
  • Chunk thoughtfully: Preserve semantic boundaries
  • Normalize embeddings: For cosine similarity search
  • Batch requests: More efficient than one-by-one
  • Cache embeddings: Avoid recomputing for static content
  • Use Voyage AI for Claude apps: Recommended by Anthropic
Don'ts
  • Don't ignore token limits: Truncation loses information
  • Don't mix embedding models: Incompatible vector spaces
  • Don't skip preprocessing: Garbage in, garbage out
  • Don't over-chunk: Lose important context
  • Don't forget metadata: Essential for filtering and debugging
1---
2name: embedding-strategies
3description: Select and optimize embedding models for semantic search and RAG applications. Use when choosing embedding models, implementing chunking strategies, or optimizing embedding quality for specific domains.
4---
5 
6# Embedding Strategies
7 
8Guide to selecting and optimizing embedding models for vector search applications.
9 
10## When to Use This Skill
11 
12- Choosing embedding models for RAG
13- Optimizing chunking strategies
14- Fine-tuning embeddings for domains
15- Comparing embedding model performance
16- Reducing embedding dimensions
17- Handling multilingual content
18 
19## Core Concepts
20 
21### 1. Embedding Model Comparison (2026)
22 
23| Model | Dimensions | Max Tokens | Best For |
24| -------------------------- | ---------- | ---------- | ----------------------------------- |
25| **voyage-3-large** | 1024 | 32000 | Claude apps (Anthropic recommended) |
26| **voyage-3** | 1024 | 32000 | Claude apps, cost-effective |
27| **voyage-code-3** | 1024 | 32000 | Code search |
28| **voyage-finance-2** | 1024 | 32000 | Financial documents |
29| **voyage-law-2** | 1024 | 32000 | Legal documents |
30| **text-embedding-3-large** | 3072 | 8191 | OpenAI apps, high accuracy |
31| **text-embedding-3-small** | 1536 | 8191 | OpenAI apps, cost-effective |
32| **bge-large-en-v1.5** | 1024 | 512 | Open source, local deployment |
33| **all-MiniLM-L6-v2** | 384 | 256 | Fast, lightweight |
34| **multilingual-e5-large** | 1024 | 512 | Multi-language |
35 
36### 2. Embedding Pipeline
37 
38```
39Document → Chunking → Preprocessing → Embedding Model → Vector
40 ↓
41 [Overlap, Size] [Clean, Normalize] [API/Local]
42```
43 
44## Templates and detailed worked examples
45 
46Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.
47 
48## Best Practices
49 
50### Do's
51 
52- **Match model to use case**: Code vs prose vs multilingual
53- **Chunk thoughtfully**: Preserve semantic boundaries
54- **Normalize embeddings**: For cosine similarity search
55- **Batch requests**: More efficient than one-by-one
56- **Cache embeddings**: Avoid recomputing for static content
57- **Use Voyage AI for Claude apps**: Recommended by Anthropic
58 
59### Don'ts
60 
61- **Don't ignore token limits**: Truncation loses information
62- **Don't mix embedding models**: Incompatible vector spaces
63- **Don't skip preprocessing**: Garbage in, garbage out
64- **Don't over-chunk**: Lose important context
65- **Don't forget metadata**: Essential for filtering and debugging
66 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
PromptAct as an expert AI engineer specializing in practicalf/prompts.chat · by Ersin YılmazAct as an expert AI engineer specializing in practical machine learning implementation and AI integration for production applications, ensuring efficient and robust AI solutions.New listingSkillQuery the 1000 Genomes Project datasetOneKGPd: Individual-Level Queries over the 1000 Genomes ProjectK-Dense-AI/scientific-agent-skills · by K-Dense-AIQuery the 1000 Genomes Project dataset (3,202 whole-genome-sequenced individuals, GRCh38) at the level of individual participants. Use when a question is about individuals or variants in the 1000 Genomes Project cohort: which individuals carry variants matching specific criteria in a gene or region, which individuals are homozygous-reference at a position, which variants exist in the dataset or carried by specified individuals in a gene or region, the relatedness between two specified individuals. Variants are returned with 1000 Genomes allele frequencies (AF), gnomAD v4.1 exome and genome AF, AlphaMissense score, and HGVSp annotations.★ 46k GitHub starsSkillBayesian modeling with PyMCPyMC Bayesian ModelingK-Dense-AI/scientific-agent-skills · by K-Dense-AIBayesian modeling with PyMC. Build hierarchical models, MCMC (NUTS), variational inference, LOO/WAIC comparison, posterior checks, for probabilistic programming and inference.★ 46k GitHub starsSkillStatistical models library for PythonStatsmodels: Statistical Modeling and EconometricsK-Dense-AI/scientific-agent-skills · by K-Dense-AIStatistical models library for Python. Use when you need specific model classes (OLS, GLM, mixed models, ARIMA) with detailed diagnostics, residuals, and inference. Best for econometrics, time series, rigorous inference with coefficient tables. For guided statistical test selection with APA reporting use statistical-analysis.★ 46k GitHub starsSkillHugging Face Transformers for loading Hub modelsK-Dense-AI/scientific-agent-skills · by K-Dense-AIHugging Face Transformers for loading Hub models, running pipeline inference, text generation, and Trainer fine-tuning on NLP, vision, audio, and multimodal tasks. Use when working with AutoModel, pipelines, tokenizers, or TrainingArguments—not for general ML outside the Transformers library.★ 46k GitHub starsSkillWorking with Outpost Bio's open microbiome foundation modelsWaypoint: Outpost Bio's Open Microbiome Foundation ModelsK-Dense-AI/scientific-agent-skills · by K-Dense-AIUse when working with Outpost Bio's open microbiome foundation models - the Waypoint checkpoints (Waypoint-6m, Waypoint-45m, Waypoint-170m), the Atlas pretraining corpus, the Compass eight-task benchmark, or the `waypoint` CLI from the `waypoint-bio` package. Covers embedding microbiome samples, fine-tuning on taxonomic abundance data, benchmarking a checkpoint on Compass, pretraining a GPT-2 model on taxonomic abundance profiles, and converting MetaPhlAn, Kraken2, QIIME 2, or MGnify abundance tables into waypoint format.★ 46k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars