Hi everyone,
I’m building a RAG workflow in n8n using the AI Agent node connected to a Postgres (pgvector) Vector Store.
I have already enabled the “Include Metadata” option in the Postgres Vector Store node, so the metadata is being retrieved along with the document content. However, I’m unclear about how the Agent actually perceives and utilizes this information.
Specifically:
-
Does the Agent need a System Message (instructions) to understand the schema and the meaning of the metadata fields I’m passing?
-
If I don’t explicitly describe the metadata in the System Prompt, can the Agent still use it to filter results or prioritize information, or does it just treat it as “extra text” within the context?
-
Since I am using pgvector, what is the best practice in n8n to ensure the Agent performs Metadata Filtering (e.g., via the “Filter” parameter) instead of just simple similarity search?
I want to make sure the Agent doesn’t ignore important fields like date, category, or user_id when answering user queries.
Thank you! ![]()