Skip to main content

llama-index vector_stores Vertex AI Vector Search integration

Project description

LlamaIndex Vector Stores Integration: Vertex AI Vector Search

Vertex AI Vector Search is a fully managed, highly scalable vector similarity search service on Google Cloud.

Overview

This integration supports both Vertex AI Vector Search architectures:

  • v1.0 (default): Index + Endpoint architecture
  • v2.0 (opt-in): Collection-based architecture (simpler setup, more features)

The v2.0 support is opt-in and maintains 100% backward compatibility with existing v1.0 code.

Installation

Basic Installation (v1 only)

pip install llama-index-vector-stores-vertexaivectorsearch

With v2 Support

pip install 'llama-index-vector-stores-vertexaivectorsearch[v2]'

Quick Start

v1.0 (Default)

from llama_index.vector_stores.vertexaivectorsearch import VertexAIVectorStore

vector_store = VertexAIVectorStore(
    project_id="my-project",
    region="us-central1",
    index_id="projects/.../indexes/123",
    endpoint_id="projects/.../indexEndpoints/456",
    gcs_bucket_name="my-staging-bucket",  # Required for batch updates
)

v2.0 (New - Simpler Setup)

from llama_index.vector_stores.vertexaivectorsearch import VertexAIVectorStore

vector_store = VertexAIVectorStore(
    api_version="v2",  # Opt-in to v2
    project_id="my-project",
    region="us-central1",
    collection_id="my-collection"
    # No GCS bucket needed!
)

Usage with LlamaIndex

from llama_index.core import VectorStoreIndex, StorageContext, Document
from llama_index.vector_stores.vertexaivectorsearch import VertexAIVectorStore

# Create vector store (v1 or v2)
vector_store = VertexAIVectorStore(
    api_version="v2",
    project_id="my-project",
    region="us-central1",
    collection_id="my-collection",
)

# Create storage context
storage_context = StorageContext.from_defaults(vector_store=vector_store)

# Build index from documents
index = VectorStoreIndex.from_documents(
    documents, storage_context=storage_context
)

# Query
query_engine = index.as_query_engine()
response = query_engine.query("What is LlamaIndex?")

v1 vs v2 Comparison

Feature v1 v2
Required Resources Index + Endpoint Collection only
GCS Bucket Required for batch Not needed
clear() method Not supported Supported
Setup Complexity Higher Lower

Parameters

v1 Parameters

  • project_id: Google Cloud project ID
  • region: Google Cloud region
  • index_id: Vertex AI index resource name
  • endpoint_id: Vertex AI endpoint resource name
  • gcs_bucket_name: GCS bucket for batch updates

v2 Parameters

  • api_version: Set to "v2"
  • project_id: Google Cloud project ID
  • region: Google Cloud region
  • collection_id: Vertex AI collection name

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_vector_stores_vertexaivectorsearch-0.3.3.tar.gz.

File metadata

  • Download URL: llama_index_vector_stores_vertexaivectorsearch-0.3.3.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_vector_stores_vertexaivectorsearch-0.3.3.tar.gz
Algorithm Hash digest
SHA256 3694d8eb5fd7d949b593f331819c784ee4e8e22e4c7f865e68f6ad987e2b84fc
MD5 6f0e8da8f9095de8dc1aa07e8b4237ae
BLAKE2b-256 def9145e96a284e8050ebe16f9552c67700cfaef7788ed816a177dee1523cf42

See more details on using hashes here.

File details

Details for the file llama_index_vector_stores_vertexaivectorsearch-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: llama_index_vector_stores_vertexaivectorsearch-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_vector_stores_vertexaivectorsearch-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e9299e095a1632361533af19f4ed5ba6ee3a50f1cf7f88b9d3fb6e4ab00e7813
MD5 429655eee96a366cf0e118159c6f7695
BLAKE2b-256 75edb9f1de33f84fd6621ec4d082eea61721458d0d0bc5ecbd4bd0b4b96d1f9a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page