Meet YOLO26: next-gen vision AI.
Ultralytics
Back to Ultralytics Glossary

Vector Search

Explore how vector search uses embeddings to find similar data. Learn to generate high-quality vectors with Ultralytics YOLO26 for precise information retrieval.

Vector search is a sophisticated method of information retrieval that identifies similar items within a dataset based on their mathematical characteristics rather than exact keyword matches. Unlike traditional keyword search, which relies on finding specific character strings, vector search analyzes the underlying semantic meaning of the data. This technique is fundamental to modern artificial intelligence (AI) applications because it allows computers to understand relationships between abstract concepts, processing unstructured data such as images, audio files, and natural language text with remarkable accuracy.

Link to this sectionHow Vector Search Works#

The core of vector search involves transforming raw data into high-dimensional numerical vectors known as embeddings. This process maps items to points in a multi-dimensional space where conceptually similar items are located close to one another.

  1. Vectorization: A deep learning (DL) model processes the input data—for example, an image of a dog—and outputs a feature vector. Advanced models like YOLO26 are often used to generate these rich feature representations efficiently.

  2. Indexing: To perform searches quickly, these vectors are organized using specialized algorithms, often stored in a dedicated vector database.

  3. Similarity Calculation: When a user submits a query, the system converts that query into a vector and measures the distance to stored vectors using metrics like cosine similarity or Euclidean distance.

  4. Retrieval: The system returns the "nearest neighbors," which represent the most contextually relevant results.

Link to this sectionPython Example: Generating Embeddings#

To implement vector search, you must first convert your data into vectors. The following code snippet demonstrates how to generate feature maps and embeddings from an image using the ultralytics package and a pre-trained YOLO26 model.

from ultralytics import YOLO

# Load a pre-trained YOLO26 classification model
model = YOLO("yolo26n-cls.pt")

# Generate feature embeddings for an image URL
# The 'embed' method returns the high-dimensional vector representation
results = model.embed("https://ultralytics.com/images/bus.jpg")

# Print the shape of the resulting embedding vector
print(f"Embedding vector shape: {results[0].shape}")

Link to this sectionReal-World Applications#

Vector search is the engine behind many intuitive features in today's software ecosystem, bridging the gap between computer vision (CV) and user intent.

  • Visual Recommendation Systems: In the sector of AI in retail, vector search powers "shop the look" features. If a customer likes a specific handbag, the system finds items with similar visual vectors—matching shape, texture, and style—creating a personalized recommendation system.
  • Retrieval-Augmented Generation (RAG): To enhance Large Language Models (LLMs), developers use vector search to retrieve relevant documents from a knowledge base. This provides context to the AI, reducing hallucinations and improving accuracy in chatbot interactions.
  • Anomaly Detection: By clustering vectors of "normal" operations, systems can identify outliers that drift far from the cluster. This is critical for anomaly detection in manufacturing quality control and data security.

It is helpful to differentiate vector search from similar terms to understand the full machine learning (ML) pipeline.

  • Vector Search vs. Semantic Search: Semantic search is the broader application of understanding user intent (the "what"). Vector search is the specific algorithmic method used to achieve this by calculating vector proximity (the "how").
  • Vector Search vs. Vector Database: A vector database is the infrastructure designed to store and manage embeddings at scale. Vector search is the process of querying that database to retrieve information.
  • Vector Search vs. Keyword Search: Keyword search matches exact text strings (e.g., "apple" matches "apple"). Vector search matches meaning, so "apple" might match "fruit" or "red," even if the words differ.

Link to this sectionIntegration with the Ultralytics Platform#

For teams building similarity search systems, managing datasets and training embedding models is a crucial first step. The Ultralytics Platform simplifies this workflow by providing tools for data management, cloud training, and model deployment. By ensuring your base models—whether for object detection or classification—are high-performing, you ensure the resulting vectors provide accurate and meaningful search results.

Explore solutions

Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Real-time AI that works with your team

AI in Robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Real-time AI that works with your team

AI in Logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Real-time AI that works with your team

AI in Retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Real-time AI that works with your team

AI in Healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Real-time AI that works with your team

AI in Manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Real-time AI that works with your operation

AI in Automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Real-time AI tailored to your operation

AI in Agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning