đź’¬ Build an intelligent Q&A bot with Lookio Knowledge Base and GPT

⚡ 422 views · 💬 Support Chatbots

Description

Build a powerful AI chatbot that provides precise answers from your own company’s knowledge base. This template provides a smart AI agent that connects to Lookio, a platform where you can easily upload your documents (from Notion, Jira, Slack, etc.) to create a dedicated knowledge source.

What makes this agent “smart” is its efficiency. It’s configured to handle simple greetings and small talk on its own, only using its powerful (and paid) knowledge retrieval tool when a user asks a genuine question. This cost-saving logic makes it perfect for building production-ready internal helpdesks, customer support bots, or any application where you need accurate, source-based answers.

Who is this for?

What problem does this solve?

How it works

  1. First, build your knowledge base in Lookio: The process starts on the Lookio platform. You upload your documents (from Notion, Jira, PDFs, etc.) and create an “assistant” which becomes your secure, queryable knowledge base.
  2. A user asks a question: The n8n workflow begins when a user sends a message via the Chat Trigger.
  3. The agent makes a decision: The AI Knowledge Agent, guided by its system prompt, analyzes the user’s message. If it’s a simple greeting like “hi,” it will respond directly. If it’s a substantive question that requires specific knowledge, it decides to use its “Query knowledge base” tool.
  4. Query the Lookio knowledge base: The agent passes the user’s question to the HTTP Request Tool. This tool securely calls the Lookio API with your specific Assistant ID and API key.
  5. Deliver the fact-based answer: Lookio searches your documents, synthesizes a precise answer, and sends it back to the workflow. The n8n agent then presents this answer to the user in the chat interface.

Architectural Approaches to RAG in n8n with Lookio

From a workflow perspective, integrating RAG natively in n8n involves orchestrating multiple nodes for data handling, embedding, and vector searches. This method provides high visibility and control over each step.

An alternative architectural pattern is to use an external RAG service like Lookio, which consolidates these steps into a single HTTP Request node. This simplifies the workflow’s structure by abstracting the multi-stage RAG process into one API endpoint.

Setup

  1. Set up your Lookio assistant (Prerequisite): First, go to Lookio, sign up (you get 50 free credits), create an assistant with your documents, and from your settings, copy your API Key and Assistant ID.
  2. Configure the Lookio tool: In the Query knowledge base (HTTP Request Tool) node:
    • Replace the <your-assistant-id> placeholder with your actual Assistant ID.
    • Replace the <your-lookio-api-key> placeholder with your actual API Key.
  3. Connect your AI model: In the OpenAI Chat Model node, connect your AI provider credentials.
  4. Activate the workflow. Your smart knowledge base agent is now live and ready to chat!

Taking it further

đź”— Nodes Used

AI Agent, OpenAI Chat Model, Simple Memory, Chat Trigger

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup