turbopuffer
Guide for building search on turbopuffer, the object-storage-native vector and full-text search engine. Use this skill whenever the user is writing or…
от maragudk★ 30 звёзд на GitHub
Установить turbopuffer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
turbopuffer
Overview
turbopuffer is a search engine (vector, full-text, hybrid, filters) built natively on object storage. Object storage is the only source of truth; NVMe SSD and memory are caches in front of it. That architecture makes it very cheap at rest, fast when warm (vector p50 ~14ms on 10M docs), and slower when cold (p50 ~500-900ms) or writing (p50 ~165ms for a 512KB batch, since every write is an object-storage PUT).
Reach for it when you have: RAG/semantic search, hybrid search (BM25 + vectors), naturally partitioned data (per-tenant namespaces), or large scale at low cost. It is deliberately not a fit for: a free tier (commercial only) or heavy first-stage ranking logic (it does first-stage retrieval; rerank in your own code). Bring your own vectors, or let it embed text for you (see Native embeddings).
There is no local emulator and no open-source version. Tests and development hit the real service (see Testing below).
Mental model
- A namespace is an isolated container of documents with its own indexes — a prefix on object storage. Namespaces are created implicitly on first write, scale to hundreds of millions per org, and are near-free when idle. Design rule: one namespace per set of documents queried together (e.g. per tenant), not one big namespace with filters. Smaller namespaces are faster and cheaper.
- A document has an
id(u64, UUID, or string ≤64 bytes), optional vectors, and attributes. Attribute types are consistent per namespace and tracked in a per-namespace schema (auto-inferred by default; declare explicitly foruuid,datetime, vectors beyondvector, FTS, and to disable indexing). - Writes append to a write-ahead log on object storage: durable when the call returns, immediately visible to strongly consistent queries. Concurrent writes to a namespace group-commit; each namespace commits at most ~1 WAL entry/second, so batch instead of looping single writes. Indexing happens asynchronously on separate nodes; unindexed data is searched exhaustively in the meantime.
- Queries default to strong consistency, which costs a ~10ms floor (an object-storage metadata check). Eventual consistency skips that and scans at most 128 MiB of unindexed data; it can be stale up to ~1h after very large writes.
- Vector indexing uses SPFresh (centroid-based ANN, tuned for 90-100% recall@10, measured continuously on 1% of live traffic). Full-text search is a native BM25 inverted index. Filters use inverted indexes that cooperate with the ANN index, so filtered vector search keeps recall.
- First query to a cold namespace reads object storage directly (3-4 roundtrips); subsequent queries hit NVMe/memory cache on the same node. You can pre-warm (see below).
Client setup (Go)
// go get github.com/turbopuffer/turbopuffer-go/v2
import (
"github.com/turbopuffer/turbopuffer-go/v2"
"github.com/turbopuffer/turbopuffer-go/v2/option"
)
tpuf := turbopuffer.NewClient(
option.WithAPIKey(os.Getenv("TURBOPUFFER_API_KEY")), // default; can be omitted
option.WithRegion("gcp-europe-west1"), // or TURBOPUFFER_REGION env var
)
ns := tpuf.Namespace("my-namespace")
Reuse one client for connection pooling. Region is part of the base URL (https://<region>.turbopuffer.com); pick the one closest to your backend. Regions span AWS (e.g. aws-eu-central-1, aws-us-east-1) and GCP (e.g. gcp-europe-west1, gcp-us-central1); full list at https://turbopuffer.com/docs/regions.
The client retries connection errors, 408, 409, 429, and 5xx with exponential backoff (4 retries by default; tune with option.WithMaxRetries). Errors unwrap to *turbopuffer.Error via errors.As. Optional scalar params use helpers: turbopuffer.Bool(true), turbopuffer.Int(10), turbopuffer.String("x") — prefer these over param.NewOpt, which needs an extra import the docs snippets forget.
Namespace names must match [A-Za-z0-9-_.]{1,128}. Attribute names can't start with $.
Writing documents
One endpoint does everything: upserts, patches, deletes, and namespace copies, atomically per request.
res, err := ns.Write(ctx, turbopuffer.NamespaceWriteParams{
UpsertRows: []turbopuffer.RowParam{
{"id": 1, "vector": embedding, "text": "walrus narwhal", "public": true},
{"id": 2, "vector": embedding2, "text": "pufferfish clownfish", "public": false},
},
DistanceMetric: turbopuffer.DistanceMetricCosineDistance,
Schema: map[string]turbopuffer.AttributeSchemaParam{
"text": {AttributeSchemaConfig: &turbopuffer.AttributeSchemaConfigParam{Type: "string", FullTextSearch: &turbopuffer.FullTextSearchConfigParam{}}},
"user_ids": turbopuffer.AttributeSchemaParamAttributeSchemaConfig("[]uuid"), // type only
},
})
// res.RowsAffected, res.RowsUpserted, ...
Write params (all optional, combined freely):
UpsertRows/UpsertColumns— insert or fully overwrite documents (row vs columnar format).PatchRows/PatchColumns— part
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл turbopuffer?
Guide for building search on turbopuffer, the object-storage-native vector and full-text search engine. Use this skill whenever the user is writing or modifying code that talks to turbopuffer -- anything importing `github.com/turbopuffer/turbopuffer-go`, calling `*.turbopuffer.com` endpoints, or mentioning tpuf or turbopuffer namespaces -- and when designing features it could serve, such as semantic/vector search, BM25 full-text search, hybrid search with RRF, or RAG retrieval with filters. Also use it when deciding whether turbopuffer fits a use case, designing namespaces or schemas for it, or debugging its consistency, caching, backpressure, or HTTP 429 behavior.
Как установить скилл turbopuffer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл turbopuffer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…