β All models Β· EmbeddingGemma 2
use case Β· basics
The fundamental move of an embedder is turning two passages into vectors and measuring the angle between them (cosine 1.00 = identical direction, near 0 = unrelated). Because EmbeddingGemma 2 is instruction-prompted, the exact same text produces genuinely different vectors when embedded as a search query, a stored document, or a classification target. Compare two passages below to inspect the cosine number and measure how each task prefix moves the vector on your own sentences.
What am I looking at? In EmbeddingGemma 2, a task prefix is not an internal configuration flag
or model mode β it is literal text prepended to the input (e.g. task: search result | query: β¦).
Because the prefix becomes part of the token sequence, it consumes context tokens and directly alters the
resulting 768-dimensional unit vector.