AI Concepts

What is an embedding?

An embedding is a fixed-length vector that represents the meaning of text (or an image) so similar items sit close together in vector space. Embeddings power semantic search, clustering, deduplication and RAG retrieval. Plugsky serves embedding models — including multilingual options — through a live OpenAI-compatible /v1/embeddings endpoint.

Key facts

DefinitionA fixed-length numeric vector encoding the meaning of content
Why it mattersEnables semantic search and RAG retrieval beyond keyword matching
How Plugsky implements itLive /v1/embeddings endpoint with dedicated embedding models
DimensionsVectors have fixed dimensions set by the model; larger is not automatically better
SimilarityCosine similarity is the common measure; distances are only comparable within one model
MultilingualMultilingual embedding models are available for cross-language retrieval
Common usesSearch, clustering, deduplication, classification and RAG
Cost driverEmbedding cost tracks input tokens and is far lower than chat generation

TL;DR

  • An embedding turns meaning into coordinates.
  • Never mix vectors from different embedding models.
  • Normalize text before embedding so similar content matches.
  • Chunk for retrieval, not for token limits.
  • Re-embed the whole corpus when you change models.

How it works, step by step

  1. Choose an embedding model for your languages and dimension budget.
  2. Normalize and clean text; strip boilerplate that would pollute the vector.
  3. Call the embeddings endpoint in batches and store vectors with metadata.
  4. Use cosine similarity for comparison and validate on a labeled query set.
  5. Tune chunk size and overlap by measuring retrieval recall, not intuition.
  6. Re-embed everything when you upgrade the embedding model.
1Choose an embeddingmodel for yourlanguages and2Normalize and cleantext; stripboilerplate that3Call the embeddingsendpoint in batchesand store vectors4Use cosinesimilarity forcomparison and5Tune chunk size andoverlap bymeasuring retrieval6Re-embed everythingwhen you upgradethe embedding

Try it yourself

Open the embedding model comparison →

How embeddings work

An embedding model maps content to a vector — often hundreds or thousands of floats — positioned so that semantically similar inputs land near each other. You cannot read meaning off individual coordinates, but distances and angles between vectors are meaningful. Cosine similarity between two vectors is the standard measure, which is why normalized embeddings and consistent preprocessing matter so much.

Practical uses

  • Semantic search: find documents by meaning, not keywords.
  • RAG retrieval: select passages to ground a model's answer.
  • Deduplication: find near-identical records or content.
  • Clustering: group untagged items by topic.
  • Classification: nearest-example labels without training a model.

All of these depend on consistent preprocessing: the same model, the same normalization and the same chunking for both index and query.

Common mistakes

  • Embedding documents with one model and queries with another, mixing vector spaces.
  • Comparing raw distance values across different models or datasets.
  • Chunking at arbitrary fixed sizes that split tables or code blocks.
  • Embedding noisy boilerplate — navigation, footers, templates — alongside content.
  • Assuming a higher-dimension model is better without measuring retrieval quality.

Embeddings on Plugsky

Plugsky serves embeddings through a live OpenAI-compatible /v1/embeddings endpoint, so existing SDK code works after a base URL change. Dedicated embedding models, including multilingual options, cover cross-language search and domain content. Embeddings pair naturally with live chat completions for RAG: embed and index with Plugsky, retrieve in your store of choice, then generate grounded answers with citations. Use the comparison tool to weigh dimension, language coverage and retrieval quality before committing.

Version your embedding model choice with the index so migrations stay traceable.

Honest comparison

TaskEmbeddingsKeyword searchLLM classification
Matches meaningYesNo — literal termsYes
Cost per itemVery lowVery lowHigh
Works on unseen labelsYesYesDepends on prompt
Needs an indexYesYesNo
Best forSemantic search and RAGExact term lookupReasoned judgment

Frequently asked questions

What is an embedding?

A numeric vector that represents the meaning of content, positioned so that similar items are close together, enabling semantic comparison and retrieval by machine.

What is the difference between embeddings and fine-tuning?

Embeddings add searchable representation without changing a model. Fine-tuning changes model behavior. Retrieval systems use embeddings; behavior changes use training.

How many dimensions should I use?

Whatever the chosen model provides. More dimensions mean more storage and slower search, not automatically better retrieval — measure recall on your data before choosing.

Can I compare embeddings from different models?

No. Each model defines its own vector space, so similarity scores are only meaningful within one model. Migrating models requires re-embedding the corpus.

Are embeddings private?

They are derived from your data and deserve the same protection as the source content. Private deployment options keep embedding traffic inside your network.

Does Plugsky support multilingual embeddings?

Yes. Multilingual embedding models are available in the catalogue, which suits cross-language search and Arabic-language retrieval use cases.