# Vector search

URL: /code/platform/vector-search · Id: `capability:vector-search`

> Vector search embeds Things and their parts and finds nearest neighbors for search, deduplication, matching and Memory.

Vector search embeds [Things](/business/nouns/thing) and their parts and finds their nearest neighbors. It powers meaning-based [search](/code/platform/search), duplicate detection, matching and [Memory](/business/nouns/memory).

## Contract
- A [Noun](/business/nouns/noun) declares which fields embed. Long text fields embed in chunks.
- An embedding is keyed by the hash of its source. Changing the source re-embeds it; nothing else does.
- The embedding model is a [Setting](/business/nouns/setting). Changing it rebuilds the index, and queries answer from the old index until the new one is complete.
- Vectors never leave the namespace that made them.
- `similar` returns the nearest Things with a score. `resolve` returns an existing Thing above a threshold or creates one, so an import never makes a duplicate.
- An [Agent](/business/nouns/agent) recalls its Memory by similarity, scoped to its own seat.
- Embeddings run through the [AI gateway](/code/platform/ai-gateway), so their [Cost](/business/nouns/cost) meters like any model call.

## Verbs
None.

## Interfaces
- [API](/code/api/reference)
- [SDK](/code/sdk/reference)
- [CLI](/code/cli/reference)
- [MCP](/code/mcp/reference)

## Example
```ts
// benchtalent.co places contract designers. Before it adds a résumé, it looks for the same person.
import { $ } from 'startup-builder'

const lookalikes = await $.search('Ana Ruiz, product designer, ana@ruiz.design', { limit: 5 })
```