🎯 Learning Objectives
Understand how to enrich your vector database with metadata for better filtering.
Learn how rerankers improve search results beyond raw embeddings.
Build workflows in n8n to query with metadata and rerank retrieved results.
1. Why Metadata Matters
Embeddings capture meaning, but sometimes you need structured filters.
Example: You have 500 documents embedded, but you only want:
Articles written in 2025
From category = “Services”
Business Forms
👉 That’s where metadata comes in. You can store extra fields alongside the text + embedding.
2. Adding Metadata
Metadata is added in Default Data Loader node:
Under Options > Add Option > Metadata
Then Add property
Give it a Name and Value
👉 If you need firecrawl in scraping to add the website content to your vector store and support us at the same time, you can register using our affiliate link
3. Querying with Metadata in n8n
Metadata is filtered in Vector Store:
Turn on Include Metadata
Under Metadata Filter add the Name and Value
No AI input option for the Value, the work around is to have an AI node bfore the AI that have the vector store to decide on the filter value and pass it in the vector store node
4. Why Rerankers?
Even with embeddings, the top result isn’t always the best.
Embedding similarity ≠ exact relevance.
Example: Searching “pricing” might return “discount policies” before the actual “pricing table.”
A reranker model takes your query + candidate results and re-orders them by relevance.
Think of it like a librarian saying: “Yes, these are the 5 closest books, but this one is the most relevant to your exact question.”
5. Adding a Reranker
The only supported reranker by n8n for now is Cohere
go to https://cohere.com/
regirter for an account
in vector store turn on Rerank Resuls
then increase the Limit
add the Cohere node and input your credentials
choose a Model and how many top output (Top N) you want to pass to your AI
✅ Key Takeaways
Metadata makes your vector DB smarter by letting you filter results.
Rerankers improve accuracy by reordering similarity matches.
Combined, they make your AI workflows reliable and context-aware.