Embedding Strategies

Embedding Strategies

Helps choose and optimise embedding models and chunking strategies for semantic search and RAG, with a model comparison and worked examples.

Skill files2 files

references/

SKILL.md66 lines
1
---
2
name: embedding-strategies
3
description: 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.
4
---
5
6
# Embedding Strategies
7
8
Guide to selecting and optimizing embedding models for vector search applications.
9
10
## When to Use This Skill
11
12
- Choosing embedding models for RAG
13
- Optimizing chunking strategies
14
- Fine-tuning embeddings for domains
15
- Comparing embedding model performance
16
- Reducing embedding dimensions
17
- Handling multilingual content
18
19
## Core Concepts
20
21
### 1. Embedding Model Comparison (2026)
22
23
| Model | Dimensions | Max Tokens | Best For |
24
| -------------------------- | ---------- | ---------- | ----------------------------------- |
25
| **voyage-3-large** | 1024 | 32000 | Claude apps (Anthropic recommended) |
26
| **voyage-3** | 1024 | 32000 | Claude apps, cost-effective |
27
| **voyage-code-3** | 1024 | 32000 | Code search |
28
| **voyage-finance-2** | 1024 | 32000 | Financial documents |
29
| **voyage-law-2** | 1024 | 32000 | Legal documents |
30
| **text-embedding-3-large** | 3072 | 8191 | OpenAI apps, high accuracy |
31
| **text-embedding-3-small** | 1536 | 8191 | OpenAI apps, cost-effective |
32
| **bge-large-en-v1.5** | 1024 | 512 | Open source, local deployment |
33
| **all-MiniLM-L6-v2** | 384 | 256 | Fast, lightweight |
34
| **multilingual-e5-large** | 1024 | 512 | Multi-language |
35
36
### 2. Embedding Pipeline
37
38
```
39
Document → Chunking → Preprocessing → Embedding Model → Vector
40
↓
41
[Overlap, Size] [Clean, Normalize] [API/Local]
42
```
43
44
## Templates and detailed worked examples
45
46
Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.
47
48
## Best Practices
49
50
### Do's
51
52
- **Match model to use case**: Code vs prose vs multilingual
53
- **Chunk thoughtfully**: Preserve semantic boundaries
54
- **Normalize embeddings**: For cosine similarity search
55
- **Batch requests**: More efficient than one-by-one
56
- **Cache embeddings**: Avoid recomputing for static content
57
- **Use Voyage AI for Claude apps**: Recommended by Anthropic
58
59
### Don'ts
60
61
- **Don't ignore token limits**: Truncation loses information
62
- **Don't mix embedding models**: Incompatible vector spaces
63
- **Don't skip preprocessing**: Garbage in, garbage out
64
- **Don't over-chunk**: Lose important context
65
- **Don't forget metadata**: Essential for filtering and debugging
66

© Seth Hobson · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…