๐ Create an AI knowledge base assistant using Ollama, PGVector and Telegram
โก 247 views ยท ๐ Internal Wiki & Knowledge Base
Description
This workflow automatically converts uploaded documents and text into an AI-powered searchable knowledge base using semantic vector embeddings and Retrieval-Augmented Generation (RAG). Users can upload PDFs, JSON, CSV, XLS, XLSX, or raw text files, which are automatically processed, chunked, embedded, and stored in PostgreSQL PGVector for intelligent retrieval.Questions can then be asked directly through Telegram, where the system retrieves relevant context and generates AI-powered responses using Ollama and Llama 3.
โ๏ธ How it works
Users can upload files or raw text through an n8n form interface. The workflow automatically extracts content from supported formats such as PDF, JSON, CSV, XLS, XLSX, and plain text, then splits the content into searchable chunks. Using the nomic-embed-text embedding model, vector embeddings are generated and stored in PostgreSQL with PGVector for semantic retrieval. Users can then ask questions through Telegram, where the system performs semantic similarity search to retrieve the most relevant document context. Finally, Llama 3 running via Ollama generates an AI-powered contextual response, which is sent back to the user through the Telegram bot.
๐ฆ Requirements
โข Ollama โข Llama 3 model โข nomic-embed-text embedding model โข PostgreSQL with PGVector extension โข Telegram Bot API credentials โข Docker โข Cloudflare Tunnel or ngrok (optional for public access)
๐ Supported File Types
โข PDF โข JSON โข CSV โข XLS โข XLSX โข Plain Text
๐ Use Cases
โข Personal AI knowledge base โข AI document assistant โข Semantic document search โข Internal company knowledge retrieval โข Telegram AI chatbot โข Private/self-hosted RAG system
๐ Nodes Used
Telegram, Telegram Trigger, Question and Answer Chain, Ollama Chat Model, Vector Store Retriever, n8n Form Trigger
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File