Vector Search & RAG
Build AI applications with semantic search. Telbase auto-detects vector dependencies in your project and provisions pgvector on your PostgreSQL database — no manual setup required.
telbase deploy.How It Works
When you deploy a Python project with vector dependencies, Telbase runs a three-step pipeline:
- Dependency scan — Telbase reads
requirements.txtorpyproject.tomland extracts Python dependencies - Vector package detection — Matches against 9 known vector/RAG packages
- Auto-provision — Enables the pgvector extension on your Neon database and infers the optimal embedding preset from your AI SDK (OpenAI, Anthropic, Cohere, or sentence-transformers)
Supported Packages
Telbase detects the following packages in your Python dependencies:
| Package | Description |
|---|---|
pgvector | PostgreSQL vector similarity search |
langchain | LLM orchestration framework |
llama-index | Data framework for LLM applications |
llamaindex | Alternative package name for LlamaIndex |
chromadb | Embedding database (pgvector recommended on Telbase) |
sentence-transformers | Local sentence embedding models |
pinecone-client | Pinecone vector database client |
@pinecone-database/pinecone | Pinecone SDK (alternative package) |
weaviate-client | Weaviate vector database client |
openai → 1536d, @anthropic-ai/sdk → 1024d, cohere-ai → 1024d, sentence-transformers → 384d. If no SDK is detected, it defaults to openai-3-small (1536 dimensions).Embedding Presets
Telbase infers the best embedding preset from your AI SDK. You can also specify one explicitly with --pgvector-preset.
| Preset | Dimensions | Index Type | Use Case |
|---|---|---|---|
openai-ada-002 | 1,536 | HNSW | Legacy OpenAI embeddings |
openai-3-small | 1,536 | HNSW | OpenAI text-embedding-3-small (default) |
openai-3-large | 3,072 | None | OpenAI text-embedding-3-large |
claude | 1,024 | HNSW | Anthropic / Voyage AI embeddings |
cohere-english | 1,024 | HNSW | Cohere embed-english-v3 |
sentence-transformers | 384 | HNSW | all-MiniLM-L6-v2 and similar |
Deploy a RAG App
For a single-service RAG app (e.g., FastAPI with pgvector):
telbase deployTelbase detects your framework, scans requirements.txt for vector packages, provisions a PostgreSQL database with pgvector, and deploys your app. The DATABASE_URL is set automatically.
pgvector auto-enabled (openai-3-small, 1536 dims, HNSW, cosine). This is machine-readable — Claude Code can parse and act on it.CLI Flags
Override auto-detection behavior with these flags:
| Flag | Description |
|---|---|
--pgvector | Force-enable pgvector even without detected packages |
--no-pgvector | Disable auto-detection and skip pgvector provisioning |
--pgvector-preset <name> | Override the inferred embedding preset |
# Force a specific preset
telbase deploy --pgvector-preset openai-3-small
# Enable pgvector manually (no auto-detection needed)
telbase deploy --pgvector --pgvector-preset claude
# Disable auto-detection
telbase deploy --no-pgvectorManual Setup
If your project doesn't use any of the auto-detected packages, you can enable pgvector manually and create your own embeddings table.
-- Enable the pgvector extension
CREATE EXTENSION IF NOT EXISTS vector;
-- Create an embeddings table (1536 dimensions for OpenAI)
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
content TEXT NOT NULL,
embedding vector(1536)
);
-- Create an HNSW index for fast similarity search
CREATE INDEX ON documents
USING hnsw (embedding vector_cosine_ops);You can run this SQL directly: telbase db exec --file setup.sql
Using with Claude Code
Telbase's MCP integration gives Claude Code full control over database extensions.
# In Claude Code, just describe what you need:
"Deploy my RAG app with pgvector support"
# Or manage extensions directly:
"Enable pgvector on my database with the openai-3-small preset"The enable_database_extension MCP tool handles provisioning, and the telbase://docs/rag resource provides Claude Code with context about vector search capabilities.
Next Steps
- Databases — PostgreSQL and SQLite database management
- Supported Frameworks — Python, Node.js, and more
- Custom Domains — Add your own domain
- CLI Reference — Full command reference