liveBook · Manning

Vectorization

As explained in Machine Learning Platform Engineering

An embedding model is a machine learning model that maps inputs such as text or images to numerical vector representations.

Vectorization turns text into numerical vectors so a retrieval system can search by meaning rather than exact wording. An embedding model maps semantically similar text to nearby points in vector space. A question about API credentials can therefore retrieve documentation about key rotation even when the words differ. section 12.1.3

In a retrieval-augmented generation (RAG) pipeline, vectorization appears at two points:

Reconnect an index for retrieval

Create the embedding component, load the persistent FAISS index with it, then call `vector_store.as_retriever()`. Use exactly the embedding model used to build the index: differences in dimensions, normalization, or model version can break retrieval. If loading requires FAISS’s dangerous-deserialization option, secure the index files and consider integrity checks. section 12.2.5

Listing 12.9 Persistent FAISS index and LangChain retriever
from langchain_community.vectorstores import FAISS
from index import GeminiEmbeddings

embeddings = GeminiEmbeddings()  #1
vector_store = FAISS.load_local(
    "DATA/faiss_index",
    embeddings=embeddings,
    allow_dangerous_deserialization=True  #2
)
retriever = vector_store.as_retriever()  #3

The listing shows where the embedding component is supplied when a persistent FAISS index is loaded and exposed through a LangChain retriever. section 12.2.5

How Machine Learning Platform Engineering covers it

How deep it goes
Explains text-to-vector mapping and indexing versus query-time retrieval, then addresses embedding compatibility without detailing model training.
Examples
Contrasts API-credential and key-rotation wording, then loads a persistent FAISS index with an embedding component.
What you can do after
Apply it via LangChain and FAISS to retrieve document chunks, while checking that query-time embeddings match the stored index.
How it connects
Connects embedding models with semantic search, vector databases, FAISS, retrievers, 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 Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.