Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / RAG & Knowledge Bases

RAG & Knowledge Bases

Build a Documentation Expert Chatbot with a RAG Pipeline

When run manually or on a chat message, the workflow loads documentation into a vector store with OpenAI and answers questions as a retrieval-augmented chatbot.

What it does

# Tutorial: Build an AI Expert with RAG Welcome! This workflow teaches you RAG (Retrieval-Augmented Generation) using n8n's built-in tools. The Goal: To create an AI chatbot that is an expert on a specific topic (the n8n docs) and *never* makes up answers. It has two parts: 1. TOP FLOW (Indexing): You run this once manually to build the AI's knowledge base. It reads the n8n docs and stores them in n8n's in-memory vector store. 2. BOTTOM FLOW (Chat): This is the live chatbot. It retrieves relevant info from the knowledge base to answer your questions accurately.

The steps

  1. Simple Memory
  2. Default Data Loader
  3. Recursive Character Text Splitter
  4. Remove Duplicate Documentation Content
  5. Only Keep Doc Paths
  6. Clean Documentation
  7. Get All n8n Documentation Links
  8. Extract Links from HTML
  9. Split Out Links
  10. Remove Duplicate Links
  11. Add Documentation Page to Vector Store
  12. Get Documentation Page
  13. Extract Documentation Content
  14. Loop Over Documentation Pages

23 steps in total.

Similar automations