liveBook · Manning

Embedding

As explained in Build Applications with Local AI Models on a Mac

An embedding is a numerical vector representation of an item, such as text, positioned to capture aspects of its meaning or features.

An embedding represents text as a list of numbers, called a vector, that captures aspects of its meaning. An embedding model converts a document or question into a vector so a computer can compare it with others. section 16.1.2

Similar meaning, different words

The words “dog” and “puppy” have similar meanings, so their vectors would be very similar even though the words themselves differ. This helps a search find relevant content without relying on exact keyword matches. section 16.1.2

In retrieval-augmented generation (RAG), embeddings help find documents relevant to a question:

  • An embedding model converts documents and the user’s question into vectors. section 16.1.2
  • A similarity search finds document vectors closest to the question’s vector. section 16.1.2

How Build Applications with Local AI Models on a Mac covers it

How deep it goes
Defines vectors and embedding models and describes similarity search, without detailing how embeddings are computed.
Examples
Uses “dog” and “puppy” to illustrate similarity between words with different spellings.
What you can do after
Understand how a question can retrieve relevant documents through vector comparison.
How it connects
Connects embeddings with RAG, similarity search, vector databases, and retrieval pipelines.

Also explained in

Compare how 51 books explain embedding →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Applications with Local AI Models on a Mac. The section links point to the parts of the book it draws on.