Vectorization
Vectorization is the transformation of data or computations into vector form so they can be processed collectively by vector-oriented operations.
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
- Uses vectorization to index documents and retrieve relevant context for RAG question answering.
- How deep it goes
- Explains ingestion and query workflows with working integrations, without detailing embedding model internals.
- Examples
- Illustrates semantic similarity with feline queries and implements document indexing for a Paestum tourism collection.
- What you can do after
- Apply it via LangChain, OpenAIEmbeddings, and Chroma to index document chunks for retrieval.
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 search over support questions and document chunks for retrieval-augmented applications.
- How deep it goes
- Walks through embedding generation, storage, similarity search, and document indexing, using an in-memory store to simplify the support example.
- Examples
- Uses an IT support knowledge base and a PDF document indexing workflow as practical examples.
- What you can do after
- Applies vectorization via the Vercel AI SDK and LangChain.js to generate embeddings and prepare content for 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
- Uses vectorization to prepare documents and queries for similarity search and retrieval-augmented generation.
- How deep it goes
- Works through TF-IDF vectorization and cosine scoring, then applies an embedding model in a RAG agent without detailing model internals.
- Examples
- Compares short documents with TF-IDF and indexes a chunked movie script for an agent to search.
- What you can do after
- Apply it via scikit-learn’s TfidfVectorizer to compare documents and search with a transformed query.
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
- Enables semantic retrieval of document context for RAG systems, including policy assistants.
- How deep it goes
- Explains semantic proximity and model-selection trade-offs, then implements chunk encoding and filtered vector search.
- Examples
- Uses health-care policy coverage questions and a medical-domain embedding model to illustrate retrieval.
- What you can do after
- Apply it via SentenceTransformer and Pinecone to encode policy chunks and search them with metadata filters.
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
- Uses text embeddings to find passages relevant to a user’s message for retrieval-augmented generation.
- How deep it goes
- Explains embeddings through a spatial analogy and similarity search, without describing embedding model internals.
- Examples
- Illustrates vector similarity with movies plotted by comedic value and explosions per hour.
- What you can do after
- Evaluate and understand how embeddings support semantic retrieval using a vector database.
Read how Build Python Web Apps with Streamlit explains vectorization →
Fast Python: High performance techniques for large datasets
- How it is used
- Recasts image and tabular calculations as array operations to reduce explicit element-by-element iteration.
- How deep it goes
- Compares loop and array approaches, explains broadcasting and np.vectorize limitations, and demonstrates a GPU kernel without detailing its C implementation.
- Examples
- Uses image brightening and grayscale conversion, taxi tip fractions, and Mandelbrot generation to illustrate vectorized calculations.
- What you can do after
- Apply it via NumPy and pandas, benchmark alternatives, and distinguish array operations from np.vectorize’s Python-level loop.
Read how Fast Python: High performance techniques for large datasets explains vectorization →
Grokking AI Applications
An embedding model converts text or other inputs into numerical vectors that represent their semantic properties.
- How it is used
- Uses document embeddings to prepare chunks for retrieval in a retrieval-augmented generation workflow.
- How deep it goes
- Explains converting text chunks into vectors and storing them, without detailing embedding internals.
- Examples
- Uses chunks from an extracted PDF as inputs to an embedding model.
- What you can do after
- Apply it via Langflow by connecting text chunks, an embedding model, and a vector database.
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
- Supports semantic document retrieval for standalone search and retrieval-augmented generation.
- How deep it goes
- Explains semantic proximity and model selection through informal similarity checks, then identifies optimization options without deriving model internals.
- Examples
- Uses similar dog-related sentences and compares model judgments on pairs of Confluence pages.
- What you can do after
- Evaluate/understand model choices and retrieval quality through similarity checks and RAG evaluation measures.
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
- Uses embeddings to connect queries with relevant documents in retrieval and RAG pipelines.
- How deep it goes
- Explains contextual versus static embeddings and walks through encoding and similarity comparison with a pretrained model.
- Examples
- Illustrates contextual meaning with “bank” and encodes sentences, queries, and documents for similarity comparisons.
- What you can do after
- Apply it via Sentence Transformers to encode queries and documents and compare them 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 →
Designing AI Systems
An embedding model is an AI model that converts content into numerical vector representations capturing semantic or learned relationships.
- How it is used
- Enables semantic retrieval by converting document chunks and queries into comparable vectors.
- How deep it goes
- Explains index configuration, batching, dimensionality tradeoffs, service integration, and model migration without detailing model internals.
- Examples
- Illustrates semantic matching with an opened-laptop return query and a passage about electronics restocking fees.
- What you can do after
- Operate/configure index-level embedding selection, batch generation, and migration to a new model.
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.
CUDA for LLMs
Vectorization is the organization of operations to process multiple data elements together using vector instructions or accesses.
- How it is used
- Processes neural-network batches together and widens GPU memory operations to reduce instruction count and improve bandwidth use.
- How deep it goes
- Traces batched gradient indexing and CUDA vector loads through alignment requirements and performance tradeoffs.
- Examples
- Demonstrates batched gradient updates, float4 GEMV and softmax kernels, and vectorized tiled loads with a scalar fallback.
- What you can do after
- Apply it via NumPy batch indexing or CUDA vector types, checking alignment and measuring kernel performance.
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 similarity search by converting documents into vectors whose representation determines measured semantic similarity.
- How deep it goes
- Demonstrates TF–IDF transformation and cosine-similarity use, then points toward more sophisticated methods without detailing them.
- Examples
- Uses short documents about skies, foxes, dogs, and food, and proposes comparing vectorization methods in semantic search.
- What you can do after
- Evaluate how TF–IDF compares with Word2Vec or BERT embeddings in semantic search.
GPU Programming with Triton
Vectorization is an optimization technique that performs one operation on multiple data elements using vector or SIMD instructions.
- How it is used
- Frames block-wide operations as the core way to express GPU kernel work in Triton.
- How deep it goes
- Explains block-wide vector operations and an eight-element addition, but does not equate them with single hardware instructions.
- Examples
- Uses two length-eight vectors split into blocks of four to illustrate vector addition.
- What you can do after
- Apply it via Triton by expressing a block's loads, computation, stores, and masks as vector operations.
Read how GPU Programming with Triton explains vectorization →
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 →
Also covered in
- Deep Learning with JAX
- Just Use Postgres!
- Software Engineering for Data ScientistsIn early access (MEAP)
- Graph Algorithms for Data Science
- Effective Conversational AI
- Essential GraphRAG
- Enterprise RAGIn early access (MEAP)
- Build an Advanced RAG Application (From Scratch)In early access (MEAP)
- Architecting an Apache Iceberg Lakehouse
- Build an AI Agent (From Scratch)
- Transfer Learning for Natural Language Processing
- Python Concurrency with asyncio
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- embeddingAn embedding is a numerical vector representation of an item in a feature space, encoding selected properties or relationships for computational tasks such as comparison or retrieval.
- similarity searchSimilarity search is a retrieval technique that finds or ranks items by their similarity to a query, often by comparing feature or vector representations under a similarity or distance measure.
- retrieval-augmented generationRetrieval-augmented generation is a technique that retrieves relevant information from external sources and supplies it as context to a generative model when producing an output.
Related concepts
- embeddingproduces · An embedding is a numerical vector representation of an item in a feature space, encoding selected properties or relationships for computational tasks such as comparison or retrieval.
- 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 their similarity to a query, often by comparing feature or vector representations under a similarity or distance measure.
- vectorproduces · A vector is an ordered collection of components representing an element of a vector space.
Questions about vectorization
What is vectorization?
Vectorization is the transformation of data or computations into vector form so they can be processed collectively by vector-oriented operations.
Which Manning books explain vectorization?
AI Agents and Applications, Build AI-Enhanced Web Apps, AI Agents in Action, Second Edition, Building Reliable AI Systems, Build Python Web Apps with Streamlit, Fast Python: High performance techniques for large datasets, Grokking AI Applications, Machine Learning Platform Engineering and 14 more.
What should I know before learning vectorization?
Manning books that teach vectorization usually introduce language model, embedding, similarity search and retrieval-augmented generation first.
What is the difference between vectorization and knowledge graph embedding?
Vectorization is the transformation of data or computations into vector form so they can be processed collectively by vector-oriented operations. Knowledge graph embedding is a technique that represents entities and relationships as low-dimensional vectors while preserving patterns expressed by valid triples.
What is vectorization also called?
Vectorization is also called vectorizing or vectorize.
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.





















