Vector
An ordered list of numbers, read as an arrow from the origin: its direction and length can be compared with other vectors.
Background conceptGlossary entry
On this page
A vector is an ordered list of numbers, such as (0.6, 0.8). Read it as an arrow from the origin to that point: 0.6 along the first axis, 0.8 along the second. Every vector has a direction (where the arrow points) and a length, √(0.6² + 0.8²) = 1.
The embeddings used in search are vectors with hundreds or thousands of numbers instead of two. You can’t draw them, but the same two properties apply, and every similarity measure is built from them: the dot product, cosine similarity (direction only) and Euclidean distance (how far apart the tips are).
A worked example in two dimensions. The question vector q = (0.6, 0.8) and two passage vectors p₁ = (0.8, 0.6) and p₂ = (−0.6, 0.8), all length 1:
q · p₁ = 0.6×0.8 + 0.8×0.6 = 0.96 nearly the same direction
q · p₂ = 0.6×(−0.6) + 0.8×0.8 = 0.28 much wider angle
p₁ is the better match. Vector search is this calculation repeated over every stored passage, with an index to avoid actually visiting them all.
The gotcha: a vector’s numbers are coordinates, not features. In an embedding, the 17th number doesn’t mean anything on its own and can’t be read or edited by hand. Only comparisons between vectors from the same model mean anything.
In DocSlurp
Background concept
Chunk embeddings are stored as float vectors in LanceDB, one table per project, model and dimension count (core/packages/shared/src/vector-namespace.ts). Visual Pages store page vectors as sign bits plus int8 values (core/server/src/search/deferred/page-vector-locator.ts).