Skip to main content

What is Weaviate?

Weaviate is an open-source, AI-native vector database that allows you to store data objects and their corresponding vector embeddings in a single, scalable environment. Unlike traditional databases, it is designed to understand the semantic meaning of data, enabling “similarity search” where the system finds results based on context rather than exact keyword matches. It is a core component for developers building Retrieval-Augmented Generation (RAG) systems, recommendation engines, and autonomous AI agents.

Key Features

  • Hybrid Search: Seamlessly combines keyword-based search (BM25) with vector-based semantic search to provide the most accurate results.
  • Modular Architecture: Includes built-in modules that can automatically handle vectorization (using models from OpenAI, Cohere, Hugging Face, etc.), saving you from managing separate embedding pipelines.
  • High Performance at Scale: Built with a custom HNSW (Hierarchical Navigable Small World) index, it supports sub-millisecond searches across billions of data objects.
  • GraphQL & REST API: Offers a developer-friendly GraphQL interface that makes it easy to explore complex data relationships and perform precise queries without over-fetching data.
  • Cloud-Native & Flexible: Can be deployed anywhere—from a local Docker container to a managed cloud service or Kubernetes—ensuring production-grade reliability and horizontal scalability

Use Cases

  • Building multimodal search engines that allow users to search across images, video, and text simultaneously using a single query.
  • Developing autonomous AI agents that use Weaviate as a long-term memory store to track past interactions and make informed decisions.
  • Enhancing e-commerce product discovery by matching items based on style, occasion, and intent rather than just matching “blue shirt” keywords.
  • Powering Retrieval-Augmented Generation (RAG) by providing Large Language Models with relevant, real-time private context to reduce hallucinations.

Getting Started

  1. Go to Vector Database Service in your dashboard
  2. Select Weaviate as your desired type of database
  3. Engine Version have to be choosed from available options.
  4. Give Connection Name ,choose friendly connection name (e.g. staging-db) .
  5. Create Database User with appropriate privledges.
  6. Password for Database User to keep it secure.
  7. Give Default Database/Schema name to connect to.
  8. Pick a region to deploy your database instance.
Weaviate Instance Creation - vector database ##Connection Examples

Node js

import weaviate from 'weaviate-client';

async function connect() {
  const client = await weaviate.connectToWeaviateCloud(
    'https://your-unique-id.weaviate.network', // Your Weaviate URL
    {
      authCredentials: new weaviate.ApiKey('YOUR-WEAVIATE-API-KEY'), // Your database API key
      headers: {
        'X-OpenAI-Api-Key': 'YOUR-OPENAI-API-KEY', // Optional: for automatic vectorization
      }
    }
  );

  // Check if the connection is successful
  const isReady = await client.isReady();
  console.log(`Connection status: ${isReady}`);

  return client;
}

connect();

Python

import weaviate
import os

# Connect to Weaviate Cloud
client = weaviate.connect_to_weaviate_cloud(
    cluster_url="https://your-unique-id.weaviate.network",  # Your Weaviate URL
    auth_credentials=weaviate.auth.AuthApiKey("YOUR-WEAVIATE-API-KEY"),  # Database API key
    headers={
        "X-OpenAI-Api-Key": "YOUR-OPENAI-API-KEY"  # Optional: For automatic vectorization
    }
)

try:
    # Check if the connection is live
    if client.is_ready():
        print("Successfully connected to Weaviate!")
        
        # Example: Get cluster metadata
        meta = client.get_meta()
        print(f"Version: {meta['version']}")

finally:
    client.close()  # Always close the connection to free up resources

Scaling

  • Vertical Scaling: Increase CPU and memory
  • Horizontal Scaling: Add read replicas
  • Storage: Automatic storage scaling

Security

  • SSL/TLS: Encrypted connections required
  • VPC Integration: Private network connectivity
  • IP Whitelisting: Restrict access by IP
  • Authentication: Username/password auth

Backups

  • Automatic Backups: Daily at scheduled time
  • Manual Backups: On-demand backups

Monitoring

Track database performance with:
  • Query Performance: Slow query identification
  • Storage: Disk usage and growth trends
  • CPU & Memory: Resource utilization

Create Weaviate Database

Get started with Weaviate vector databases