Discover how n8n’s new Cohere integration can transform your AI agents in Wassenger
Have you ever built a chatbot that seemed promising but then delivered irrelevant or confusing answers? You’re not alone. One of the biggest challenges in building intelligent AI agents is getting them to provide accurate and relevant responses consistently.
The good news is that n8n just launched a game-changing revolutionary feature: integration with Cohere re-rankers. And the best part is that you can now leverage this powerful technology directly from Wassenger Flows, without needing to set up servers or deal with complex installations.
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡
What are Re-rankers and Why Do They Matter?
Imagine you have a giant library with thousands of books. When someone asks you something, you need to find the most relevant books quickly. Traditional vector search methods are like a librarian who works very fast but sometimes brings books that aren’t exactly what you need.
Re-rankers are like a second expert librarian who reviews that first selection and delivers only the most useful and accurate books for your specific query.
The Problem with Traditional Vector Search
In a typical RAG (Retrieval-Augmented Generation) system, the process works like this:
- Documents are split into small chunks of text
- Each chunk is converted into numbers (vectors) that represent its meaning
- When you ask a question, it’s also converted into numbers
- The system searches for chunks that are mathematically “closest” to your question
The problem? This search can miss important nuances. It’s like searching for similar songs only by their rhythm, ignoring the lyrics or genre.
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡
The Solution: Two-Stage Search
Re-rankers implement what’s known as a two-stage search:
Stage 1: Broad Retrieval
- The system searches for a large number of potential results (20–50 chunks)
- It’s fast but not perfectly precise
Stage 2: Intelligent Re-ranking
- Re-rankers analyse both your question and each chunk simultaneously
- They generate super-precise relevance scores
- They return only the 3–5 most useful chunks
Wassenger Flows: The Cloud Revolution Has Arrived
This is where Wassenger Flows becomes your best ally. Traditionally, implementing these advanced technologies required:
- ✗ Setting up your servers
- ✗ Installing and maintaining n8n
- ✗ Managing updates and dependencies
- ✗ Advanced technical knowledge
With Wassenger Flows, all of this disappears. Our new feature includes all the power of n8n’s interface directly in the cloud, which means you can:
- ✅ Create advanced AI agents without technical setup
- ✅ Use Cohere re-rankers with just a few clicks
- ✅ Implement hybrid search without headaches
- ✅ Scale automatically according to your needs
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡
Practical Implementation: Step by Step
Basic Setup in Wassenger Flows
- Access Wassenger Flows from your account
- Create a new flow using the “AI Agent with Re-ranking” template
- Connect your vector database (E.g., Supabase, Pinecone).
- Add your Cohere API key in the credentials
- Enable the “Re-rank Results” toggle
Advanced Setup: Hybrid Search
For more complex use cases, Wassenger Flows allows you to implement:
- Metadata filtering: Search only in relevant subsets of your information
- Hybrid search: Combine vector search with full-text search
- Multiple re-rankers: For different types of queries
Get the Full workflow here 👇
{
"name": "AI Agent Rerank Cohere",
"nodes": [
{
"parameters": {
"options": {
"systemMessage": "=# Company Business Intelligence Assistant\n\nYou are \"[REDACTED_COMPANY_NAME]\", a specialized business intelligence assistant for the company.Your primary responsibility is to provide answers exclusively based on the available knowledge sources.\n\n## Knowledge Sources\nYou have access to two critical knowledge bases:\n1.**CompanyDocuments** - Contains business documents, service guides, company information, and operational procedures\n2.**RestaurantLeads** - Contains potential restaurant client data including ratings, contact information, business details, and market insights\n\n## 🚨 CRITICAL: Tool Selection Protocol\n\n### MANDATORY Tool Usage Rules:\n**CompanyDocuments tool MUST be used for:**\n- ANY question about company services, capabilities, or offerings\n- Pricing inquiries(\"how much\", \"cost\", \"price\", \"fee\")\n- Company information(\"about the company\", \"what is the company\", \"company details\")\n- Business processes(\"how does the company work\", \"process\", \"procedure\")\n- Service features and benefits\n- Any question containing keywords: company, service, price, cost, business, how to, process, capability, offering\n\n**RestaurantLeads tool MUST be used for:**\n- Lead generation and prospecting requests\n- Restaurant recommendations and listings\n- Market analysis and competitive intelligence\n- Location-based restaurant queries\n- Rating, review, and business characteristic analysis\n- Contact information and outreach data\n\n### Search Strategy Hierarchy:\n1.**Company-specific queries** → Use CompanyDocuments FIRST, always\n2.**Restaurant/lead queries** → Use RestaurantLeads FIRST\n3.**Business intelligence/strategy** → Use BOTH tools sequentially\n4.**Ambiguous queries** → Default to CompanyDocuments first, then RestaurantLeads if needed\n\n## Execution Process(Follow Strictly):\n1.**Query Classification**: \n - Identify if query mentions company, services, pricing, or company info\n - If YES → Immediately use CompanyDocuments tool\n - If restaurant/lead focused → Use RestaurantLeads tool\n - If business strategy → Use both tools\n\n2.**Tool Selection Verification**:\n - Double-check that you're using the correct tool for the query type\n - When in doubt about company-related content → ALWAYS search CompanyDocuments\n\n3.**Search Execution**: \n - Execute search in identified tool(s) before generating any response\n - Use specific, relevant keywords from user query\n\n4.**Response Generation**: \n - Base response entirely on search results\n - Clearly cite which knowledge base provided the information\n - Match user's language(Indonesian/English)\n\n## Core Operating Principles\n- **MANDATORY SEARCH**: Never respond without searching appropriate knowledge base first\n- **NO EXTERNAL KNOWLEDGE**: Absolutely no information from outside the knowledge bases\n- **EXPLICIT SOURCE CITATION**: Always state \"Based on CompanyDocuments...\" or \"According to RestaurantLeads...\"\n- **LANGUAGE MATCHING**: Respond in exact same language as user input\n- **ACCURACY OVER COMPLETENESS**: Better to say \"no information found\" than guess\n\n## Quality Assurance Checklist\nBefore every response, verify:\n- ✅ Did I search the appropriate knowledge base?\n- ✅ Is my answer based solely on search results?\n- ✅ Did I cite the correct source?\n- ✅ Am I responding in the user's language?\n- ✅ Did I avoid using external knowledge?\n\n## Error Handling\nIf no relevant information found in knowledge bases:\n- **English**: \"I searched [specific knowledge base] but don't have information about [topic].Could you provide more specific details or rephrase your question?\"\n- **Indonesian**: \"Saya telah mencari di [basis pengetahuan spesifik] tetapi tidak memiliki informasi tentang [topik].Bisakah Anda memberikan detail yang lebih spesifik atau mengubah pertanyaan Anda?\"\n\n## Debugging Mode\nAlways mention in your response which tool you used:\n- \"After searching CompanyDocuments...\"\n- \"Based on my search in RestaurantLeads...\"\n- \"From both knowledge bases...\"\n\nThis helps identify if tool selection is working correctly.\n\nRemember: Your value comes from providing accurate, source-backed intelligence from the company's specific business context and restaurant lead database.Always search first, cite sources, and match the user's language."
}
},
"id": "[REDACTED_NODE_ID]",
"name": "AI Agent1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [420, 1340],
"typeVersion": 2
},
{
"parameters": {
"options": {}
},
"id": "[REDACTED_NODE_ID]",
"name": "Embeddings OpenAI3",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [620, 1660],
"typeVersion": 1.2
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolName": "CompanyDocuments",
"toolDescription": "=MANDATORY TOOL for questions about: CompanyDocument services, pricing, company information, business processes, operational procedures, service capabilities, company policies, internal guidelines, and any [REDACTED_COMPANY_NAME]-specific business inquiries.Always use this tool first when users ask about [REDACTED_COMPANY_NAME] services or company information.",
"tableName": {
"__rl": true,
"mode": "list",
"value": "documents",
"cachedResultName": "documents"
},
"topK": 20,
"useReranker": true,
"options": {}
},
"id": "[REDACTED_NODE_ID]",
"name": "RAG1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [640, 1520],
"typeVersion": 1.1
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolName": "RestaurantLeads",
"toolDescription": "=Search restaurant leads database containing potential client information, ratings, contact details, business characteristics, location data, and market insights.Use for lead generation, market analysis, and client prospecting.",
"tableName": {
"__rl": true,
"mode": "list",
"value": "restaurant_leads",
"cachedResultName": "restaurant_leads"
},
"topK": 20,
"useReranker": true,
"options": {}
},
"id": "[REDACTED_NODE_ID]",
"name": "Leads1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [920, 1520],
"typeVersion": 1.1
},
{
"parameters": {
"options": {}
},
"id": "[REDACTED_NODE_ID]",
"name": "Embeddings OpenAI4",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [940, 1660],
"typeVersion": 1.2
},
{
"parameters": {
"content": "# Send Message",
"height": 580,
"width": 1360,
"color": 4
},
"id": "[REDACTED_NODE_ID]",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [60, 1240],
"typeVersion": 1
},
{
"parameters": {
"contextWindowLength": 20
},
"id": "[REDACTED_NODE_ID]",
"name": "Chat Memory",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [500, 1500],
"typeVersion": 1.3
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"id": "[REDACTED_NODE_ID]",
"name": "Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [360, 1500],
"typeVersion": 1.2
},
{
"parameters": {
"modelName": "rerank-multilingual-v3.0"
},
"id": "[REDACTED_NODE_ID]",
"name": "Reranker Cohere",
"type": "@n8n/n8n-nodes-langchain.rerankerCohere",
"position": [760, 1660],
"typeVersion": 1
},
{
"parameters": {
"modelName": "rerank-multilingual-v3.0"
},
"id": "[REDACTED_NODE_ID]",
"name": "Reranker Cohere1",
"type": "@n8n/n8n-nodes-langchain.rerankerCohere",
"position": [1060, 1660],
"typeVersion": 1
},
{
"parameters": {
"events": ["message:in:new"]
},
"type": "n8n-nodes-wassenger.wassengerTrigger",
"typeVersion": 1,
"position": [220, 1340],
"id": "[REDACTED_NODE_ID]",
"name": "Wassenger Trigger",
"webhookId": "[REDACTED_WEBHOOK_ID]",
"credentials": {
"wassengerApiKey": {
"id": "[REDACTED_CREDENTIAL_ID]",
"name": "[REDACTED_CREDENTIAL_NAME]"
}
}
}
],
"pinData": {},
"connections": {
"RAG1": {
"ai_tool": [
[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Leads1": {
"ai_tool": [
[
{
"node": "AI Agent1",
"type": "ai_tool",
"index": 0
}
]
]
},
"Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Chat Memory": {
"ai_memory": [
[
{
"node": "AI Agent1",
"type": "ai_memory",
"index": 0
}
]
]
},
"Reranker Cohere": {
"ai_reranker": [
[
{
"node": "RAG1",
"type": "ai_reranker",
"index": 0
}
]
]
},
"Reranker Cohere1": {
"ai_reranker": [
[
{
"node": "Leads1",
"type": "ai_reranker",
"index": 0
}
]
]
},
"Embeddings OpenAI3": {
"ai_embedding": [
[
{
"node": "RAG1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Embeddings OpenAI4": {
"ai_embedding": [
[
{
"node": "Leads1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Wassenger Trigger": {
"main": [
[
{
"node": "AI Agent1",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "[REDACTED_VERSION_ID]",
"meta": {
"instanceId": "[REDACTED_INSTANCE_ID]"
},
"id": "[REDACTED_WORKFLOW_ID]",
"tags": []
}
Real-World Use Cases
1. Intelligent Customer Support
- Problem: Generic responses that don’t solve specific doubts
- Solution: Re-rankers that identify exactly the most relevant help article
2. Sales Assistants
- Problem: Imprecise product recommendations
- Solution: Re-ranking that considers history, preferences, and current context
3. Educational Chatbots
- Problem: Explanations that don’t adapt to the student’s level
- Solution: Re-rankers that prioritise content appropriate for each user
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡
Measurable Results
Cohere’s benchmarks show dramatic improvements:
- Up to 40% more accuracy in relevant responses
- 60% reduction in irrelevant or confusing answers
- Higher user satisfaction when receiving more useful information
Your Next Step
Ready to take your AI agents to the next level?
Wassenger Flows makes implementing these advanced technologies as simple as drag-and-drop. You don’t need to be an AI expert or spend nights configuring servers.
Start Today:
- Sign up at Wassenger.com
- Go to Flows from your account
- Explore our templates
- Build your first intelligent agent in minutes
The AI agent revolution is here, and with Wassenger Flows, it’s within everyone’s reach. Why settle for mediocre responses when you can offer extraordinary experiences?
👉 Start your 7-day free trial on Wassenger and leverage our powerful WhatsApp automation flows to transform your customer service today! ⚡











