TurboPuffer RAG Plugin
Hybrid search RAG (Retrieval Augmented Generation) implementation using TurboPuffer for vector + BM25 full-text search, with Gemini for embeddings.
Features
- Hybrid Search: Combines vector (semantic) and BM25 (keyword) search for better retrieval quality
- Reciprocal Rank Fusion: Merges results from multiple search strategies
- Gemini Embeddings: Uses Google's Gemini embedding model for high-quality vectors
- Low-latency Queries: Supports cache warming for fast query responses
- Implements RAG Interface: Compatible with Vision Agents RAG base class
Installation
uv add "vision-agents[turbopuffer]"
# or directly
uv add vision-agents-plugins-turbopuffer
Usage
from vision_agents.plugins import turbopuffer
# Initialize RAG
rag = turbopuffer.TurboPufferRAG(namespace="my-knowledge")
await rag.add_directory("./knowledge")
# Hybrid search (default)
results = await rag.search("How does the chat API work?")
# Vector-only search
results = await rag.search("How does the chat API work?", mode="vector")
# BM25-only search
results = await rag.search("chat API pricing", mode="bm25")
# Or use convenience function
rag = await turbopuffer.create_rag(
namespace="product-knowledge",
knowledge_dir="./knowledge"
)
Configuration
| Parameter | Description | Default |
|---|---|---|
namespace |
TurboPuffer namespace for storing vectors | Required |
embedding_model |
Gemini embedding model | models/gemini-embedding-001 |
chunk_size |
Size of text chunks for splitting documents | 10000 |
chunk_overlap |
Overlap between chunks for context continuity | 200 |
region |
TurboPuffer region | gcp-us-central1 |
Environment Variables
TURBO_PUFFER_KEY: TurboPuffer API keyGOOGLE_API_KEY: Google API key (for Gemini embeddings)
Dependencies
turbopuffer: TurboPuffer vector database clientlangchain-google-genai: Gemini embeddingslangchain-text-splitters: Text chunking utilities
References
Metadata
Release files for vision-agents-plugins-turbopuffer 0.6.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vision_agents_plugins_turbopuffer-0.6.9.tar.gz | 6.0 kB | Without provenance | Details for vision_agents_plugins_turbopuffer-0.6.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vision_agents_plugins_turbopuffer-0.6.9-py3-none-any.whl | Python 3 | none | any | Details for vision_agents_plugins_turbopuffer-0.6.9-py3-none-any.whl |
Total release size: 12.6 kB
Release files / vision_agents_plugins_turbopuffer-0.6.9.tar.gz
| Download URL | vision_agents_plugins_turbopuffer-0.6.9.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
306180defbdb0c6258e7b6ee926d90c7dafbb7c726635531038f3d8613716146
|
|
BLAKE2b-256 checksum How to use checksums |
9d529f423fa59350b2840bcca81a8946542b3e6aa91f0167b54cddfaa6a5a340
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / vision_agents_plugins_turbopuffer-0.6.9-py3-none-any.whl
| Download URL | vision_agents_plugins_turbopuffer-0.6.9-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd46f0d7260d3dab93546f8ee8a6e475dd5415093f793e397d109b62223770a2
|
|
BLAKE2b-256 checksum How to use checksums |
aadbd28b73bb6528df33a1ca41d8b697994f887efcf5aca613c8d9bbdee0feaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for vision-agents-plugins-turbopuffer 0.6.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.