Describe the problem/error/question
I’m using the Milvus Vector Store node in “Retrieve Documents (As Tool for AI Agent)” mode.
My AI Agent produces structured metadata (academicYear, province, scholarshipName, headingTitle, etc.).
Example:
{
"canonical_question_en": "deadline edisu 2025-2026",
"metadata": {
"academicYear": "2025-2026",
"province": "piemonte",
"name": "EDISU",
"headingTitle": "DEADLINES"
},
"confidence": {
"is_confident": true,
"confidence_level": "high"
}
}
I want the Milvus Vector Store node to filter documents based on these metadata fields (multi-faceted filtering), e.g.:
-
academicYear = 2025-2026
-
province = piemonte
-
scholarshipName = EDISU
-
headingTitle = DEADLINES
However, in Tool for AI Agent mode the node only performs a semantic search + rerank, and there is no option for expr filtering or metadata-based filtering.
All chunks are returned regardless of metadata.
My question:
Is metadata filtering supported in Tool mode?
If not, what is the recommended way to perform filtering (e.g. Function node after retrieval)?
Or should I switch to Milvus REST API to use expr?
What is the error message (if any)?
There is no error.
The issue is that filtering does not happen, because the node provides no way to pass filtering instructions to Milvus.
Please share your workflow
(High-level description since workflow is large)
-
AI Agent → Metadata extracted
-
Milvus Vector Store (Tool Mode)
-
Rerank
-
LLM Answer
The missing part is multi-faceted filtering based on metadata.
Share the output returned by the last node
The node returns documents from different years/provinces even though metadata clearly indicates:
academicYear = "2025-2026"
province = "piemonte"
name = "EDISU"
headingTitle = "DEADLINES"
Example:
-
chunks from 2024-2025
-
chunks from different provinces
-
chunks from scholarship names that do not match
-
sections unrelated to the requested heading
Information on your n8n setup
n8n version: (latest)
Database: (PostgreSQL )
Executions process: (main)
Running via: (Docker )
Operating system: (Ubuntu )