Skip to content

AR-S3-8/RAG-based-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

RAG-BASED CHATBOT WORKFLOW (n8n)

This n8n workflow implements a RAG (Retrieval-Augmented Generation) chatbot 🤖 that can answer questions based on your company documents or any dataset you provide. The bot uses Google Gemini embeddings, Pinecone vector store, and an AI Agent for contextual answers.

✨ FEATURES

  • 📂 Upload and monitor company documents from Google Drive
  • 🔄 Automatically process new or updated files
  • 🧠 Convert documents into embeddings using Google Gemini API
  • 💾 Store embeddings in Pinecone vector database
  • 🗨️ Use AI Agent to answer questions based on retrieved documents
  • 📝 Maintains conversation memory with sliding window buffer
  • ⚡ Easy to extend to new datasets

🛠️ REQUIREMENTS

  • n8n (latest version)
  • Google Cloud Project with Vertex AI API enabled
  • Google AI API Key (for Google Gemini)
  • Pinecone account with index (e.g., company-files)
  • Google Drive credentials in n8n (OAuth2)

⚡ SETUP STEPS

  1. Google Cloud Project & Vertex AI API

    • Create a project in Google Cloud ☁️
    • Enable Vertex AI API ✅
  2. Google AI API Key

    • Obtain your API key from Google AI Studio 🔑
  3. Pinecone Setup

    • Create a free account at Pinecone 🖥️
    • Create an index called company-files 📌
  4. Google Drive

    • Create a dedicated folder for company documents 📁
    • Note the folder ID 🆔
  5. Configure Credentials in n8n

    • Google Drive OAuth2 🔐
    • Google Gemini API (PaLM) 🤖
    • Pinecone API Key 🗄️
  6. Import Workflow

    • Import the provided JSON workflow into n8n 📥
  7. Configure Nodes

    • Update Google Drive Trigger nodes to watch your specific folder 👀
    • Configure Pinecone Vector Store nodes with your index 💾

💡 USAGE

  • Once the workflow is running, any new or updated document in the folder will be automatically processed.
  • Ask questions through the chatbot 🗨️ and it will retrieve the most relevant information from your documents.
  • If a question cannot be answered, the bot will respond:

    "I cannot find the answer in the available resources." ❌

📌 NOTES

  • Ensure your Google AI API Key, Pinecone API Key, and Google Drive credentials are properly configured in n8n.
  • Adjust the window buffer memory for longer or shorter conversation contexts.
  • The workflow is fully modular, so you can add more tools, vector stores, or embeddings as needed.

About

RAG based Chatbot with N8N

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors