Automated RAG Evaluation and Email Response Generation
detail.loadingPreview
This workflow automates the evaluation of AI-generated responses against ground truth data and sends automated email responses. It leverages Langchain's RAG capabilities with Supabase for data retrieval and OpenAI for embeddings, then uses Gmail for sending emails.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow is designed to automate the process of evaluating AI-generated responses and then acting upon that evaluation. It utilizes a Retrieval Augmented Generation (RAG) approach to fetch relevant information from a Supabase vector store. The core of the workflow involves comparing an "Actual Answer" generated by an AI agent (likely based on user input) against an "Expected Answer" stored in a Google Sheet. This comparison is performed by an evaluation node, which scores the accuracy and similarity of the AI's response. Based on the evaluation, an automated email response is drafted and sent via Gmail, potentially informing the user of the evaluation outcome or providing the generated answer.
Key Features
- Integrates with Gmail for triggering and sending emails.
- Leverages Langchain and Supabase for RAG-based information retrieval.
- Uses OpenAI for generating embeddings.
- Dynamically evaluates AI-generated responses against ground truth data in Google Sheets.
- Automates the sending of customized email responses based on evaluation results.
How To Use
- Configure the 'Gmail Trigger' node to receive incoming emails.
- Set up the 'When fetching a dataset row' node to pull ground truth data (expected answers) from your Google Sheet.
- Configure the 'Edit Fields' node to pass relevant subject and body data from the email to the AI agent.
- Set up the 'OpenRouter Chat Model1' and 'Supabase Vector Store' nodes to retrieve context from your knowledge base.
- Utilize the 'Support Agent' node to generate a response based on the retrieved context.
- Configure the 'Subject & Email' node to parse the structured output from the agent.
- Use the 'Evaluation' and 'Set Output' nodes to compare the generated answer with the expected answer from the dataset.
- Connect the 'Send a message' node to send an automated email response to the original sender, incorporating the evaluated output.
Apps Used
Workflow JSON
{
"id": "c70f9aac-0e86-4a20-877d-ce70e9232f23",
"name": "Automated RAG Evaluation and Email Response Generation",
"nodes": 0,
"category": "AI Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: c70f9aac-0e86...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Automate Applicant Feedback Management with Webhooks and AI
This workflow automates the processing of applicant feedback by triggering on a webhook, splitting text, embedding it, and storing it in Pinecone. It then uses a RAG Agent to process feedback and log results to Google Sheets.
RAG Agent with Memory and Supabase Vector Store
This workflow enables a Retrieval Augmented Generation (RAG) agent to converse with memory, powered by OpenAI's chat model and leveraging Supabase for vector storage. It allows the agent to recall past interactions and access information from a vector database.
RAG Agent: PDF Q&A with Supabase and OpenAI
This workflow creates a RAG (Retrieval-Augmented Generation) agent that answers questions based on a PDF document stored in Google Drive, utilizing Supabase for vector storage and OpenAI for embeddings and language generation.
n8n LangChain Guardrails for AI Safety and Content Moderation
This n8n workflow utilizes LangChain's Guardrails nodes to implement robust AI safety measures. It checks for keywords, jailbreaks, NSFW content, PII, secret keys, and topical alignment, ensuring responsible AI output.
AI Marketing Agent for Automated Content Creation
Automate your marketing content generation with this AI agent. It uses Gemini 2.5 Pro to write newsletters, create Twitter threads, generate images, and research topics using Perplexity AI.
Telegram Photoshop Agent: Automate Image Handling with AI
This n8n workflow acts as a Telegram-based Photoshop agent, leveraging AI to process and manage user-submitted images. It handles image uploads, AI edits, and file management.