RAG data retrieve from the vector DB, supabase

Describe the problem/error/question

I set up the RAG workflow to retrieve the data from supabase vector store. I used the Google Gemini Chat Model in Tools Agent. for Supabase vector store I used the Embeddings Google Gemini. After gave the chat, the process did not retrieve the data from supabase vector store. Is there any solution for it?

What is the error message (if any)?

The process in retrieving data from vector store did not work. There is no error message.

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)


## Share the output returned by the last node
<!-- If you need help with data transformations, please also share your expected output. -->

## Information on your n8n setup
- **n8n version: 1.67.1
- **Database (default: SQLite): 
- **n8n EXECUTIONS_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app): Docker/npm
- **Operating system: windows
1 Like

Anyone could help on this issue?

Welcome to the community @Schumy_Kuan !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


Perhaps you need to adjust your prompt to AI Agent. If it finds the answer within the model it will not look into the tool.

You are using the default prompt. Try to customize it with more specific instruction what is expected of the agent.

I just had the same issue. Disabling the RLS policy in the Supabase table helps.

I have the same problem. At the first request, the vector storage is accessed, then it does not work.

  • Disabling the RLS
  • using the default prompt
    but nothing helps

image
change this limit to a large number

I’m experiencing the same issue. I can’t retrieve the data. Has anyone been able to solve this problem?

Yes solved,

the problem in the Subapase side not from N8N. let me explain it.

Row-Level Security (RLS):
By default, Supabase enables RLS on your tables. If no policies are defined to allow SELECT operations for the role you’re using (for example, the anon key), then even though your SQL query works in your database console (which might be using a different role), your API request will return no records.

Solution:

  • add a policy on the table using these details:
    CREATE POLICY policy_name
    ON public.table_name
    AS PERMISSIVE
    FOR SELECT
    TO anon
    USING (true);

after that, all the records will returned.

1 Like

"I’ll try it in a bit and write the result. Thanks for getting back to me.

It worked, thanks buddy!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.