askill
embedding

embeddingSafety 100Repository

Use when user needs to convert text/images to vectors. Triggers on: embedding, vectorize, encode, text-to-vector, model selection, sentence-transformers, OpenAI embeddings, BGE, CLIP.

2 stars
1.2k downloads
Updated 2/4/2026

Package Files

Loading files...
SKILL.md

Embedding - Vectorization Model Selection

Convert text, images, and other data into vectors - the foundation of all vector retrieval applications.

Quick Selection

By User Type

User TypeRecommendedReason
Beginners (don't want to manage infrastructure)OpenAI / Cohere APISign up and use, no GPU needed
Advanced users (seeking best results)BGE-M3 / Voyage AIOpen source control / best for specialized domains
Chinese scenariosBGE-M3 or Qwen3-EmbeddingBest Chinese performance
Image scenariosCLIP / Chinese-CLIPCross-modal image-text

By Scenario

ScenarioRecommended ModelNotes
General text searchOpenAI text-embedding-3-smallBest value
High-precision RAGVoyage-3-large / Cohere embed-v4MTEB top performers
Chinese knowledge baseBGE-M3 / BGE-large-zhChinese optimized
MultilingualBGE-M3 / multilingual-e5100+ languages
Code searchVoyage-code-3Code specialized
Legal/FinanceVoyage-finance/lawDomain specialized
Image searchCLIP-ViT-L-14General image-text
Chinese image-textChinese-CLIPChinese image-text

Model Overview

API Models (Ready to Use)

Suitable for: Beginners, no GPU management, quick validation

ModelProviderDimensionsContextPrice ($/1M tokens)MTEBFeatures
text-embedding-3-largeOpenAI30728K$0.1364.6Best general, mature ecosystem
text-embedding-3-smallOpenAI15368K$0.0262.3Best value
embed-v4Cohere1024512$0.1065.2Multilingual, compressible
voyage-3-largeVoyage AI102432K$0.0665.8Long text, domain specialized
voyage-3-liteVoyage AI51232K$0.0261.2Low cost, low latency

Open Source Models (Local Deployment)

Suitable for: Advanced users, data privacy requirements, seeking best performance

ModelSourceDimensionsContextSizeMTEBFeatures
BGE-M3BAAI10248K2.2GB63.0Multi-lingual/functional/granular, best Chinese
BGE-large-zh-v1.5BAAI10245121.3GB-Pure Chinese, lightweight
Qwen3-Embedding-8BAlibaba409632K16GB66.2Latest, best performance
Qwen3-Embedding-0.6BAlibaba102432K1.2GB58.5Lightweight, surpasses BGE-M3 at same size
jina-embeddings-v3Jina AI10248K1.2GB62.8Multi-task, adjustable dimensions
nomic-embed-textNomic7688K548MB59.3Open source free, local first choice
all-MiniLM-L6-v2SBERT38425680MB56.3Ultra lightweight, prototyping

Image Models

ModelSourceDimensionsFeatures
CLIP-ViT-L-14OpenAI768Highest accuracy
CLIP-ViT-B-32OpenAI512Fast
Chinese-CLIP-ViT-HOFA-Sys1024Chinese optimized
SigLIPGoogle1152Next generation, better performance

Cost Calculation

API Model Monthly Cost Estimate

Assumption: 1M documents, average 500 tokens/document

ModelIndexing CostQuery Cost (100k/month)Monthly Total
OpenAI small$10$2~$12
OpenAI large$65$13~$78
Cohere v4$50$10~$60
Voyage-3$30$6~$36
Voyage-3-lite$10$2~$12

Open Source Model Deployment Cost

ModelMinimum GPUCloud GPU Monthly Cost
BGE-M3RTX 3090 (24GB)~$150-300
Qwen3-0.6BRTX 3060 (12GB)~$80-150
all-MiniLMCPU$0

Selection Decision Tree

Start
  │
  ├─ Have GPU?
  │    ├─ No → API models
  │    │         ├─ Tight budget → OpenAI small / Voyage-lite
  │    │         ├─ Best results → Voyage-3-large / Cohere v4
  │    │         └─ General use → OpenAI large
  │    │
  │    └─ Yes → Open source models
  │              ├─ Mainly Chinese → BGE-M3 / Qwen3-Embedding
  │              ├─ Multilingual → BGE-M3
  │              ├─ Ultra lightweight → all-MiniLM / nomic-embed
  │              └─ Images → CLIP / Chinese-CLIP
  │
  └─ Special domain?
       ├─ Code → Voyage-code-3
       ├─ Legal → Voyage-law-2
       └─ Finance → Voyage-finance-2

Quick Code Examples

Local Model (Recommended for Beginners)

from sentence_transformers import SentenceTransformer

# Load model (auto-downloads on first use)
model = SentenceTransformer('BAAI/bge-large-zh-v1.5')

# Single encoding
text = "This is a sample text"
embedding = model.encode(text).tolist()

# Batch encoding (recommended)
texts = ["Text 1", "Text 2", "Text 3"]
embeddings = model.encode(texts, batch_size=32, normalize_embeddings=True)

API Model

from openai import OpenAI

client = OpenAI()  # Requires OPENAI_API_KEY

response = client.embeddings.create(
    model="text-embedding-3-small",
    input=["Text 1", "Text 2"]
)
embeddings = [item.embedding for item in response.data]

Detailed Integration Guides

See verticals/ directory for detailed integration for each model (registration, installation, code examples):

API Models

  • openai.md - OpenAI text-embedding-3
  • cohere.md - Cohere Embed v4
  • voyage.md - Voyage AI (general/code/legal/finance)
  • aliyun.md - Alibaba Cloud DashScope

Open Source Models

  • bge.md - BGE series (BAAI)
  • qwen-embedding.md - Qwen3-Embedding (Alibaba open source)
  • jina.md - Jina Embeddings
  • nomic.md - Nomic Embed
  • minilm.md - all-MiniLM (lightweight)

Image Models

  • clip.md - CLIP / Chinese-CLIP
  • siglip.md - SigLIP

FAQ

Q: Are more dimensions always better?

Not necessarily. More dimensions mean higher storage costs and slower search. 512-1024 dimensions are usually sufficient; 3072 dimensions are only necessary for extremely high precision scenarios.

Q: Can I mix different models in the same Collection?

No. The same Collection must use the same model, otherwise the vector spaces are different and cannot be compared.

Q: Must queries and documents use the same model?

Yes, queries and documents must be encoded with the same model.

Q: Does OpenAI work well for Chinese?

It works, but BGE-M3 / Qwen3-Embedding perform better for Chinese scenarios.


Related Tools

  • Batch processing: core:ray
  • Chunking strategy: core:chunking
  • Index management: core:indexing
  • Reranking: core:rerank

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

95/100Analyzed 2/11/2026

An exceptional technical reference for embedding model selection, featuring detailed performance metrics, cost analysis, decision logic, and implementation examples.

100
100
95
98
90

Metadata

Licenseunknown
Version-
Updated2/4/2026
Publisherzilliztech

Tags

apillm