embedding-strategies

embedding-strategies is a skill for Claude Code from EngineerWithAI/engineerwith-agents. It costs 37 tokens per session (3,300 once invoked), scanned A, a copy of embedding-strategies, MIT.

A guide to choosing embedding models and preparing text for semantic search, where related meanings can match even when words differ.

In plain words
What is it for?
Use it to compare embedding models, split documents into chunks, handle multilingual content, and tune vector-search quality.
Why use it?
It helps improve the quality, speed, cost, and language coverage of RAG systems, which retrieve relevant documents before generating an answer.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the llm-application-dev plugin — 8 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/engineerwithai/engineerwith-agents/embedding-strategies
Any agent
npx skills add EngineerWithAI/engineerwith-agents --skill embedding-strategies
Clone the repo
git clone --depth 1 https://github.com/EngineerWithAI/engineerwith-agents

Made for: Claude Code.

Or install llm-application-dev, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for embedding-strategies

README.md
[![agentmods](https://agentmods.dev/badge/skills/engineerwithai/engineerwith-agents/embedding-strategies.svg)](https://agentmods.dev/skills/engineerwithai/engineerwith-agents/embedding-strategies)
Your own site
<a href="https://agentmods.dev/skills/engineerwithai/engineerwith-agents/embedding-strategies"><img src="https://agentmods.dev/badge/skills/engineerwithai/engineerwith-agents/embedding-strategies.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,300 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.03300
Opus 5 $0.00018 $0.01650
Sonnet 5 $0.00007 $0.00660
Haiku 4.5 $0.00004 $0.00330

Measured 2d ago against content hash f1e255d875e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

embedding-strategies scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to embedding-strategies — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/llm-application-dev/skills/embedding-strategies/SKILL.md · 480 lines

How it starts

The opening of the file, as written. The whole thing — 480 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Model Dimensions Max Tokens Best For
text-embedding-3-large 3072 8191 High accuracy
text-embedding-3-small 1536 8191 Cost-effective
voyage-2 1024 4000 Code, legal
bge-large-en-v1.5 1024 512 Open source
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

Template 1: OpenAI Embeddings

from openai import OpenAI
from typing import List
import numpy as np

client = OpenAI()

def get_embeddings(
    texts: List[str],
    model: str = "text-embedding-3-small",
    dimensions: int = None
) -> List[List[float]]:
    """Get embeddings from OpenAI."""
    # Handle batching for large lists
    batch_size = 100
    all_embeddings = []

    for i in range(0, len(texts), batch_size):
        batch = texts[i:i + batch_size]

        kwargs = {"input": batch, "model": model}
        if dimensions:
            kwargs["dimensions"] = dimensions

        response = client.embeddings.create(**kwargs)
        embeddings = [item.embedding for item in response.data]
        all_embeddings.extend(embeddings)

    return all_embeddings


def get_embedding(text: str, **kwargs) -> List[float]:
    """Get single embedding."""
    return get_embeddings([text], **kwargs)[0]


# Dimension reduction with OpenAI
def get_reduced_embedding(text: str, dimensions: int = 512) -> List[float]:
    """Get embedding with reduced dimensions (Matryoshka)."""
    return get_embedding(
        text,
        model="text-embedding-3-small",
        dimensions=dimensions
    )

Read the full file on GitHub · 480 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 480 lines · 37 tokens per session scan A f1e255d875e4

Subscribe to this mod's changes

embedding-strategies is a skill published in the GitHub repository EngineerWithAI/engineerwith-agents (4 stars, last pushed 7mo ago), licensed MIT. It adds 37 tokens to every session and 3,300 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to embedding-strategies, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

agent-platform-rag-engine-management

Manage and query Agent Platform RAG Engine Corpora and retrieve grounded contexts using the Google GenAI SDK. Use when listing RAG corpora or files, inspecting a corpus, retrieving contexts, or generating content grounded in a RAG corpus. Do not use for standard database queries (use SQL/Spanner skills), Google…

google/skills · 85 tokens

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

9router-embeddings

Generate vector embeddings via 9Router /v1/embeddings using OpenAI / Gemini / Mistral / Voyage / Nvidia / GitHub embedding models for RAG, semantic search, similarity. Use when the user wants embeddings, vectors, RAG, semantic search, or to embed text.

decolua/9router · 66 tokens

azure-search-documents-dotnet

Azure AI Search SDK for .NET (Azure.Search.Documents). Use for building search applications with full-text, vector, semantic, and hybrid search. Covers SearchClient (queries, document CRUD), SearchIndexClient (index management), and SearchIndexerClient (indexers, skillsets). Triggers: "Azure Search .NET"…

microsoft/skills · 102 tokens

embedding-strategies

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.

foryourhealth111-pixel/Vibe-Skills · 37 tokens