"Embedding Is All You Need"
The most important factor in RAG is the embedding. The choice of embedding model determines retrieval quality, which directly drives the quality of the final response.
MTEB Benchmark
graph LR
A[MTEB Benchmark] --> B[Retrieval]
A --> C[Classification]
A --> D[Clustering]
A --> E[STS]
A --> F[Reranking]
A --> G[Summarization]
A --> H[PairClassification]
MTEB (Massive Text Embedding Benchmark) is the standard benchmark for evaluating embedding models across 7 tasks.
Korean Embedding Model Comparison
The Embedding-Is-All-RAG-Need repository benchmarks Korean embedding models against MTEB:
| Model | Retrieval | STS | Classification |
|---|---|---|---|
| multilingual-e5-large | 0.72 | 0.83 | 0.78 |
| ko-sbert-nli | 0.68 | 0.81 | 0.75 |
| bge-m3 | 0.74 | 0.85 | 0.80 |
| Custom (prj_ecellm) | 0.76 | 0.82 | 0.83 |
Key Takeaways
- General-purpose vs. domain-specific models: General-purpose models tend to excel at STS, but domain-specific models deliver better real-world retrieval performance.
- Dimensionality trade-offs: Higher dimensions (1024+) improve accuracy but increase storage costs and reduce retrieval speed.
- Korean performance gap: Many models show a significant drop in Korean performance compared to English.
Embedding Selection Guide for RAG
flowchart TD
A[임베딩 모델 선택] --> B{도메인 특화 필요?}
B -->|Yes| C[도메인 데이터로 파인튜닝]
B -->|No| D{한국어 비중?}
D -->|높음| E[bge-m3 또는 ko-sbert 계열]
D -->|낮음| F[e5-large 계열]
C --> G[prj_ecellm 방식 참고]
This project has only three commits, but it distills the lessons learned from working on prj_ecellm.