How Vector Embeddings Work — An Interactive Primer
Vector Embeddings · Explained Interactively

Turning meaning
into coordinates.

Embeddings are how modern AI converts language and concepts into numbers, so that ideas with similar meaning end up near each other in space. As you scroll down, the five hands-on modules below use the IAB Tech Lab Content Taxonomy as a framework to demonstrate how embeddings enable contextual advertising in practice.

Begin
01 — Meaning as Numbers

Every concept becomes a list of numbers.

An embedding represents a concept as a vector, a fixed-length list of numbers, where each number is a coordinate along some learned dimension of meaning. Pick a content category below and watch its vector light up. Add a second one to compare: related categories produce visibly similar shapes.

These are 14 dimensions chosen for legibility. Production embedding models use hundreds or thousands of dimensions, and the meaning of each is learned automatically rather than hand-labelled.

02 — The Semantic Map

Similar things land near each other.

If we project those high-dimensional vectors down to two dimensions (using Principal Component Analysis), we get a map of meaning. Categories cluster by topic without anyone telling them to.

Principal Component Analysis (PCA) takes data described by many features and finds the few core directions that capture most of the variation. It flattens a complex, high-dimensional mess into a simplified map, revealing hidden clusters and relationships, while making the data much faster and easier for AI models to process.

Imagine trying to take a single 2D photograph of a complex, 3D statue. You walk around the statue to find the exact angle that captures the most detail, shape, and shadow. That’s what PCA does. It finds the single best angle to take a picture of an incredibly complex dataset so humans can look at the photo and understand the whole shape.

Click any point to see its nearest neighbours and how strongly they relate.

Tip: hover a point to highlight it, click to lock its neighbourhood.

This is an honest PCA projection of the same vectors from Module 1, so two dimensions can't capture everything. The neighbour lines use the full-dimensional vectors, which is why some "close" relationships connect points that look far apart on the flattened map.

03 — Measuring Closeness

How we score similarity: the cosine.

Closeness is measured by the angle between two vectors, expressed as cosine similarity, 1.0 means pointing the same way (near-identical meaning), 0 means unrelated. The magnitude of a vector is ignored, only its direction matters.

Cosine similarity measures how much two things have in common by comparing their profiles, for example, how much each leans toward sports, cooking, or travel, rather than their size. A high score means they care about the same stuff and belong together; a low score means they're about different things. That way, a small, focused audience can match a small, focused piece of content just as strongly as two big ones would.

Cosine similarity compares items like documents or products. It converts their features into lists of numbers, then measures how much these lists match. The result ranges from 1.0 (pointing the same way, essentially identical) down to 0 (unrelated) or even -1.0 (complete opposites).

Try a pair
04 — Vector Arithmetic

You can do math on meaning.

Because relationships live in the geometry, you can add and subtract concepts. The classic example: take Luxury Vehicles, remove the idea of Automotive, and what's left is roughly "premium intent." Add it to Travel and you land on Luxury Travel. Build your own equation below.

Presets
05 — Contextual Classification

Why this matters for advertising.

Embed a page's content, then find the nearest taxonomy categories by cosine similarity, that is contextual classification. It maps free-form editorial to a standard taxonomy without third-party cookies or personal identifiers. Type a headline or pick an example article.

Example articles
The same machinery powers semantic targeting, brand-safety, lookalike modelling and retrieval. Map it onto a shared vocabulary like the IAB Tech Lab Content Taxonomy and the output is portable across the entire programmatic supply chain.

References & standards

This primer frames embeddings around real category labels from the IAB Tech Lab Content Taxonomy, the industry-standard vocabulary maintained by IAB Tech Lab for classifying digital content.

Note on fidelity: the vectors in this demo are illustrative and hand-crafted for teaching clarity, not outputs of a production embedding model, and the dimensions are simplified to 14 for legibility. Real models learn their dimensions from data and use far higher dimensionality. Category names are drawn from the IAB Tech Lab Content Taxonomy and used here for educational illustration. For authoritative definitions, taxonomy versions and tier structures, consult the official sources above.