New to Claude Skills? Learn how to install them →

wshobson on GitHub

Embedding Strategies

Free

Optimize embedding models for effective semantic search.

Get this skill

Free · Opens the source repo

What Embedding Strategies does

Embedding Strategies is a comprehensive guide designed to assist developers and data scientists in selecting and optimizing embedding models specifically for vector search applications. This skill is particularly useful in scenarios involving retrieval-augmented generation (RAG) and semantic search, where the quality of embeddings significantly impacts the performance of applications. The skill provides detailed instructions on how to choose the right embedding models, implement effective chunking strategies, and fine-tune embeddings to suit specific domains.

The skill includes an extensive comparison of various embedding models, detailing their dimensions, maximum token limits, and the contexts in which they excel. For instance, it highlights models like voyage-3-large and text-embedding-3-large, which are recommended for Claude and OpenAI applications, respectively. Additionally, the skill covers essential best practices for embedding model usage, such as the importance of matching models to specific use cases, normalizing embeddings for cosine similarity searches, and caching embeddings to enhance efficiency.

Incorporating a structured embedding pipeline, the skill outlines the steps from document chunking to embedding model selection and vector generation. This systematic approach ensures that users can effectively manage their embedding processes, leading to improved search performance and relevance. Furthermore, the skill provides access to a library of templates and worked examples in the references/details.md file, allowing users to apply the concepts directly to their projects.

Overall, Embedding Strategies is an essential resource for anyone involved in semantic search or RAG applications, enabling them to make informed decisions about embedding models and optimize their implementations for better results.

When to use it

Use this skill when you need to choose embedding models, implement chunking strategies, or optimize embeddings for specific domains.

When not to use it

This skill may not be suitable for users looking for a general-purpose embedding solution without specific domain requirements or those not working with vector search applications.

What you can build with it

Choosing an Embedding Model for RAG

When implementing a retrieval-augmented generation application, this skill helps you select the most suitable embedding model based on your content type.

Optimizing Chunking Strategies

Use this skill to develop effective chunking strategies that maintain semantic integrity while preparing documents for embedding.

Comparing Model Performance

Leverage the model comparison table to evaluate different embedding models and determine the best fit for your specific application needs.

How to install Embedding Strategies

View source

1. Install with the skills CLI

npx skills add wshobson/agents/embedding-strategies --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by wshobson

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)

ModelDimensionsMax TokensBest For
voyage-3-large102432000Claude apps (Anthropic recommended)
voyage-3102432000Claude apps, cost-effective
voyage-code-3102432000Code search
voyage-finance-2102432000Financial documents
voyage-law-2102432000Legal documents
text-embedding-3-large30728191OpenAI apps, high accuracy
text-embedding-3-small15368191OpenAI apps, cost-effective
bge-large-en-v1.51024512Open source, local deployment
all-MiniLM-L6-v2384256Fast, lightweight
multilingual-e5-large1024512Multi-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

Frequently asked questions about Embedding Strategies

Similar skills