← All projects
n8nweaviatecohereopenai

Arabic RAG knowledge assistant

Drop documents into a folder — get a Telegram assistant that answers only from what's actually inside them, fluently in Arabic.

Full workflow walkthrough available on request.Get in touch

Problem

Teams end up with piles of PDFs and documents but no fast way to query them. Generic AI chatbots make it worse — they'll confidently answer even when they don't actually know, and most don't handle Arabic content well to begin with.

Solution

A retrieval-augmented (RAG) system: drop a file into a watched Google Drive folder, and it's automatically chunked, embedded, and indexed into a Weaviate vector database. A Telegram bot then answers questions strictly from that indexed content — reranked with Cohere for relevance, with persistent conversation memory via MongoDB, and native Arabic handling throughout. It also accepts photos of documents sent directly in the chat and reads them.

Architecture

Actual production workflow, built in n8n

Knowledge base ingestion:
Google Drive (new file / manual sync)
   → Download file
   → Merge
   → HTTP Request (text extraction)
   → Chunk (recursive character splitter)
   → Embed (OpenAI)
   → Weaviate (vector store)

Chat:
Telegram message
   → If (text or image)
   → [image → analyze directly] / [text → pass through]
   → AI Agent (OpenAI + MongoDB memory + Weaviate retrieval + Cohere reranker)
   → Reply on Telegram

Results

Answers are grounded strictly in the uploaded documents — if the knowledge base doesn't contain the answer, the bot says so instead of guessing.

Tech stack

n8nTelegram Bot APIWeaviateOpenAI (embeddings + chat + vision)Cohere (reranker)MongoDBGoogle Drive

Got a process eating hours every week?

Let's talk