Evaluator Rag Recall
LangChain Hub prompt: john-chatly/evaluator-rag-recall
You will be given a GROUND_TRUTH_PASSAGE (the ideal response) and an LLM_RETURNED_PASSAGE returned by an LLM as part of a Retrieval-Augmented Generation (RAG) process. Your task is to evaluate the LLM_RETURNED_PASSAGE for RECALL to assess how well it captures the information from the GROUND_TRUTH_PASSAGE. Please approach this evaluation with careful consideration and strive for precision in your assessments.
Evaluation Steps:
-
Thoroughly analyze the given GROUND_TRUTH_PASSAGE and LLM_RETURNED_PASSAGE.
-
Assess the LLM_RETURNED_PASSAGE for RECALL: Evaluate the extent to which the LLM_RETURNED_PASSAGE contains the key information present in each passage of the GROUND_TRUTH_PASSAGE. The GROUND_TRUTH_PASSAGE is structured as follows:
[ESSENTIAL PASSAGE] ... some text ... [ESSENTIAL PASSAGE] ... some text ... [BONUS PASSAGE] ... some text ... [BONUS PASSAGE] ... some text ...- After carefully analyzing the contents of [ESSENTIAL PASSAGE] and [BONUS PASSAGE], evaluate the extent to which the LLM_RETURNED_PASSAGE contains the contents of each [ESSENTIAL PASSAGE] and [BONUS PASSAGE].
- Score each ESSENTIAL passage on a scale of 1-5.
- Score each BONUS passage on a scale of 0-5.
- Provide a detailed, step-by-step analysis of your reasoning process, explicitly explaining how you arrived at your score for each passage.
-
Calculate the final RECALL score using the following formulas:
RECALL_Essential_Formula: (sum of ESSENTIAL scores) / E RECALL_Bonus_Formula: (sum of BONUS scores) / (E * B * 2) RECALL_Combined_Formula: RECALL_Essential_Formula + RECALL_Bonus_Formula RECALL_Final_Score_Calculation: min(5, RECALL_Combined_Formula) RECALL_Final_Score: This is the final result of RECALL_Final_Score_CalculationWhere:
- Let E be the number of ESSENTIAL passages and B be the number of BONUS passages.
- Only express decimals to a maximum of 2 decimal places (round up from 3).
- If the result exceeds 5, cap it at 5.
-
Format your evaluation as shown in the Example Outputs below.
Example Outputs:
Example 1:
-
RECALL_Reasoning: [ESSENTIAL PASSAGE] 1: ... [Provide detailed analysis and reasoning for the score] ... Score: 4 [ESSENTIAL PASSAGE] 2: ... [Provide detailed analysis and reasoning for the score] ... Score: 3 [BONUS PASSAGE] 1: ... [Provide detailed analysis and reasoning for the score] ... Score: 4 [BONUS PASSAGE] 2: ... [Provide detailed analysis and reasoning for the score] ... Score: 0
-
RECALL_Essential_Formula: (4 + 3) / 2 = 3.5
-
RECALL_Bonus_Formula: (4 + 0) / (2 * 2 * 2) = 0.5
-
RECALL_Combined_Formula: 3.5 + 0.5 = 4
-
RECALL_Final_Score_Calculation: min(5, 4) = 4
-
RECALL_Final_Score: 4
Example 2:
-
RECALL_Reasoning: [ESSENTIAL PASSAGE] 1: ... [Provide detailed analysis and reasoning for the score] ... Score: 4 [ESSENTIAL PASSAGE] 2: ... [Provide detailed analysis and reasoning for the score] ... Score: 4 [ESSENTIAL PASSAGE] 3: ... [Provide detailed analysis and reasoning for the score] ... Score: 3 [BONUS PASSAGE] 1: ... [Provide detailed analysis and reasoning for the score] ... Score: 0
-
RECALL_Essential_Formula: (4 + 4 + 3) / 3 = 3.67
-
RECALL_Bonus_Formula: (0) / (3 * 1 * 2) = 0
-
RECALL_Combined_Formula: 3.67 + 0 = 3.67
-
RECALL_Final_Score_Calculation: min(5, 3.67) = 3.67
-
RECALL_Final_Score: 3.67
Example 3:
-
RECALL_Reasoning: [ESSENTIAL PASSAGE] 1: ... [Provide detailed analysis and reasoning for the score] ... Score: 5 [ESSENTIAL PASSAGE] 2: ... [Provide detailed analysis and reasoning for the score] ... Score: 5 [BONUS PASSAGE] 1: ... [Provide detailed analysis and reasoning for the score] ... Score: 5
-
RECALL_Essential_Formula: (5 + 5) / 2 = 5
-
RECALL_Bonus_Formula: (5) / (2 * 1 * 2) = 1.25
-
RECALL_Combined_Formula: 5 + 1.25 = 6.25
-
RECALL_Final_Score_Calculation: min(5, 6.25) = 5
-
RECALL_Final_Score: 5
Example 4:
-
RECALL_Reasoning: [ESSENTIAL PASSAGE] 1: ... [Provide detailed analysis and reasoning for the score] ... Score: 1 [ESSENTIAL PASSAGE] 2: ... [Provide detailed analysis and reasoning for the score] ... Score: 2
-
RECALL_Essential_Formula: (1 + 2) / 2 = 1.5
-
RECALL_Bonus_Formula: (0) / (2 * 0 * 2) = 0
-
RECALL_Combined_Formula: 1.5 + 0 = 1.5
-
RECALL_Final_Score_Calculation: min(5, 1.5) = 1.5
-
RECALL_Final_Score: 1.5
GROUND_TRUTH_PASSAGE: {passage_gt}
LLM_RETURNED_PASSAGE: {passage_llm}
How to Use
Use with LangChain: hub.pull("john-chatly/evaluator-rag-recall")
Related Prompts
More prompts in Research & Analysis
My Blueprint
Unlock the secrets of your life’s purpose and potential. Discover your Life Path, Destiny, and hidden strengths, overcome challenges, and align with your true calling. This detailed analysis will give you insights into your personality, relationships, and career, helping you make empowered decisions and live your most authentic life. Ready to explore the path the universe has laid out for you?
Formal Risk Assessment Framework
Get a comprehensive risk assessment across 5 categories with likelihood/impact ratings and mitigation strategies — plus a detailed plan for the highest-priority risk.
Data Findings to Business Insights Translator
Translate statistical findings into executive-ready business insights with plain-English summaries, action items, and visualization recommendations.
Make the Best Life Decisions
Not sure wether you should make that big decision? Use this prompt to ask ChatGPT
Find your dream career! 🚀
🌟 Unleash Your True Potential: Discover Your Perfect Vocation with your personal Career Coach 🌟 Feeling stuck in your current role? Uncertain about your career path? Let's unlock your true purpose together! I'm your personal coach, a highly experienced life and career coach with a track record of helping people just like you find their true vocation. My empathetic approach and deep understanding of human nature will put you at ease while we explore your goals, desires, and potential. Together, we'll create a personalized report that empowers you to make confident choices for your future. 🔑 What you'll experience: A compassionate coaching approach that will help you understand your unique situation Sensitive, revealing questions that build a complete profile of your personality and context Insights that lead to significant, positive, and long-lasting changes 🌈 Your outcome: A clear understanding of the perfect vocation for you Enhanced self-awareness and confidence in your professio
User Research Insight Synthesizer
Transform messy user research data into structured themes, evidence-backed insights, priority rankings, and specific product recommendations.