This n8n workflow calculates the 'document groundedness' metric for RAG systems using OpenAI, assessing if responses are based solely on retrieved documents to detect hallucinations.
This workflow automates the evaluation of Retrieval-Augmented Generation (RAG) response accuracy by computing the 'document groundedness' metric. It uses an OpenAI LLM to analyze whether the generated response contains information exclusively from provided retrieved documents, flagging potential hallucinations or deviations. Adapted from Google Vertex AI's pointwise groundedness template, it processes inputs like user questions, agent responses, and context documents to output a precise score.
Platform
n8n
Category
AI & Machine Learning
Price
$14.99
Creator
Jordi Faber
RAG
OpenAI
Groundedness
LLM Evaluation
AI Metrics
Hallucination Detection
Document Retrieval
Text Analytics
Machine Learning
How to import this workflow into n8n
1Purchase or download the workflow to get the n8n workflow JSON file.
2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
3Open each node marked with a credential warning and connect your own accounts and API keys.
4Run the workflow once manually to verify the data flow, then toggle it to Active.