Skip to main content
turbopuffer is a fast, cost-efficient vector database for search and retrieval. This guide helps you get started with the turbopuffer vector store. For detailed documentation of all TurbopufferVectorStore features and configurations, see the API reference.

Overview

Integration details

Setup

Sign up for a turbopuffer account, create an API key, and install @langchain/turbopuffer, the official @turbopuffer/turbopuffer client, @langchain/core, and an embeddings provider (this guide uses OpenAI embeddings).

Credentials

Set your API key as an environment variable:
Optionally set a region (for example gcp-us-central1).

Instantiation

Create a turbopuffer client and namespace, then pass the namespace to TurbopufferVectorStore:

Manage vector store

Add items to vector store

Currently, only string metadata values are supported.

Delete items from vector store

Query vector store

Query directly

Filter by metadata using turbopuffer filter expressions. See the turbopuffer filter documentation for supported operators.

Upsert with existing IDs

Delete all vectors in the namespace

Usage for retrieval-augmented generation

For guides on how to use this vector store for retrieval-augmented generation (RAG), see the following sections:

API reference

For detailed documentation of all TurbopufferVectorStore features and configurations head to the API reference.