Vector Search
벡터 검색이 임베딩을 사용하여 유사한 데이터를 찾는 방법을 알아봅니다. 정밀한 정보 검색을 위해 Ultralytics YOLO26으로 고품질 벡터를 생성하는 방법을 배웁니다.
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 sectionVector Search 작동 방식#
Vector search의 핵심은 원시 데이터를 embeddings라고 알려진 고차원 수치 벡터로 변환하는 것입니다. 이 프로세스는 개념적으로 유사한 항목이 서로 가깝게 위치하는 다차원 공간의 점으로 항목을 매핑합니다.
-
Vectorization: deep learning (DL) 모델이 입력 데이터(예: 개 이미지)를 처리하고 특징 벡터를 출력합니다. YOLO26과 같은 고급 모델은 이러한 풍부한 특징 표현을 효율적으로 생성하는 데 자주 사용됩니다.
-
Indexing: 검색을 신속하게 수행하기 위해 이러한 벡터들은 전문적인 알고리즘을 사용하여 정리되며, 종종 전용 vector database에 저장됩니다.
-
Similarity Calculation: 사용자가 쿼리를 제출하면 시스템은 해당 쿼리를 벡터로 변환하고 cosine similarity 또는 Euclidean distance와 같은 메트릭을 사용하여 저장된 벡터와의 거리를 측정합니다.
-
Retrieval: 시스템은 가장 맥락적으로 관련성이 높은 결과를 나타내는 "최근접 이웃"을 반환합니다.
Link to this sectionPython 예시: 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 section실제 애플리케이션 사례#
Vector search는 오늘날 소프트웨어 생태계의 많은 직관적인 기능들을 뒷받침하는 엔진이며, computer vision (CV)와 사용자 의도 사이의 격차를 해소합니다.
- Visual Recommendation Systems: AI in retail 분야에서 vector search는 "shop the look" 기능을 지원합니다. 고객이 특정 핸드백을 좋아하면 시스템은 모양, 질감, 스타일이 일치하는 시각적 벡터가 유사한 항목을 찾아 개인화된 recommendation system을 구축합니다.
- Retrieval-Augmented Generation (RAG): Large Language Models (LLMs)을 향상시키기 위해 개발자들은 vector search를 사용하여 지식 기반에서 관련 문서를 검색합니다. 이는 AI에 맥락을 제공하여 chatbot 상호작용의 환각을 줄이고 정확도를 향상시킵니다.
- 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.
Link to this section관련 개념 구분#
전체 machine learning (ML) 파이프라인을 이해하기 위해 vector search를 유사한 용어와 구별하는 것이 도움이 됩니다.
- Vector Search vs. Semantic Search: Semantic search는 사용자 의도("무엇")를 이해하는 더 광범위한 애플리케이션입니다. Vector search는 벡터 근접성("어떻게")을 계산하여 이를 달성하는 데 사용되는 구체적인 알고리즘 방법입니다.
- Vector Search vs. Vector Database: Vector database는 규모에 맞게 embeddings를 저장하고 관리하도록 설계된 인프라입니다. Vector search는 정보를 검색하기 위해 해당 데이터베이스를 쿼리하는 프로세스입니다.
- Vector Search vs. Keyword Search: Keyword search는 정확한 텍스트 문자열을 일치시킵니다(예: "apple"은 "apple"과 일치). Vector search는 의미를 일치시키므로 단어가 다르더라도 "apple"이 "fruit" 또는 "red"와 일치할 수 있습니다.
Link to this sectionUltralytics 플랫폼과의 통합#
similarity search 시스템을 구축하는 팀에게는 데이터셋 관리와 embedding 모델 훈련이 중요한 첫 번째 단계입니다. Ultralytics Platform은 데이터 관리, 클라우드 훈련, 모델 배포를 위한 도구를 제공하여 이 워크플로우를 단순화합니다. object detection 또는 분류를 위한 베이스 모델의 성능을 높게 유지함으로써 결과 벡터가 정확하고 의미 있는 검색 결과를 제공하도록 보장합니다.






