Repaso
EspaƱol
LLMs, RAG & agentsFoundationsLLM-06

What is an embedding?

Options

  1. A compressed copy of a document
  2. A hash that identifies a file
  3. The numeric id of a token
  4. A list of numbers (a vector) that represents the meaning of a text, so similar texts end up close together (Correct option)

Answer

A list of numbers (a vector) that represents the meaning of a text, so similar texts end up close together

Why

An embedding model turns a text into a vector of numbers. Texts with similar meaning get vectors that are close to each other, even if they use different words.

That makes it possible to search by meaning: embed the question, embed the documents, and look for the nearest vectors.

A hash is different: it changes completely when one letter changes and says nothing about meaning.

Remember

Embedding = a vector for meaning.

Key terms

Practice this question in Repaso