Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. New Telegram Message
  2. Agent Settings
  3. Search Knowledge Base
  4. Embeddings for Search
  5. Prepare Agent Error
  6. Log Error in Postgres
  7. Alert Support Team About Error
  8. Score Retrieval Confidence
  9. Is Retrieval Confident Enough?
  10. Answer From Your Docs
  11. OpenRouter Chat Model
  12. Remember This Chat in Postgres
  13. Knowledge Base Search Tool
  14. Embeddings for Agent Tool

28 steps in total.

Similar automations