Loading...
const docVectors = await embed('model-a', docs);
const queryVector = await embed('model-b', query);const EMBEDDING_MODEL = 'model-a';
const docVectors = await embed(EMBEDDING_MODEL, docs);
const queryVector = await embed(EMBEDDING_MODEL, query);Each model has its own vector space, so documents and queries must be embedded with the same model.
Semantic search, RAG retrieval, clustering, recommendations and duplicate detection: any task that compares meaning.
The model sets it. More dimensions can hold more detail but need more storage and slower search.
No. Mixed vectors give meaningless scores. Re-embed all documents when you switch models.