Description

n8n-nodes-reranker-ollama
Use Ollama Reranker to reorder retrieved documents by their relevance to a given query.
This node leverages locally served reranker models (via Ollama) to perform cross-encoder–style relevance scoring.
Built on the official n8n Community Node Starter, so you can develop, lint, and ship confidently.
✨ Supported Models
This node currently supports Qwen3 Rerankers by @dengcao:
dengcao/Qwen3-Reranker-8Bdengcao/Qwen3-Reranker-4Bdengcao/Qwen3-Reranker-0.6B
All variants and quantizations (e.g., :Q5_K_M, :Q8_0) are automatically detected.
If you’d like to request support for other reranker models, please open a GitHub issue or feature request so it can be added to the whitelist.
📦 Installation
🧩 Community Nodes (recommended)
You can install this node directly from the n8n Community Nodes interface:
- Go to Settings → Community Nodes in your n8n instance.
- Enable Community Nodes if you haven’t already.
- Enter the package name:
- Confirm and install.
⚙️ Usage
- Add the Reranker Ollama node to your workflow.
- Connect it after a retriever or vector search node (e.g., Qdrant, Pinecone, Weaviate, etc.).
- Provide:
- Query text – the user query or search question.
- Documents array – the list of retrieved text chunks.
- Choose a supported Qwen3 Reranker model.
- The node outputs documents reordered by their relevance scores (0–1 scale).
🧠 Example
| Query | Documents | Output (ranked) |
|---|---|---|
| "What is the capital of China?" | 1️⃣ "Beijing is the capital of China." 2️⃣ "Gravity is a force that attracts masses." |
✅ 1️⃣ Relevant 🚫 2️⃣ Irrelevant |
🤝 Contributing
Contributions and new model requests are welcome!
If you’d like to see support for another reranker model, please:
- Open a GitHub issue, or
- Submit a pull request with your proposed model configuration.