Library / RAG & Knowledge Bases
RAG & Knowledge Bases
Answer support questions from your docs with Telegram, OpenRouter and pgvector
When something happens in a connected app, it answers questions from your own knowledge base with OpenAI / ChatGPT and OpenRouter using Postgres, PGVector, Telegram.
What it does
## AI Support Agent With Human Handoff Answers customers from your own docs, and hands off to a human instead of guessing. ### How it works 1. A customer messages your Telegram bot. 2. The knowledge base is searched and the best match is scored. 3. If the match is strong, an AI agent with chat memory answers from your docs. 4. If the match is weak, or the agent is unsure, the customer is told a human will reply. 5. Your support chat gets the question. Your answer goes to the customer and is saved as a new FAQ, so next time the AI knows it. 6. Every question, answer and error is logged in Postgres. Use it with Sync Google Drive docs to a Postgres pgvector knowledge base with change detection.
The steps
- New Telegram Message
- Agent Settings
- Search Knowledge Base
- Embeddings for Search
- Prepare Agent Error
- Log Error in Postgres
- Alert Support Team About Error
- Score Retrieval Confidence
- Is Retrieval Confident Enough?
- Answer From Your Docs
- OpenRouter Chat Model
- Remember This Chat in Postgres
- Knowledge Base Search Tool
- Embeddings for Agent Tool
28 steps in total.
Similar automations
RAG & Knowledge BasesEmbed Gmail Emails in PGVector with Ollama16 stepsRAG & Knowledge BasesSearch New Gmail Emails with PGVector and OpenAI RAG11 stepsRAG & Knowledge BasesSearch Emails by Meaning and Structure with a Chatbot16 stepsRAG & Knowledge BasesLoad Google Drive Files into a PGVector Database14 steps