# Vald

> Kubernetes-native distributed engine for billion-scale approximate nearest neighbor search

- Category: Retrieval & Knowledge (RAG) / Vector Databases
- Language: Go
- Licence: Apache-2.0
- Repository: https://github.com/vdaas/vald
- Website: https://vald.vdaas.org
- Canonical page: https://ai-tldr.dev/tools/vald/

## In short

Vald is a distributed approximate nearest neighbor (ANN) search engine for dense vectors. It is built on a cloud-native architecture and runs on Kubernetes, so it is designed to search across very large datasets, up to billions of feature vectors. It sits in the Vector Databases category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Go and licensed Apache-2.0.

## Overview

Vald is a distributed approximate nearest neighbor (ANN) search engine for dense vectors. It is built on a cloud-native architecture and runs on Kubernetes, so it is designed to search across very large datasets, up to billions of feature vectors.

It handles automatic vector indexing, index backup, and horizontal scaling, and uses the NGT algorithm to find neighbors. Any data you can turn into a vector, such as images, audio, video, or text, can be indexed and searched.

Vald fits the vector-database category as a self-hosted option for teams already running Kubernetes. It is a good match for recommendation, recognition, and similar-search workloads where you need to scale the index across a cluster rather than a single node.

## What it does

- Distributed ANN search built on the NGT algorithm for nearest-neighbor lookups
- Cloud-native design that runs on Kubernetes (1.19+) and scales horizontally
- Automatic vector indexing and index backup
- Component-based architecture: Agent NGT, Discoverer, Gateways, and Index Manager
- Installable with Helm or the Vald Helm operator
- Official client SDKs for Go, Java, Python, and Node.js

## Getting started

Vald runs as a set of components on a Kubernetes cluster. Install it with Helm, then connect from one of the official client SDKs to insert and search vectors.

1. Check the requirements

   You need Kubernetes 1.19 or later, and the Vald Agent NGT requires CPUs with AVX2 instructions.

2. Install with Helm

   Add the Vald chart repository and install the cluster. Using the default values.yaml installs the nightly images.

```bash
helm repo add vald https://vald.vdaas.org/charts
helm install vald-cluster vald/vald
```

3. Install a client SDK

   Vald ships official clients for Go, Java, Python, and Node.js. This example uses the Python client.

```bash
pip install vald-client-python
```

4. Insert and search vectors

   Connect to the Vald gateway over gRPC, insert a vector, then run a nearest-neighbor search.

```python
import grpc
from vald.v1.vald import insert_pb2_grpc, search_pb2_grpc
from vald.v1.payload import payload_pb2

channel = grpc.insecure_channel("gateway.vald.vdaas.org:80")
istub = insert_pb2_grpc.InsertStub(channel)
sstub = search_pb2_grpc.SearchStub(channel)

vec = payload_pb2.Object.Vector(id='vector_id_1', vector=[0.1, 0.2, 0.3])
icfg = payload_pb2.Insert.Config(skip_strict_exist_check=True)
istub.Insert(payload_pb2.Insert.Request(vector=vec, config=icfg))

scfg = payload_pb2.Search.Config(num=10, radius=-1.0, epsilon=0.01, timeout=3000000000)
res = sstub.Search(payload_pb2.Search.Request(vector=[0.1, 0.2, 0.3], config=scfg))

channel.close()
```

## When to use it

- Power a recommendation system that finds similar items from billions of embeddings
- Build image, audio, or video similarity search by indexing model embeddings
- Run semantic text search and retrieval over large document collections
- Self-host a scalable vector index on an existing Kubernetes cluster
