Embedding Model Comparison: OpenAI vs Cohere vs Open Source
Embedding Model Comparison: OpenAI vs Cohere vs Open Source
📖 Keep reading
from sentence_transformers import SentenceTransformer
import numpy as np
query = ""
docs = ["30", "iPhone15", "200"]
model = SentenceTransformer("BAAI/bge-large-zh-v1.5")
query_vec = model.encode(query)
doc_vecs = model.encode(docs)
scores = np.dot(doc_vecs, query_vec) / (
np.linalg.norm(doc_vecs, axis=1) * np.linalg.norm(query_vec)
)
for doc, score in zip(docs, scores):
print(f"{score:.3f} -> {doc}")
# 0.892 -> ...
# 0.451 ->
# 0.523 ->
|:----|:---:|:----:|:-------:| | text-embedding-3-small | 1536 || 62.1 | | text-embedding-3-large | 3072 || 64.5 | | BAAI/bge-large-zh-v1.5 | 1024 || 65.8 | | shibing624/text2vec | 768 || 63.2 | | Cohere embed-multilingual-v3 | 1024 || 63.9 |
Recommendations
Related Articles
2026-08-01
AI Security Tools Open Source 2026: 9 Projects to Protect Your LLM Stack
2026-08-28
Best AI Legal Research Assistant for Paralegals in 2026: 6 Tools That Cut Research Hours
2026-08-23
Best AI Website Builder in Kochi 2026: 6 Tools for Kerala Startups and Small Business
2026-08-12
AI Prompt Tools 2026: 9 Open Source Managers, Libraries and Playgrounds With Real Stars
2026-08-21
Best AI E-Signature Tool in Riga 2026: 6 Tools for Baltic Business
2026-08-19
Best AI Product Photo Generator in Lima 2026: 6 Tools for Peruvian E-commerce
Written by our editorial team; tools listed here are tested or verified against public sources. Links point to official sites or GitHub repos for reference only — no paid placements.