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