Skip to content
Innopulse Consulting
AI engineering

What is an embedding?

Short definition

An embedding is the representation of a text, image or other content as a numeric vector in which similar things sit close together. That makes similarity computable — the basis of semantic search and of RAG.

An embedding is the representation of content — usually a piece of text — as a vector, that is, a list of numbers. The purpose of that conversion is to turn similarity of meaning into a computable quantity: two texts that mean the same thing produce vectors that sit close together in space, even if they share no words at all.

Why that is useful

Classic full-text search compares character strings. It finds a document when the searched word appears in it and misses it when a synonym does. An embedding solves that, because it represents meaning rather than characters. A query about a notice period then also finds a document speaking of a termination date. That property is what makes embeddings the basis of semantic search and therefore the precondition for RAG.

How similarity is measured

Once query and documents are represented as vectors, their similarity is determined by comparing distance or angle. The most common measure is cosine similarity, which looks at the angle between two vectors and is therefore independent of their length. The result is a number by which hits can be ranked. What matters is the insight that this number expresses proximity rather than truth: the most similar hit is not necessarily the right one, only the nearest.

Chunking: the underrated decision

Before text becomes vectors it must be split into pieces, because embedding models process only limited amounts of text. That split determines later quality more than the choice of model. Pieces that are too small lose their context, so a hit comes back without the surroundings that made it meaningful. Pieces that are too large dilute the meaning, because one vector then averages several topics and fits none of them well. Sensible boundaries follow the structure of the document — sections, chapters, logical units — rather than a fixed character count.

Consistency of the model

A vector is only comparable within the same model. If documents are embedded with one model and queries with another, the results are worthless without any error appearing — the system keeps returning hits, just wrong ones. Changing model therefore always means re-embedding the entire corpus. That cost belongs in the plan, because on large corpora it is substantial.

Limits

Embeddings represent similarity of meaning, not correctness and not currency. An outdated paragraph is just as similar as a current one if it covers the same topic. Nor do they reliably represent negation: a text denying something sits close to a text affirming it. Where those distinctions matter, additional filters over metadata are needed — date, version, validity — rather than trust in similarity alone.

Practical consequence

Anyone building semantic search sensibly spends most of the time not on model choice but on chunking and metadata. Both determine hit quality more strongly, are independent of the model, and survive a model change.

AI engineering is our specialty

Innopulse doesn't just explain terms — we put them into practice for DACH companies.