liveBook · Manning

Embedding

As explained in Delivering Machine Learning Projects: From design to deployment

An embedding is a numerical vector representation that encodes meaningful properties of an input for comparison or downstream computation.

An embedding represents an unstructured data item as a large, ordered vector of floating-point numbers. Its coordinates locate the item in a model-defined conceptual space, making the data suitable for exploratory analysis and similarity operations. section 6.1.4

Use embeddings to:

  • Generate vectors for all or a reasonable subset of photos, text, or other unstructured records with a foundational model. section 6.1.4
  • Project high-dimensional vectors with t-SNE or PCA to inspect the distribution of data items, while treating information loss as a risk. section 6.1.4
  • Index vectors with FAISS or Annoy and use nearest-neighbor queries to extract structure from a corpus. section 6.1.4

Exploring Shakespeare

Encode Shakespeare’s plays with all-MiniLM-L12-v2, then inspect nearest-neighbor connections or significant links between plays. section 6.1.4

array([ 8.19933936e-02,  9.97491628e-02,  6.05560839e-02,  6.95289299e-02,
       4.54569124e-02, -5.78593016e-02,  2.58211885e-02, -5.37960902e-02,
       1.54499486e-02,  1.98997390e-02,  3.31314690e-02,  4.48754244e-02,
      -1.08558014e-02,  2.36593257e-03, -1.36038102e-03,  5.81134520e-02,
       4.76119894e-04,....

= Indeed, there is Fortune too hard for Nature, when
    Fortune makes Nature’s natural the cutter-off of
    Nature’s wit.

Inspect a sample embedding alongside the text it represents; the raw coordinates are not directly useful without indirect analysis. section 6.1.4

How Delivering Machine Learning Projects: From design to deployment covers it

How deep it goes
Defines vector generation and typical dimensionality, but stops short of making raw coordinates directly interpretable.
Examples
Uses EfficientNet, BERT-derived models, Shakespeare’s plays, heat maps, FAISS, and Annoy as concrete exploration artifacts.
What it assumes
Assumes familiarity with unstructured data and foundational models while treating direct vector interpretation as unnecessary.
What you can do after
Apply it via foundational models and indexing tools to visualize or query structure in an unstructured corpus.
How it connects
Connects foundational models, dimensionality reduction, PCA, t-SNE, vector indexing, and nearest-neighbor search.

Also explained in

Compare how 47 books explain embedding →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Delivering Machine Learning Projects: From design to deployment. The section links point to the parts of the book it draws on.