n8n provides native vector-store nodes for three database backends, each
with a common five‑mode interface and the ability to connect directly to
an AI Agent as a tool. Pinecone (cloud‑managed, serverless
indexes supported from n8n v1.33.0) requires a matching embedding dimension
and the correct “Retrieve Documents (As Tool for AI Agent)” operation mode
for agentic RAG. Weaviate (self‑hosted via Docker or cloud
via Weaviate Cloud Services) uses API‑key authentication against a collection
name and supports all four core modes plus update. pgvector
(self‑hosted, the Postgres extension that turns a standard PostgreSQL instance
into a vector store) requires a manually provisioned table with an
embedding vector(N) column. All three nodes share the identical
operations model and can be wired as regular nodes for insert/retrieval,
chained through a Vector Store Retriever for deterministic RAG, or connected
directly to the AI Agent’s tool connector for agent‑driven retrieval.[reference:0][reference:1]
| Dimension | Pinecone | Weaviate | pgvector |
|---|---|---|---|
| Hosting | Cloud‑managed[reference:6] | Self‑hosted or Cloud[reference:7] | Self‑hosted (PostgreSQL + pgvector ext.)[reference:8] |
| Credentials | Pinecone API Key[reference:9] | Weaviate URL + API Key[reference:10] | Postgres user/password/database[reference:11] |
| Node Modes | Get Many, Insert, Retrieve (Chain/Tool), Retrieve (AI Agent Tool), Update[reference:12] | Get Many, Insert, Retrieve (Chain/Tool), Retrieve (AI Agent Tool)[reference:13] | Get Many, Insert, Retrieve (Chain/Tool), Retrieve (AI Agent Tool)[reference:14] |
| AI Agent Tool Mode | ✅ “Retrieve Documents (As Tool for AI Agent)”[reference:15] | ✅ connect directly to AI agent tools connector[reference:16] | ✅ connect directly to AI agent tools connector[reference:17] |
| Deterministic RAG Pattern | Q&A Chain → Vector Store Retriever → Pinecone[reference:18] | Q&A Chain → Vector Store Retriever → Weaviate | Q&A Chain → Vector Store Retriever → PGVector |
| Index / Collection Config | Create index with matching dimensions (e.g. 1,536) and cosine metric[reference:19] | Create collection via Weaviate Cloud or Docker[reference:20] | CREATE TABLE with embedding vector(N), text, metadata jsonb[reference:21] |
What are the five operation modes shared across all n8n vector store nodes?
Every n8n vector store node — Pinecone, Weaviate, and PGVector — exposes five operation modes selected from the “Operation Mode” dropdown. Get Many retrieves documents by ID with optional filters. Insert Documents stores new vectors and metadata into the vector database. Retrieve Documents (As Vector Store for Chain/Tool) provides documents to a retriever connected to a chain. Retrieve Documents (As Tool for AI Agent) connects directly to the AI Agent’s tool connector. Update Documents modifies existing documents by their ID.[reference:22][reference:23]
The mode selection determines both the available input/output connectors and which downstream nodes can attach. In regular node mode (Get Many, Insert, Update), the vector store sits in the standard node flow with no special connectors. In Retrieve Documents (As Tool for AI Agent) mode, the node exposes a tool connector that attaches directly to the AI Agent node’s tools input — the agent decides at runtime when to query the store.[reference:24] For deterministic retrieval where you always want to search the vector store before generating an answer, use the Question and Answer Chain → Vector Store Retriever → Vector Store pattern instead of the AI Agent tool mode, which guarantees a “Search → then Generate” order rather than the agent’s dynamic decision.[reference:25] For the complete AI Agent orchestration guide covering tool selection and multi‑tool patterns, see the n8n AI Nodes Reference.
How do you configure the Pinecone vector store node for serverless indexes and AI agent tools?
The Pinecone node authenticates via an API key from the
Pinecone console. Create a Pinecone index before connecting
the node — the index must have dimensions matching your embedding model
(1,536 for text-embedding-3-small or
text-embedding-ada-002; 3,072 for
text-embedding-3-large) and use the cosine
similarity metric.[reference:26] Serverless indexes, supported since n8n
v1.33.0, require the “Retrieve Documents (As Tool for AI
Agent)” operation — the older “chain/tool” mode does not work with
serverless.[reference:27]
The single most common Pinecone configuration failures are: (1) using the
wrong operation mode for serverless indexes — always use “As Tool for AI
Agent” mode, not the legacy “chain/tool” mode for agent workflows; (2)
leaving the Tool Description field empty — when this field
is blank, n8n cannot build a valid JSON schema for OpenAI’s function
calling and returns a null type error; (3) dimension mismatch
between the embedding model and the index — the node will fail silently or
return an error; and (4) using the deprecated “Answer questions with
a vector store” sub‑node, which has known schema bugs in newer n8n
versions and should be replaced by the main Pinecone node in tool mode.[reference:28][reference:29]
Also set the Namespace option in the node to true
only if your index actually uses one, and delete any old “Answer questions
with a vector store” nodes — they have known bugs and are effectively
deprecated.[reference:30] For the complete credential encryption and
management reference, see the
n8n Credential Nodes guide.
true only if your index uses one.[reference:31][reference:32]
How do you set up the Weaviate vector store node with a cloud cluster or local Docker instance?
The Weaviate Vector Store node supports both self‑hosted and Weaviate Cloud deployments. For self‑hosted, start a Weaviate cluster via Docker Compose, then enter the instance URL and API key in the n8n credentials panel. For cloud, sign up for Weaviate Cloud Services, create a cluster, and use the provided Weaviate Cloud Endpoint and Weaviate API Key. The credential panel accepts the same fields regardless of deployment method.[reference:33][reference:34]
The node supports the same five modes as Pinecone and PGVector: Get Many, Insert Documents, Retrieve Documents (As Vector Store for Chain/Tool), Retrieve Documents (As Tool for AI Agent), and Update Documents. When used as a regular node (Insert or Get Many mode), the Weaviate Vector Store sits in the standard connection flow without an agent. When connected directly to an AI Agent as a tool, the connection is: AI Agent (tools connector) → Weaviate Vector Store node. The official Document Q&A template (n8n.io/workflows/7170) demonstrates the minimal RAG implementation: upload a PDF, generate embeddings with OpenAI, store in a Weaviate collection, and query via a Chat node with the Question and Answer Chain.[reference:35][reference:36] For selecting the optimal embedding model and chunk size for your RAG pipeline, see the section “Performance & Troubleshooting” below.
How do you provision a pgvector table and connect the PGVector Vector Store node in n8n?
Run pgvector via Docker: docker pull pgvector/pgvector:pg16,
then start a container with persistent storage. After the container is
running, connect via psql and execute: CREATE DATABASE
vectors;, then inside the new database run CREATE EXTENSION
vector; to enable the pgvector extension. Create a table with
CREATE TABLE embeddings (id bigserial PRIMARY KEY, embedding
vector(N) NOT NULL, text text, metadata jsonb); — the vector
dimension N must match your embedding model: 1,536 for
text-embedding-3-small, 3,072 for text-embedding-3-large.[reference:37][reference:38]
In n8n, add the PGVector Vector Store node and create
new credentials with the database name, username, and password from above.
For the host, use localhost if n8n runs locally/natively; if
n8n runs in a container alongside the pgvector container, use the Docker
IP obtained via docker inspect. The node’s Options panel
exposes Column Names — map the embedding, text, and
metadata columns to match your table schema (default: embedding,
text, metadata).[reference:39] For production,
add an HNSW index to accelerate cosine similarity queries:
CREATE INDEX ON embeddings USING hnsw (embedding vector_cosine_ops);.
For the complete production deployment blueprint covering PostgreSQL pooling
and high availability, see the
n8n Docker Compose production stack guide.
How do you match embedding dimensions, choose chunk sizes, and validate the complete RAG pipeline?
The embedding model and vector store dimension must agree exactly. OpenAI’s
text-embedding-3-small generates 1,536‑dimensional
vectors (also the default for text-embedding-ada-002). The
text-embedding-3-large model generates 3,072‑dimensional
vectors — but supports downsizing via the dimensions parameter
(e.g. 256, 512, 1,024). Match the index or table schema to the actual
dimension your embedding node outputs.[reference:40][reference:41]
For chunking, the Recursive Character Text Splitter node defaults to a chunk size of 1,000 characters with an overlap of 200 — these values preserve context between adjacent chunks while keeping each chunk small enough for precise retrieval. Increase chunk size to 2,000–6,000 for long‑form documents or decrease to 500 for Q&A over short paragraphs.[reference:42][reference:43] The canonical six‑stage RAG pipeline in n8n chains: Data Loader → Text Splitter (chunk_size=1000, overlap=200) → Embeddings (OpenAI text-embedding-3-small, 1,536 dims) → Vector Store (Insert mode) → Vector Store Retriever → Question and Answer Chain. For a deterministic “Search → then Generate” order, use the Q&A Chain pattern rather than the AI Agent tool mode, which may generate an answer before searching.[reference:44] For complete end‑to‑end RAG pipeline templates, see the n8n OpenAI Prompt Chain Tutorial.
How do you attach multiple vector stores to a single AI agent and optimize retrieval performance?
A single AI Agent node can connect to multiple vector store nodes simultaneously — each store receives a distinct Tool Name and Tool Description, and the agent selects which store to query at runtime based on the user’s question. For example, attach one Pinecone store for HR policies (“Use this tool to search HR policies and employee handbooks”) and one pgvector store for product specs (“Use this tool to search product specifications and technical documentation”).[reference:46] The agent reads each description and chooses the appropriate store autonomously.
For production performance: Pinecone serverless indexes
scale automatically and support hybrid search (semantic + lexical) with
no operational overhead — optimal for teams without existing database
infrastructure.[reference:47] pgvector reuses your existing
PostgreSQL backup and tooling — no new infrastructure — and supports both
HNSW (recommended for >10k vectors) and
IVFFlat indexes. Use HNSW for production workloads:
CREATE INDEX ON embeddings USING hnsw (embedding vector_cosine_ops);.
Weaviate provides built‑in vectorization modules and
multi‑tenant collections — optimal for organizations needing on‑premises
deployment with full‑featured indexing. For comprehensive RAG pipeline
architecture covering reranking, hybrid search, and production deployment
patterns, see the
n8n Vector Store Integration guide.
References
- n8n Documentation — Pinecone Vector Store node: five operation modes, credentials, node usage patterns (regular, agent tool, retriever, Q&A tool)
- n8n 中文文档 — Pinecone Vector Store 节点: 五种模式, AI Agent工具连接器, 向量存储检索器, 问答链集成
- n8n Documentation — Weaviate Vector Store node: operations, credentials (URL + API Key), AI agent tool connector, cloud vs self-hosted setup
- Tsmx.net — Using pgvector as Vector Store in n8n: Docker setup (pgvector/pgvector:pg16), CREATE EXTENSION vector, table schema (embedding vector(3072), text, metadata jsonb), RAG agent example (Aug 2025)
- n8n Community — Pinecone Serverless Connection Fix: “Retrieve Documents (As Tool for AI Agent)” mode, Tool Description required, Namespace option, delete deprecated nodes, v1.33.0+ serverless support (May 2026)
- n8n Community — ‘Answer questions with a vector store’ tool deprecated: known schema bugs, replace with main Pinecone node in AI Agent tool mode, Tool Name and Description required (Mar 2026)
- n8n Community — AI Agent RAG Order: deterministic chain (Q&A Chain → Vector Store Retriever → Vector Store) for “Search → then Generate”; agentic mode for optional retrieval
- n8n Blog — Build RAG Pipelines with n8n: ingestion, chunking (~500 chars), embedding, vector DB storage, retrieval, augmentation, generation stages (Dec 2025)
- n8n Workflow Template — Document Q&A with RAG: Query PDF Content using Weaviate and OpenAI — local or cloud Weaviate cluster, PDF upload, RAG with Q&A Chain
- Dino Cajic — Low-code RAG, start to finish: PGVector, Supabase Vector Store, Pinecone, Weaviate, Qdrant — column name configuration for embeddings, chunking strategies (Nov 2025)

