Supabase Vector Store returned no results — debugging journey & findings
I ran into an issue where the Supabase Vector Store node returned empty results in n8n, even though my embeddings and data were correctly stored.
Debug step (Option A — direct RPC test)
I created an HTTP Request node to call the Supabase RPC (match_documents) directly.
Result:
-
RPC returned matching rows

-
Embeddings valid (
vector(1536))
-
Supabase access & permissions OK

This proved the problem was not Supabase, embeddings, or RPC.
Fix: wrong operation mode
The node was set to Get Many, which does not perform similarity search.
Changing the mode to:
Retrieve Documents (As Tool for AI Agent)
enabled vector search.
New issue discovered: AI Agent rewrites tool input
The core issue is that the json.input field generated by the AI Agent does not preserve the meaning of the user’s original question.
As a result, the tool receives a different query than what the user actually asked.
Example
-
User question:
“My baby feeds for a short time and then unlatches. Is this normal?” -
Tool received (
$json.input):
“Tips to prevent nipple cracks during breastfeeding.”
Because the rewritten query has a different meaning, the Supabase vector search returns no results, even though relevant content exists for the original question.
What I need
I’m looking for a deterministic way to ensure the AI Agent generates precise and faithful tool input, ideally by:
-
Passing the user’s original question unchanged, or
-
Preserving the original meaning when generating the tool input.
Has anyone found a reliable method to control or constrain tool input generation in the AI Agent?