技能 embedding-strategies
📦

embedding-strategies

安全

Optimize Embeddings for Semantic Search

也可從以下取得: wshobson

This skill helps developers choose and implement the right embedding models for vector search, providing code templates for OpenAI, Sentence Transformers, and domain-specific pipelines.

支援: Claude Codex Code(CC)
🥉 75 青銅
1

下載技能 ZIP

2

在 Claude 中上傳

前往 設定 → 功能 → 技能 → 上傳技能

3

開啟並開始使用

測試它

正在使用「embedding-strategies」。 How do I choose between text-embedding-3-large and text-embedding-3-small?

預期結果:

  • text-embedding-3-large: 3072 dimensions, 8191 tokens - Best for high accuracy needs
  • text-embedding-3-small: 1536 dimensions, 8191 tokens - Cost-effective option
  • Choose large for complex semantic tasks, small for high-volume applications

正在使用「embedding-strategies」。 What is the best chunking strategy for code?

預期結果:

  • Use tree-sitter to parse code structure
  • Chunk by functions, classes, and methods
  • Include surrounding context for better retrieval
  • Consider language-specific separators

安全審計

安全
v1 • 2/24/2026

This skill provides educational content about embedding strategies for RAG applications. All static findings are false positives: code blocks are markdown documentation examples, URLs are legitimate documentation links, and no cryptographic algorithms or system reconnaissance behavior is present. Safe for publication.

1
已掃描檔案
494
分析行數
0
發現項
1
審計總數
未發現安全問題
審計者: claude

品質評分

38
架構
100
可維護性
87
內容
50
社群
100
安全
100
規範符合性

你能建構什麼

Build RAG Applications

Set up embedding pipelines for retrieval-augmented generation with optimal chunking and model selection

Compare Embedding Models

Evaluate different embedding models based on dimensions, cost, and performance for specific domains

Optimize Vector Search

Improve semantic search quality through proper preprocessing, chunking, and embedding configuration

試試這些提示

Basic Embedding Setup
Show me how to get started with OpenAI embeddings for a RAG application. Include batching and dimension reduction.
Local Embedding Models
How do I set up local embedding models using sentence-transformers? Include BGE and E5 models with proper preprocessing.
Chunking Strategy
What chunking strategy should I use for technical documentation? Include token-based, sentence-based, and semantic approaches.
Quality Evaluation
How do I evaluate the quality of my embeddings for retrieval? Show metrics like precision, recall, MRR, and NDCG.

最佳實務

  • Match embedding model to your specific use case (code, prose, multilingual)
  • Normalize embeddings when using cosine similarity for retrieval
  • Cache embeddings to avoid recomputing for repeated queries

避免

  • Using the wrong model for your domain (e.g., general embeddings for code)
  • Ignoring token limits which causes truncation and lost information
  • Mixing embedding models in production which creates incompatible vector spaces

常見問題

What is the best embedding model for RAG?
text-embedding-3-small offers the best balance of cost and quality for most RAG applications. Use text-embedding-3-large when maximum accuracy is required.
How do I handle long documents?
Split documents into chunks using token-based or semantic chunking. Aim for 256-512 tokens per chunk with overlap to preserve context.
Can I use embeddings offline?
Yes, use sentence-transformers models like BGE or E5. They run locally but require more setup and computational resources.
How do I reduce embedding dimensions?
OpenAI's text-embedding-3 models support native dimension reduction. For other models, use PCA or Matryoshka Representation Learning.
What metrics should I track?
Track precision@k, recall@k, MRR, and NDCG for retrieval quality. Also monitor latency and cost per embedding.
How do I handle multilingual content?
Use multilingual models like multilingual-e5-large or OpenAI's newer models which support 100+ languages natively.

開發者詳情

檔案結構

📄 SKILL.md