Supabase Vector Store node returns empty output (no error) while SQL query returns matches

Describe the problem/error/question

:puzzle_piece: Context
I built an AI Agent in n8n that answers user questions using RAG (Retrieval Augmented Generation).
The goal is to ensure the agent replies strictly based on a Google Sheet that contains predefined Questions & Answers.
Architecture
Google Sheet → contains Q&A pairs (source of truth)
Data is embedded and stored in Supabase (pgvector).
n8n workflow:
User question
Embedding generation
Supabase Vector Store node → retrieve similar Q&A
AI Agent responds based only on retrieved results
:bullseye: Expected Behavior
When a user asks a question similar to one in the sheet:
Supabase Vector Store node should return matching rows
Agent should respond using retrieved answer
:red_exclamation_mark: Actual Problem
The Supabase Vector Store node returns no output, and no error is thrown.
However:
Running the same query directly in Supabase SQL returns 4 matching results.
This suggests the data exists and similarity search works.
:magnifying_glass_tilted_left: What I Verified
:white_check_mark: Data exists
Running SQL:
select * from documents
order by embedding ↔ query_embedding
limit 4;
returns expected rows.
:white_check_mark: Embeddings exist
Embedding column is populated.
Dimensions match the model used.
:white_check_mark: Query runs successfully in Supabase
Manual query returns results.
:red_exclamation_mark: But in n8n:
Node executes successfully
Output is empty ()
No error message
:red_question_mark: Questions
What could cause the Supabase Vector Store node to return empty results while SQL returns matches?
How can I debug what query n8n actually sends to Supabase?
:test_tube: Additional Details
Using Supabase pgvector
Using OpenAI embeddings
Table structure: id, content, embedding, metadata
No filters applied in the node
Node executes without errors
:folded_hands: Any guidance is appreciated!

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: Version 2.3.2
  • Database (default: SQLite): supabase
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: mac
1 Like

Hi @Hanan_Shihady, welcome :slightly_smiling_face:

How did you initialize your database? I suspect the search function might be missing,

Did you initialize it using this guide?

this is mentioned in n8n docs as well:

On my side, I initialized it using this approach, and it’s working as expected.

hey, this is almost always a mismatch between the embedding model you’re using in n8n vs what was used to store the vectors. The Supabase Vector Store node uses whatever embedding model you’ve connected to it, so if you embedded your docs with text-embedding-ada-002 but the node is using text-embedding-3-small or something different, the dimensions might match but the vectors themselves won’t align and you get zero results. Double check the exact model on both sides.

hey, the most common reason for this is a mismatch between the embedding model you used when inserting the data vs what the Supabase Vector Store node is using to embed the query. Even if dimensions match, different models produce incompatible vectors so cosine similarity returns nothing useful. Can you confirm you’re using the exact same OpenAI embedding model (like text-embedding-ada-002 or text-embedding-3-small) in both the insert workflow and the retrieval node?