Skip to content

Milvus RAG Demo πŸ—οΈ

A comprehensive demonstration of SuperOptiX's RAG capabilities using Milvus vector database for enterprise-grade similarity search and scalable knowledge retrieval.

Overview

This demo showcases how to integrate Milvus - a cloud-native vector database - with SuperOptiX's RAG system to create intelligent agents capable of retrieving and synthesizing information from massive knowledge bases with enterprise-level scalability.

This demo demonstrates:

πŸ—οΈ Milvus Vector Database Integration - Enterprise-grade connection to Milvus for scalable vector storage

🌐 Cloud-Native Architecture - Distributed vector search with horizontal scaling capabilities

πŸ“ˆ Massive Scale Operations - Handle millions of vectors with high performance

πŸ” Advanced Indexing - Multiple indexing strategies for different use cases

πŸ”„ RAG Pipeline Integration - Complete retrieval-augmented generation workflow

Prerequisites

1. Install SuperOptiX

Bash
pip install superoptix

2. Install Milvus Dependencies

Bash
pip install pymilvus

3. Set Up Milvus Server

Bash
# Using Docker Compose (recommended)
wget https://github.com/milvus-io/milvus/releases/download/v2.5.12/milvus-standalone-docker-compose.yml
docker-compose up -d

4. Install and Serve Model

Bash
# Install a model (if not already installed)
super model install llama3.1:8b

# Start Ollama server (if using Ollama backend)
ollama serve

Quick Start

1. Pull the Demo Agent

Bash
super agent pull rag_milvus_demo

2. Compile the Agent

Bash
super agent compile rag_milvus_demo

3. Run the Demo

Bash
super agent run rag_milvus_demo --goal "What are the key features of Milvus and how does it work with SuperOptiX?"

Key Configuration Points:

πŸ”§ Vector Database Setup - Configured to connect to Milvus at localhost:19530

πŸ“Š Collection Management - Uses superoptix_knowledge collection for document storage

🎯 Embedding Model - Leverages sentence-transformers/all-MiniLM-L6-v2 for vector generation

βš™οΈ Search Parameters - Optimized with top_k: 5 and similarity_threshold: 0.7

Playbook Configuration

The demo uses a specialized playbook with Milvus-specific configurations:

YAML
rag:
  enabled: true
  retriever_type: milvus
  config:
    top_k: 5
    chunk_size: 512
    chunk_overlap: 50
    similarity_threshold: 0.7
  vector_store:
    embedding_model: sentence-transformers/all-MiniLM-L6-v2
    host: localhost
    port: 19530
    collection_name: superoptix_knowledge

Customization

Modify Milvus Connection

YAML
vector_store:
  host: your-milvus-host
  port: 19530
  collection_name: YourCustomCollection
  user: your-username  # If using authentication
  password: your-password

Adjust Search Parameters

YAML
config:
  top_k: 10  # Retrieve more documents
  similarity_threshold: 0.8  # Higher similarity threshold
  chunk_size: 1024  # Larger chunks

Configure Collection Schema

YAML
vector_store:
  schema:
    fields:
      - name: id
        dtype: INT64
        is_primary: true
      - name: content
        dtype: VARCHAR
        max_length: 65535
      - name: embedding
        dtype: FLOAT_VECTOR
        dim: 384

Troubleshooting

Connection Issues

  • Error: "Connection refused"
  • Solution: Ensure Milvus server is running on port 19530
  • Check: curl http://localhost:9091/healthz

Collection Issues

  • Error: "Collection not found"
  • Solution: Create collection manually or check collection name
  • Check: Use Milvus CLI or Python client to list collections

Performance Issues

  • Slow queries: Optimize index parameters or reduce top_k
  • Memory issues: Adjust chunk_size and chunk_overlap

Use Cases

🏒 Enterprise Search - Large-scale corporate knowledge management

πŸ”¬ Scientific Research - Massive dataset analysis and discovery

πŸ“± Recommendation Systems - High-throughput content recommendation

🎯 E-commerce - Product search and recommendation engines


Ready to scale your vector search with Milvus? πŸš€

Start with this demo to understand how Milvus's enterprise-grade capabilities can power your AI applications with massive-scale knowledge retrieval and similarity search.