Generated banner for Embedding Strategies
Generated logo for Embedding Strategies

Embedding Strategies

Seth HobsonCommunityCreated by Seth Hobson

  • Skill
  • Guidelines
  • Data and AI
  • MIT
  • No issues found

From the author

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.
— the description by Seth Hobson

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a framework for choosing and implementing embedding models within RAG pipelines. It covers model selection based on specific use cases, such as code, legal, or financial domains, and offers best practices for chunking, normalization, and pipeline management. The skill includes technical templates for integrating Voyage AI, OpenAI, and local sentence-transformer models.

What it does

  • Compares various embedding models based on dimensions, token limits, and domain suitability.
  • Provides implementation templates for Voyage AI, OpenAI, and local models.
  • Outlines best practices for chunking, batching, and caching embeddings.
  • Explains the importance of preprocessing and metadata usage in vector search.
  • Demonstrates how to handle dimension reduction using Matryoshka embeddings.
  • Offers guidance on matching models to specific content types like code or multilingual text.

When to use it

  • When selecting an embedding model for a new RAG application.
  • When optimizing existing chunking strategies for better retrieval.
  • When needing to implement or switch between different embedding providers.
  • When fine-tuning or adapting embedding strategies for specialized domains.
  • When troubleshooting issues related to vector space compatibility or token limits.

Advantages

  • Provides clear criteria for matching models to specific application needs.
  • Includes ready-to-use code templates for major embedding providers.
  • Establishes a structured approach to the embedding pipeline.
  • Highlights critical pitfalls like mixing incompatible models or ignoring token limits.

Usage examples

“Which embedding model should I use for a legal document RAG system?”
The skill identifies voyage-law-2 as a specialized model for legal documents with 1024 dimensions.
“How do I implement OpenAI embeddings with dimension reduction?”
The skill provides a Python template demonstrating the use of the dimensions parameter for Matryoshka dimensionality reduction.
“What are the best practices for chunking text for embeddings?”
The skill advises preserving semantic boundaries and warns against over-chunking to avoid losing context.
“How do I use local models for embeddings?”
The skill provides a LocalEmbedder class template using sentence-transformers for local deployment.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/wshobson/embedding-strategies/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip embedding-strategies.zip -d .agents/skills

Documentation by Seth Hobson

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

Files

ATTRIBUTION.md

Attribution

This folder is an unmodified copy of the Agent Skill "embedding-strategies", distributed by AutoGineer (https://autogineer.com/agent-skills).

The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.

Files added by AutoGineer

  • ATTRIBUTION.md: this file, written by AutoGineer

  • LICENSE: copied from LICENSE

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Seth Hobson
Publisher
Seth Hobson (Community)
Source
wshobson/agents · plugins/llm-application-dev/skills/embedding-strategies · commit 4bde316
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Seth Hobson or Seth Hobson.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download embedding-strategies.zip