liveBook · Manning

Vectorization

As explained in The Art of AI Product Development

An embedding model is a machine-learning model that maps text or other inputs to numeric representations in an embedding space.

A content-generation app needs to find useful passages across Google Drive and Confluence, even when a user’s wording differs from the documents. Vectorization turns text into numeric embeddings for semantic search: an embedding model places similar meanings close together and different meanings farther apart. The resulting representations can be stored and searched to retrieve relevant content. section 7.2.2

Similar wording, nearby representations

“I adore my dog,” “I love my dog,” and “I like my dog” cluster together in an embedding space. In a document-search trial, pairs of Confluence pages judged similar by different models were inspected by eye; MiniLM gave the most convincing results among the options tested. That quick check helped choose a model for a baseline, not establish that retrieval was fully reliable. section 7.2.2

Treat vectorization as one decision in a retrieval pipeline:

  • Choose what to represent. Document lengths vary, so split content into retrievable chunks; sentence, semantic, or hierarchical chunking may suit different document types. section 7.2.2 section 7.2.4
  • Compare embedding models against representative content, then store the resulting embeddings in a database for search. Open-source models offer a route to lower cost and more customization; fine-tuning can wait until the end-to-end pipeline works. section 7.2.2
  • Refine retrieval when results miss the mark. Adjust chunk size and embedding models, and consider metadata filters or lexical search for more precise matches. section 7.2.4 section 7.4

In retrieval-augmented generation, retrieved documents provide context for a language model’s response. A good-looking cluster of embeddings is therefore only an early signal: assess whether retrieved context is relevant and whether generated answers are grounded and relevant to the question. section 7.2.2 section 7.4

How The Art of AI Product Development covers it

How deep it goes
Explains semantic proximity and model trials, then addresses storage and retrieval refinements without embedding mathematics or implementation code.
Examples
Illustrates sentence clustering and compares Doc2Vec, MiniLM, and Universal Sentence Encoder using Confluence pages.
What you can do after
Evaluate/understand it by comparing embedding models on representative documents and identifying chunking or retrieval changes when search results disappoint.
How it connects
Connects semantic search to document chunking, embedding databases, metadata filters, lexical search, and retrieval-augmented generation.

Also explained in

Compare how 18 books explain vectorization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.