Monitor RAG answer quality daily with OpenAI, data tables and Telegram
Ready for 3.0What this workflow does
This AI workflow has 25 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Embeddings OpenAI, OpenAI Chat Model and Telegram.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Set monitor settings (Edit Fields (Set)): sets 7 fields: topK, minRetrievalHitRate, minGroundedness…
- Sample help center articles (Code): runs custom JavaScript code
- Index articles (Simple Vector Store): stores documents in the Simple vector store, with embeddings: Embeddings for indexing; document loader: Load article text
- Golden test set (Code): runs custom JavaScript code
- Loop over test cases (Loop Over Items (Split in Batches)): loops over the items in batches
- Summarize run (Code): runs custom JavaScript code
- Ensure results table exists (Data table): create (table)
- Retrieve context (Simple Vector Store): searches the Simple vector store, with embeddings: Embeddings for retrieval
- Get previous run (Data table): get (row)
- Build context (Code): runs custom JavaScript code
…plus 7 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (14)
- Manual Trigger
n8n-nodes-base.manualTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Simple Vector Store
@n8n/n8n-nodes-langchain.vectorStoreInMemory - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - No Operation, do nothing
n8n-nodes-base.noOp - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Data table
n8n-nodes-base.dataTable - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram
From the author
Quick Overview This workflow runs daily to evaluate a RAG-style support bot using OpenAI for embeddings, answer generation, and judging, stores run metrics in n8n Data Tables, and sends a Telegram alert when retrieval accuracy or answer quality drops. How it…