Intelligent AI Assistant with RAG and Web Search
detail.loadingPreview
Empower your AI assistant with cutting-edge capabilities. This workflow integrates a powerful AI agent with both a RAG database for general knowledge and a web search tool for real-time information, ensuring comprehensive and accurate responses.
About This Workflow
This n8n workflow creates a sophisticated AI assistant capable of handling diverse queries. At its core, an AI Agent acts as the orchestrator, guided by a system message that directs it to leverage specific tools based on the query. For general knowledge and contextual understanding, it utilizes a RAG (Retrieval Augmented Generation) database accessed via an MCP Client. When current events or up-to-date information is needed, it seamlessly switches to a web search tool, also managed through an MCP Client. The Ollama Chat Model provides the underlying language generation capabilities, while Simple Memory ensures conversational continuity. This setup allows for dynamic and intelligent interactions, providing users with the most relevant information from either their private knowledge base or the live web.
Key Features
- Hybrid Knowledge Access: Combines RAG database for deep, private knowledge with real-time web search for current information.
- Intelligent Query Routing: Dynamically chooses between RAG and web search based on the nature of the user's request.
- Conversational Memory: Maintains context and continuity through a simple memory buffer.
- Flexible AI Model Integration: Utilizes Ollama for versatile and local LLM deployment.
- Tool Orchestration: Leverages n8n's AI Agent to intelligently manage and utilize multiple tools.
How To Use
- Trigger Configuration: Set up the 'When chat message received' node to capture incoming messages. This will likely involve configuring a webhook.
- AI Agent Setup: Configure the 'AI Agent' node with a detailed system message that clearly defines its purpose and the tools it can access. Specify which tool to use for different types of queries (e.g., RAG for general, web search for current events).
- Language Model: Connect your 'Ollama Chat Model' to the 'AI Agent' node as its language model.
- Memory: Integrate the 'Simple Memory' node with the 'AI Agent' to enable conversational context.
- RAG Tool: Connect the 'MCP Client: RAG' node to the 'AI Agent' as an available tool, ensuring its SSE endpoint is correctly configured.
- Web Search Tool: Configure both 'MCP Client:BD_Tools' and 'MCP Client:BD_Execute' nodes. 'MCP Client:BD_Tools' should be set up to use the 'search_engine' tool, and 'MCP Client:BD_Execute' will handle the actual execution. Ensure the credentials for 'MCP Client (STDIO) account' are correctly set up.
Apps Used
Workflow JSON
{
"id": "a88390f6-9168-4227-9f37-87ed0d8563e0",
"name": "Intelligent AI Assistant with RAG and Web Search",
"nodes": 17,
"category": "Marketing",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: a88390f6-9168...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Related Workflows
Discover more workflows you might like
AI-Powered On-Page SEO Audit & Report Automation
Instantly generate comprehensive on-page SEO technical and content audits for any website URL. This AI-powered workflow automates the entire process, from scraping the page to delivering a detailed report directly to your inbox, empowering you to optimize for better search rankings and user engagement.
Automate LinkedIn Content Promotion for Your Ghost Blog with AI
Effortlessly promote your latest Ghost blog posts on LinkedIn. This workflow leverages AI to generate engaging, professional LinkedIn messages based on your article content and saves them, along with article metadata, directly to a Google Sheet.
AI-Powered Instagram Comment Automation
This n8n workflow intelligently automates responses to Instagram comments, leveraging advanced AI to engage with your audience. It filters out irrelevant content and personalizes replies, saving you time while boosting your social media presence.