Vectorization
Vectorization is the representation of data or computations as vectors or arrays so they can be processed numerically or collectively.
AI Agents and Applications
An embedding model is a model that maps text or other data to numerical vectors representing semantic or contextual properties.
- How it is used
- Enables semantic retrieval of document chunks for RAG questions, even when query wording differs from stored text.
- How deep it goes
- Walks through chunk and query embedding workflows with Chroma examples, but does not explain embedding-model internals.
- Examples
- Uses a “feline animals” search and a Chroma query about Paestum's Doric temples to demonstrate semantic matches.
- What you can do after
- Apply it via LangChain's OpenAIEmbeddings and Chroma to index document chunks and retrieve relevant text for questions.
Read how AI Agents and Applications explains vectorization →
Build AI-Enhanced Web Apps
Vectorization is the transformation of content or features into numerical vector representations for computational processing.
- How it is used
- Enables semantic lookup by representing stored content and user queries as vectors for similarity comparison.
- How deep it goes
- Walks through embedding, storing, comparing, and returning matches in JavaScript; uses an in-memory store for the small example.
- Examples
- Uses a restaurant-menu analogy, password-reset question matching, and PDF document-chunk indexing.
- What you can do after
- Build it from scratch as a small JavaScript question matcher, or apply it via LangChain.js and HNSWLib for document retrieval.
Read how Build AI-Enhanced Web Apps explains vectorization →
AI Agents in Action, Second Edition
Vectorization is the transformation of documents or other data into numerical vector representations.
- How it is used
- Prepares document chunks and queries for similarity search that supplies context to retrieval-augmented generation.
- How deep it goes
- Works through TF-IDF and cosine similarity, then applies embeddings to script retrieval without detailing embedding-model internals.
- Examples
- Compares short sky and animal sentences, searches an in-memory document collection, and retrieves chunks from a movie script.
- What you can do after
- Build it from scratch with TF-IDF and cosine similarity, then apply embeddings and Chroma DB to script retrieval.
Read how AI Agents in Action, Second Edition explains vectorization →
Building Reliable AI Systems
A model that maps input content to numerical vectors that capture semantic properties.
- How it is used
- Powers semantic retrieval by mapping documents and queries into a shared vector space for RAG context selection.
- How deep it goes
- Explains vector-space proximity and similarity measures, then develops model selection, chunking, indexing, and query-time implementation rather than model-training internals.
- Examples
- Uses insurance and employee-policy questions, plus a medical-domain SentenceTransformer and Pinecone policy-search implementation.
- What you can do after
- Build it from scratch: encode policy chunks and queries, index vectors in Pinecone, filter results, and evaluate retrieval configurations.
Read how Building Reliable AI Systems explains vectorization →
Build Python Web Apps with Streamlit
A text embedding model is a machine-learning model that converts text into numerical vectors representing its semantic content.
- How it is used
- Enables retrieval of knowledge-base chunks similar to a user’s message for retrieval-augmented generation.
- How deep it goes
- Explains text vectors through an analogy and names the search tools, without detailing embedding-model internals.
- Examples
- Uses movies plotted by comedic value and explosions per hour to illustrate similarity.
- What you can do after
- Apply it via an OpenAI text embedding model and Pinecone to find similar knowledge-base entries.
Read how Build Python Web Apps with Streamlit explains vectorization →
Fast Python: High performance techniques for large datasets
- How it is used
- Replaces per-value Python iteration with array or column expressions when processing images and tabular data.
- How deep it goes
- Works through broadcasting, np.vectorize, pandas alternatives, and a GPU kernel; does not delve into the CUDA C listing.
- Examples
- Compares image brightening methods, tip-fraction calculations on trip data, and a CUDA C Mandelbrot generator.
- What you can do after
- Apply it via NumPy and pandas operations, checking calculation semantics and timing before treating vectorized syntax as a speedup.
Read how Fast Python: High performance techniques for large datasets explains vectorization →
Machine Learning Platform Engineering
An embedding model is a machine learning model that maps inputs such as text or images to numerical vector representations.
- How it is used
- Enables semantic retrieval of document chunks for RAG questions whose wording differs from the relevant documents.
- 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.
Read how Machine Learning Platform Engineering explains vectorization →
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.
- How it is used
- Enables meaning-based document retrieval for standalone search or retrieval-augmented generation.
- 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.
Read how The Art of AI Product Development explains vectorization →
Data Pipelines with Apache Airflow, Second Edition
Vectorization is the transformation of content into numerical vectors that capture features for computational comparison or retrieval.
- How it is used
- Enables meaning-based recipe retrieval by converting stored text and user questions into vectors for similarity search.
- How deep it goes
- Explains embeddings through a flavor-space analogy and configures a Weaviate vectorizer, but leaves embedding-model training details aside.
- Examples
- Uses nearby sushi and poke-bowl recipes, a lasagna question, and OpenAI-or-Azure Weaviate configuration.
- What you can do after
- Operate/configure it by selecting a Weaviate vectorizer and using the same embedding model for recipe and question vectors.
Read how Data Pipelines with Apache Airflow, Second Edition explains vectorization →
Transformers in Action
An embedding model maps inputs such as queries and documents to vector representations capturing semantic or other task-relevant relationships.
- How it is used
- Maps queries and documents to vectors for similarity-based retrieval and context selection in RAG.
- How deep it goes
- Explains static versus contextual embeddings and demonstrates encoding and cosine similarity; does not derive model training.
- Examples
- Uses two sentences to show embedding shape and paired queries and documents to show cosine-similarity scores.
- What you can do after
- Apply it via SentenceTransformer to encode inputs and compare query and document vectors with cosine similarity.
Knowledge Graphs and LLMs in Action
Featurization is the transformation of raw data or graph objects into numerical features suitable for machine-learning models.
- How it is used
- Turns graph structures into model-ready inputs for node classification, link prediction, and graph analysis.
- How deep it goes
- Explains manual, typed, and Node2Vec features through training, prediction, scaling, and metric evaluation.
- Examples
- Uses the Zachary Karate Club, degree vectors, Node2Vec embeddings, typed degree vectors, and confusion matrices.
- What you can do after
- Apply via NetworkX, Node2Vec, and classifier pipelines that transform, scale, train, predict, and evaluate graph features.
Read how Knowledge Graphs and LLMs in Action explains vectorization →
Natural Language Processing in Action, Second Edition
A vectorizer is a function or component that transforms text into numerical vectors.
- How it is used
- Turns text into numerical vectors for machine processing and applies array operations to speed up NLP computations.
- How deep it goes
- Defines text encoding and names count, term-frequency, and embedding vectors; demonstrates vectorized arithmetic but not vectorizer internals.
- Examples
- Compares loop-based arithmetic, array operations, and a dot product, then benchmarks vectorized and looping searches over HPR episodes.
- What you can do after
- Apply NumPy and pandas arithmetic to compute dot products and replace explicit loops.
Read how Natural Language Processing in Action, Second Edition explains vectorization →
MongoDB 8.0 in Action, Third Edition
An embedding model is a machine learning model that transforms text or other data into numerical vector representations.
- How it is used
- Enables similarity-based retrieval by converting stored content and incoming queries into vectors.
- How deep it goes
- Explains the conversion-and-search workflow and gives performance guidance, but does not detail embedding-model internals.
- Examples
- Uses vector database operations and a document-chunk retrieval workflow that supplies context to a language model.
- What you can do after
- Apply it via Atlas Vector Search by embedding data and queries with the same model and checking dimension-related performance costs.
Read how MongoDB 8.0 in Action, Third Edition explains vectorization →
LLMs in Production
Vectorization is the transformation of input data into numerical vector representations.
- How it is used
- Encodes documents, code, or prompts as vectors for similarity search and retrieval-augmented generation.
- How deep it goes
- Connects final-layer model representations to practical encoding, indexing, and nearest-neighbor retrieval.
- Examples
- Uses tweet data and Python coding instructions to encode records and retrieve nearby matches.
- What you can do after
- Apply vectorization with SentenceTransformer and store or search vectors using FAISS or Milvus.
Deep Learning with R, Third Edition
Data vectorization is the conversion of input data or targets into numerical tensors suitable for neural-network processing.
- How it is used
- Prepare data for neural networks by converting inputs and targets into tensors within the machine-learning workflow.
- How deep it goes
- Define tensor conversion and illustrate multi-hot encoding, but defer domain-specific preprocessing details for text and images.
- Examples
- Use multi-hot text encoding, already-vectorized digit and house-price data, and R array operations for addition and ReLU.
- What you can do after
- Apply data vectorization by converting raw inputs and targets into tensors and preprocessing them for neural-network use.
Read how Deep Learning with R, Third Edition explains vectorization →
Generative AI in Action
Vectorization is the transformation of data into numerical vectors suitable for computation, comparison, or model input.
- How it is used
- Prepares acquired and processed data for LLM compatibility within the grounding layer.
- How deep it goes
- Defines text conversion through embedding and vector management, without detailing implementation or mathematical derivation.
- What you can do after
- Evaluate embedding and vector-storage choices against data size, origin, change rate, and scalability needs.
AI Agents in Action
Vectorization is the transformation of data such as text into numerical vector representations.
- How it is used
- Supports document comparison, semantic search, and vector similarity search for agent memory and knowledge workflows.
- How deep it goes
- Demonstrates TF–IDF transformation and cosine comparison, then defers more sophisticated vectorization methods to exercises.
- Examples
- Uses short themed documents, cosine-similarity inspection, and semantic-search comparisons with Word2Vec or BERT embeddings.
- What you can do after
- Apply it via scikit-learn to vectorize documents and inspect their cosine similarities.
Deep Learning with Python, Third Edition
The process of converting data into vector form so it can be used by machine-learning code.
- How it is used
- Prepares raw inputs and targets as tensors that neural networks can process.
- How deep it goes
- Defines conversion to tensors and illustrates multi-hot and one-hot encoding, while deferring domain-specific preprocessing.
- Examples
- Uses integer-sequence text encoded as multi-hot arrays and categorical labels encoded as one-hot vectors.
- What you can do after
- Apply multi-hot encoding to text inputs or one-hot encoding to categorical labels.
Read how Deep Learning with Python, Third Edition explains vectorization →
Related concepts
- embeddingproduces · A numerical vector representation of an item or input that encodes features or relationships useful for computational tasks.
- knowledge graph embeddingcontrasts with · Knowledge graph embedding is a technique that represents entities and relationships as low-dimensional vectors while preserving patterns expressed by valid triples.
- similarity searchused by · Similarity search is a retrieval technique that finds or ranks items by comparing their representations with a query according to a similarity or distance measure.
- NumPyused by · NumPy is an open-source Python library for numerical computing that provides multidimensional arrays and operations on them.
- vectorproduces · A vector is an ordered collection of components representing an element of a vector space.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

















