Create an AI knowledge base assistant using Ollama, PGVector and Telegram
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
Related Templates
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Build a Restaurant Voice Assistant with VAPI and PostgreSQL for Bookings & Orders
This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reser...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments