liveBook · Manning

Latent space

As explained in Build AI-Enhanced Web Apps

An embedding space is a continuous mathematical space in which embeddings are positioned so that distances or relationships represent properties of the underlying data.

A latent space, or embedding space, is a continuous mathematical space where data becomes vectors. Distances and relationships between vectors represent properties of the underlying data, making similarity search possible. section 5.4.1

A practical embedding workflow uses:

  • A user query converted into a query vector. section 5.4.1
  • Known items represented as precomputed vectors in the same space. section 5.4.1
  • Similarity search that compares distances and ranks the closest items. section 5.4.1
  • Attributes such as “pasta” or “creamy” acting as dimensions that influence each vector’s position. section 5.4.1
Figure 5.8 The concept of embeddings using a restaurant menu analogy. The “embedding space” represents a multidimensional space where both customer orders (queries) and menu items are mapped as vectors. Each menu item (e.g., spaghetti carbonara) is a precomputed vector, while the customer order is converted to a query vector. Similarity between items is determined by their proximity in this space. Attributes like “pasta” or “creamy” represent dimensions of the embedding space. A similarity search finds the closest match and items similar to the query, mirroring how embedding-based systems in machine learning find relevant results for given inputs.

Use the restaurant-menu diagram to trace how a query and menu items become vectors, then how proximity produces similar results. section 5.4.1

How Build AI-Enhanced Web Apps covers it

How deep it goes
Explains vectors, attributes, proximity, and ranking through an implementation-oriented analogy.
Examples
Uses restaurant dishes, a cat embedding, and projected word-embedding neighbors.
What you can do after
Apply via similarity search to rank known items against a query vector.
How it connects
Connects embeddings with vectors, attributes, similarity search, and word embeddings.

Also explained in

Compare how 18 books explain latent space →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI-Enhanced Web Apps. The section links point to the parts of the book it draws on.