Library / RAG & Knowledge Bases
RAG & Knowledge Bases
Evaluate RAG Document Relevance with OpenAI and Google Sheets
When a dataset row is fetched or a chat message arrives, a RAG agent answers and OpenAI scores the relevance of the retrieved documents.
What it does
## How it works This template shows how to calculate a workflow evaluation metric: retrieved document relevance (i.e. whether the information retrieved from the vector store is relevant to the question). The workflow takes a question and checks whether the information retrieved to answer it is relevant. You can find more information on workflow evaluation here, and other metric examples here.
The steps
- When fetching a dataset row
- Evaluating?
- When chat message received
- Match chat format
- Return chat response
- Set metrics
- Get dataset
- Remove Duplicates
- Simple Vector Store
- Embeddings OpenAI
- Default Data Loader
- Recursive Character Text Splitter
- When clicking ‘Execute workflow’
- Calculate doc relevance metric
19 steps in total.
Similar automations
RAG & Knowledge BasesEvaluate RAG Groundedness with OpenAI21 stepsWeb Scraping & ResearchFind Quality YouTube Videos with Relevance Scoring into Sheets16 stepsAI Agents & AssistantsEvaluate AI Agent Relevance with OpenAI and Cosine Similarity17 stepsRAG & Knowledge BasesDocument Chatbot with RAG, OpenAI, Supabase and Cohere Reranker13 steps