Describe the problem/error/question
I would like to return more parameters than the one by default in the match_documents function proposed when setting up the supabase vector store (here)
What is the error message (if any)?
– Create a function to search for documents
Basically I want to do something like this:
create function match_documents (
query_embedding vector(1536),
match_count int default null,
filter jsonb DEFAULT ‘{}’
) returns table (
id bigint,
content text,
metadata jsonb,
additionalcolumnthatIwanttogiveaccessto TEXT,
similarity float
)
language plpgsql
as $$
#variable_conflict use_column
begin
return query
select
id,
content,
metadata,
additionalcolumnthatIwanttogiveaccessto TEXT,
1 - (documents.embedding <=> query_embedding) as similarity
from documents
where metadata @> filter
order by documents.embedding <=> query_embedding
limit match_count;
end;
$$;
But the RAG agent does not seem to recognize additional output. Are the three existing outputs (id, content, metadata) hard wired, so we can’t add others?
Please share your workflow
Basic rag, nothing fancy:
Share the output returned by the last node
Information on your n8n setup
- n8n version: 1.81.0
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
- Operating system: /