Skip to content
[ aicodereview.io ]

AI & models · Updated 2026-09-17

Embeddings

Numeric vectors that represent text or code, so that similar things sit close together — the mechanism behind most codebase search in review tools.

Also called: Vector embeddings

What it is

An embedding model converts a chunk of code into a list of numbers. Chunks that mean similar things land near each other in that space, so “find code related to this diff” becomes a distance query rather than a text search.

What it is good and bad at

Good at semantic similarity: finding the other place your team implemented retry logic, even though the identifiers differ. Bad at exact structure: embeddings do not know that this function definitively calls that one. For structural questions, parsing and following real references beats vector search.

Strong retrieval usually combines both — vectors to cast a wide net, a code graph to be precise.

The question most people forget to ask

An embedding index is a derived copy of your source code, and it lives somewhere. For a hosted tool, that is the vendor’s infrastructure. How long it is retained, whether it is encrypted at rest, and whether it is deleted when you disconnect a repository are all reasonable questions, and they come up in security review more often than teams expect.

Common mistakes

  • Assuming the index refreshes instantly. Stale indexes produce confidently outdated review comments.
  • Overlooking indexing cost and time on a large monorepo during a trial.
  • Treating semantic search results as proof the tool understands your architecture.

[ Tools where this matters ]

[ Related terms ]

[ Read next ]

See which tools actually deliver this

Scored against 9 standards, with the source for every claim.

Open the directory [↗]