⚒️ Evaluate RAG response accuracy with OpenAI: document groundedness metric

1,671 views · ⚒️ Engineering

Description

This n8n template demonstrates how to calculate the evaluation metric “RAG document groundedness” which in this scenario, measures the ability to provide or reference information included only in retrieved vector store documents.

The scoring approach is adapted from https://cloud.google.com/vertex-ai/generative-ai/docs/models/metrics-templates#pointwise_groundedness

How it works

Requirements

🔗 Nodes Used

HTTP Request, AI Agent, Basic LLM Chain, Embeddings OpenAI, OpenAI Chat Model, Structured Output Parser

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup