Milvus Vector Database

website·Indexed 41 days ago

https://milvus.io/docs

An open-source high-performance vector database designed for similarity search and AI applications. Documentation covers installation of Standalone, Distributed, and GPU versions, SDK integration, core architecture, vector and scalar indexing types, and built-in text analyzers.

Tokens
7K
Snippets
3
Records
65
Agent score
74%

What's inside Milvus

  1. Milvus Deployment Modes Overview

    Milvus is an open-source high-performance vector database for similarity search and AI applications. It offers three primary deployment modes based on scale and environment:

    • Milvus Lite: Embedded version, ideal for prototyping.
    • Milvus Standalone: Single-node deployment, suitable for small-scale production.
    • Milvus Distributed: Kubernetes-based deployment, designed for enterprise-scale needs.
  2. Process Text with Milvus Analyzers

    Milvus uses Analyzers to convert raw text into a structured, searchable format. This is critical for text-based search and retrieval. Milvus supports multi-language analyzers and allows users to register and manage external dictionary files that analyzers can load at runtime to improve tokenization and analysis.
  3. Understand Milvus Internal Architecture Components

    Milvus architecture consists of several specialized components:

    • Streaming Service: An internal module built around a Write-Ahead Log (WAL) to handle data streaming.
    • Woodpecker: A cloud-native WAL system introduced in Milvus 2.6.
    • Knowhere: The library responsible for vector indexing and similarity search.
    • Storage V3: A storage engine version required for specific Milvus 3.0 features.
  4. Rerank search results using Ranker functions

    Milvus provides several reranking strategies to improve search relevance beyond simple vector similarity:

    • Weighted Ranker: Combines results from multiple search paths by assigning importance weights.
    • RRF Ranker: Uses Reciprocal Rank Fusion to balance results from multiple vector search paths.
    • Boost Ranker: Allows manual influence over search results based on specific criteria.
    • Model Rankers: Leverages semantic reranking models from providers such as vLLM, Hugging Face TEI, Cohere, Voyage AI, SiliconFlow, DashScope, and hosted Hugging Face sentence-similarity models.
  5. Debug Milvus 2.x using Birdwatcher

    Birdwatcher is a dedicated debug tool for Milvus 2.x. It functions by connecting to etcd to inspect the current status of the Milvus system, allowing developers to diagnose system health and state.
  6. Integrate external embedding services with Milvus

    The Milvus Function module allows the automatic transformation of raw text data into vector embeddings by integrating with external service providers. Supported providers include:

    • OpenAI, Azure OpenAI, and Google Gemini (via API keys)
    • Amazon Bedrock, Google Cloud Vertex AI, and Cohere
    • Hugging Face (via hosted Inference Providers or Text Embeddings Inference - TEI)
    • Voyage AI, DashScope, SiliconFlow, and Yandex Cloud
  7. Manage Milvus Databases and Collections

    Milvus uses a hierarchical data organization: Databases contain Collections, and Collections contain Entities.

    • Databases: Provide a layer above collections to manage data and support multi-tenancy.
    • Collections: The primary unit for managing data. You define a collection by its schema, index parameters, and metric type. Collections must be 'loaded' into memory before similarity searches or queries can be performed.
    • External Collections: A specialized collection type that allows Milvus to access data residing in external storage systems like AWS S3 or Iceberg.
    • Partitions: Subsets of a collection used to organize data for more efficient querying.
    • Aliases: User-defined names that point to specific collections for easier management.
  8. Manage Milvus using Attu

    Attu is the official all-in-one, open-source administration tool for Milvus, providing a graphical user interface for managing collections, indexes, and data.
  9. Implement Retrieval-Augmented Generation (RAG) with Milvus

    Milvus provides several specialized patterns for building RAG pipelines:

    • Standard RAG: General guidance on building RAG with Milvus.
    • Advanced RAG: Techniques to enhance retrieval performance.
    • Multimodal RAG: Handling multiple data types (e.g., text and images).
    • Graph RAG: Combining knowledge graphs with vector retrieval.
    • Contextual Retrieval: Implementing Anthropic's method to solve semantic isolation of chunks.
    • Specialized Ingestion: Using tools like Docling, Mistral OCR, PII Masker (for privacy), and Feast (feature store) to prepare data for RAG.
  10. Backup and Restore Milvus Data

    Milvus-Backup is a dedicated tool for data backup and restoration, accessible via CLI and RESTful API. It supports several scenarios: backup/restore within a single instance, migration between instances using a shared bucket, migration across different buckets, and migration across different S3 environments.
  11. Search and filter using StructArray fields

    Milvus supports complex search operations on StructArray fields, allowing for vector search on subfields:

    • Vector Search: Run ANN, Range, or Filtered searches specifically on vector subfields within a StructArray.
    • Grouping: Group element-level search results by the parent entity.
    • Hybrid Search: Combine StructArray vector searches with other vector searches in a single request.
    • EmbeddingList Search: Supports ColBERT-style and ColPali-style retrieval systems using EmbeddingList search on StructArray vector subfields.
  12. Use Milvus with LangChain

    Milvus integrates with LangChain for several advanced retrieval patterns:

    • Text Embedding (Data In Data Out): Use Milvus 2.6's Text Embedding Function for streamlined embedding workflows.
    • Hybrid & Full-text Search: Implement combined vector and keyword search.
    • Asynchronous Search: Use langchain-milvus asynchronous functions for high-performance applications.
    • Agentic RAG: Build advanced RAG systems using LangGraph and Milvus.