Back to Academy
A Latino educator and East Asian and Middle Eastern adult learners compare a riverbank query image with three candidates linked by sparse cyan similarity bands
AI KnowledgeCore27 Jul 2026· 2 min

Embeddings and Semantic Similarity

How models represent words, sentences, images, and documents as vectors—and why computational similarity is useful but never neutral or self-validating.

embeddingssemantic similarityvector search

Sources

Full lesson summary

Listen to Embeddings and Semantic Similarity

Audio summary

0:00/0:00

An embedding is a learned numerical representation of an item such as a word, sentence, image, learner response, or document. Instead of storing the item as a human-readable definition, a model maps it to a vector: an ordered list of numbers in a multidimensional space. Training adjusts these numbers so that relationships useful for an objective become easier to compute. Embeddings are therefore not neutral coordinates waiting to be discovered. Their geometry reflects the data, model architecture, and task used to learn them.

Semantic similarity is often estimated by comparing vectors. Cosine similarity measures the angle between two vectors, while dot product and distance-based measures capture related notions under different assumptions. Items with nearby representations may share topic, function, style, or usage. The meaning of “nearby” depends on the model. A space trained to predict neighboring words can organize language differently from one trained to match questions with relevant passages. Similarity is a model output, not a guarantee that two items are equivalent, true, or educationally appropriate. Different models can therefore produce different neighborhoods for the same material.

Some embeddings assign one vector to each token regardless of context. Contextual models instead create different representations for a token according to surrounding language, helping distinguish meanings such as “bank” beside a river and “bank” in finance. Sentence and document embeddings compress larger units into fixed-size vectors that support rapid comparison. Systems can index many vectors and retrieve nearest neighbors efficiently. This enables semantic search, clustering, recommendation, duplicate detection, and retrieval-augmented generation, where selected documents enter a model’s current context.

Compression creates trade-offs. A single vector cannot preserve every detail of a long text, and small wording or language changes may move an item unexpectedly. Training data can encode cultural stereotypes and uneven representation. High similarity can reflect superficial patterns or sensitive attributes rather than the concept an educator intends. Retrieval quality also depends on how text is divided, which model produces embeddings, how candidates are filtered, and how many results are returned. A plausible neighbor must still be checked against the original source and the task.

In education, embeddings can help learners find related explanations, group open responses for teacher review, or connect questions with a curated resource collection. Evaluation should use authentic queries and judge whether retrieved items are relevant, diverse, accurate, and useful for the intended learners. Teachers can make the mechanism visible with a small activity: ask students to predict which phrases should be close, inspect model-ranked neighbors, and explain surprising matches or omissions. This turns a hidden vector operation into a critical literacy exercise. Embeddings offer efficient relational structure, but people must define the purpose, inspect failures, protect sensitive information, and decide whether computational similarity represents the kind of meaning the learning task requires.