Building a Retrieval-Augmented Generation (RAG) application is one of the most effective ways to supercharge Large Language Models (LLMs) with private, domain-specific knowledge. However, moving a RAG system from a basic prototype to a production-ready application presents a major hurdle: How do you know if your RAG pipeline is actually performing well?
When an LLM produces an inaccurate or irrelevant answer in a RAG system, identifying the root cause can be tricky. Did the retriever fail to fetch the correct context from your vector database? Or did the generator (LLM) hallucinate despite receiving the right information?
To solve this problem, developers turn to RAGAS (RAG Assessment), the open-source evaluation framework designed specifically to benchmark, score, and optimize RAG pipelines.
In this comprehensive guide, we will explore what RAGAS is, its core evaluation philosophy, the 5 key metrics every AI engineer should know, hands-on Python code implementation, real-world examples, and key interview concepts.
What Is the RAGAS Framework? #
RAGAS (short for RAG Assessment) is an evaluation framework tailored for measuring the performance of Retrieval-Augmented Generation systems.
Rather than treating a RAG pipeline as an unpredictable “black box,” RAGAS decouples the system into its two core architectural components:
- The Retriever: Responsible for fetching relevant context chunks from a vector database or knowledge base.
- The Generator (LLM): Responsible for reading the retrieved context and synthesizing a clear, accurate answer for the user.
By evaluating these components independently and together, RAGAS gives developers actionable numeric scores (ranging from 0.0 to 1.0) that directly point to pipeline bottlenecks.
The “LLM-as-a-Judge” Philosophy
Traditional Natural Language Processing (NLP) metrics—such as BLEU or ROUGE—rely on exact keyword and string matching. These metrics fail when evaluating modern RAG pipelines because LLMs express facts using varying phrasing, synonyms, and structures.
RAGAS solves this by pioneering the LLM-as-a-Judge approach. It leverages the Natural Language Understanding (NLU) capabilities of an advanced LLM (such as GPT-4) to evaluate intent, factual consistency, semantic similarity, and contextual relevance. This brings human-level grading accuracy at scale.
Key Concepts and Terminology #
Before diving into specific metrics, it is helpful to understand the standard terminology used across RAGAS evaluation workflows:
- Sample: A single test entry in your evaluation dataset consisting of a user query, retrieved context, generated answer, and reference ground truth.
- User Input (Query): The raw question or prompt submitted by the user to the RAG system.
- Retrieved Context: The list of text chunks fetched from your vector database by the retriever in response to the query.
- Response: The final text answer generated by your LLM using the retrieved context.
- Reference (Grounded Response): The “gold standard” or human-curated answer key used as a benchmark for accuracy.
- Reference Context: The ideal context chunks that should have been retrieved from the knowledge base for a specific query.
- Evaluation Dataset: A curated collection of samples used to benchmark and score the RAG system.
- Experiment: A specific configuration run of your RAG pipeline where a single hyperparameter (e.g., chunk size, top-k retrieval count, or prompt template) is adjusted to test performance changes.
The 5 Core RAGAS Evaluation Metrics #
RAGAS provides targeted metrics to evaluate both the retrieval and generation phases. Here is a detailed breakdown of the five primary metrics.
1. Context Recall (Retriever Metric) #
Context Recall measures the completeness of the retrieved information. It evaluates whether your retriever fetched all the necessary facts from the knowledge base required to construct a complete answer.
- Target Component: Retriever
- Core Focus: Completeness & Coverage
- Core Question: Did the retriever miss any crucial information required to answer the query?
- How It Works:
- An evaluator LLM extracts individual factual claims from the human-curated Reference answer.
- The LLM checks how many of these reference claims are present across the Retrieved Context chunks.
- The score is calculated as the ratio of matched reference claims to total reference claims.
- Ideal Score: 1.0 (Higher is better). A low score indicates the retriever missed key context chunks.
2. Context Precision (Retriever Metric) #
Context Precision evaluates the relevance and ranking order of the retrieved chunks. It determines whether the most relevant context chunks appear at the top of the retrieved list rather than being buried under irrelevant noise.
- Target Component: Retriever & Re-ranker
- Core Focus: Relevance & Ranking Order
- Core Question: Are the most relevant context chunks ranked higher in the list?
- How It Works:
- Each retrieved chunk in the top-k list is evaluated for relevance against the user query.
- Precision is calculated at each rank position (
Precision@k). - The final score computes a weighted average that penalizes the pipeline if irrelevant chunks appear higher than relevant ones.
- Ideal Score: 1.0 (Higher is better). A low score indicates that your re-ranker or similarity search algorithm is placing noisy chunks above useful ones.
3. Noise Sensitivity (Generator Robustness Metric) #
Noise Sensitivity evaluates how robust the generation LLM is when presented with irrelevant or distracting information (“noise”) in the retrieved context.
- Target Component: Generator (LLM)
- Core Focus: Noise Robustness
- Core Question: Is the LLM smart enough to discard irrelevant context chunks, or does it incorporate false/unrelated claims into its final answer?
- How It Works:
- RAGAS separates the retrieved context into useful facts (matching the ground truth) and noisy facts (irrelevant to the query).
- The generated response is broken down into factual claims.
- RAGAS counts how many claims in the final response were pulled from the noisy context chunks.
- Ideal Score: 0.0 (LOWER IS BETTER). A score of 0.0 means the LLM completely ignored the noise. A score of 0.5 means half of the generated response consists of irrelevant noise.
4. Response Relevancy (Generator Metric) #
Response Relevancy (also known as Answer Relevancy) measures whether the generated response directly addresses the user’s question, regardless of factual accuracy. It catches answers that are off-topic, incomplete, or evasive.
- Target Component: Generator (LLM)
- Core Focus: Topic Utility & Directness
- Core Question: Does the generated response directly answer what was asked?
- How It Works (Reverse-Engineering Approach):
- RAGAS passes the Generated Response to an LLM and instructs it to reverse-generate hypothetical questions that the response would answer.
- An embedding model generates vector representations for both the hypothetical questions and the original User Query.
- RAGAS calculates the average cosine similarity between the embeddings of the generated questions and the original query.
- Ideal Score: 1.0 (Higher is better). If the response goes off-topic or adds unnecessary fluff, the similarity score drops.
5. Faithfulness (Generator Metric) #
Faithfulness is the primary hallucination detection metric in RAGAS. It checks whether every factual claim made in the generated response can be directly traced back to and verified by the retrieved context.
- Target Component: Generator (LLM)
- Core Focus: Grounding & Hallucination Prevention
- Core Question: Is the response strictly grounded in the provided context without inventing outside facts?
- How It Works:
- An LLM extracts all individual factual claims from the Generated Response.
- Each claim is verified against the Retrieved Context to mark it as supported (True) or unverified (False).
- The score is the ratio of supported claims to total claims in the response.
- Ideal Score: 1.0 (Higher is better). A score of 1.0 indicates zero hallucinations.
How RAGAS Works: The Step-by-Step Evaluation Process #
Evaluating a RAG system with RAGAS follows a clear 5-step workflow:
- Step 1: Benchmark Dataset Curation: Prepare a set of test queries paired with human-written reference answers (ground truth).
- Step 2: RAG Pipeline Execution: Run the test queries through your RAG system to capture the Retrieved Contexts and final Generated Responses.
- Step 3: Asynchronous Evaluation Calls: RAGAS sends the collected data to an evaluator LLM using asynchronous API calls to extract claims, verify context matches, and calculate embeddings.
- Step 4: Score Calculation: RAGAS aggregates normalized scores (0.0 to 1.0) for each selected metric across all test samples.
- Step 5: Diagnostics & Optimization: Convert the results into a structured format (such as a pandas DataFrame or CSV) to identify weaknesses and adjust chunk sizes, top-k limits, or prompt templates.
Hands-On Python Implementation: Evaluating Your RAG Pipeline #
Let’s look at how to implement an automated evaluation pipeline using Python.
To keep your code clean and production-ready, structure your project into three modular files:
rag_pipeline.py: Defines document loading, vector storage, and the RAG generation chain.evaluate.py: Prepares the RAGAS dataset and executes the metrics scoring engine.main.py: The main entry point that coordinates building and evaluating the pipeline.
Step 1: Build the RAG Pipeline (rag_pipeline.py) #
First, set up your standard RAG chain using LangChain, ChromaDB, and OpenAI embeddings. This file returns both your generation chain and the retriever object.
from langchain_community.document_loaders import PyPDFLoader
from langchain_text_splitters import RecursiveCharacterTextSplitter
from langchain_openai import OpenAIEmbeddings, ChatOpenAI
from langchain_community.vectorstores import Chroma
def build_rag_chain(pdf_path=""):
# 1. Load and split documents into chunks
loader = PyPDFLoader(pdf_path)
docs = loader.load()
text_splitter = RecursiveCharacterTextSplitter(chunk_size=800, chunk_overlap=150)
chunks = text_splitter.split_documents(docs)
# 2. Create vector database and retriever
embeddings = OpenAIEmbeddings(model="text-embedding-3-small")
vectorstore = Chroma.from_documents(chunks, embeddings)
retriever = vectorstore.as_retriever(search_kwargs={"k": 4})
# 3. Initialize generation LLM
rag_chain = ChatOpenAI(model="gpt-4o-mini", temperature=0)
return rag_chain, retriever
Step 2: Create the RAGAS Evaluation Script (evaluate.py) #
Next, set up the evaluation engine. This script takes test queries, retrieves context chunks, generates responses, pairs them with human ground truth reference answers, and computes RAGAS scores.
import asyncio
import pandas as pd
from openai import AsyncOpenAI
from ragas import evaluate
from ragas.llms import llm_factory
from ragas.embeddings import embedding_factory
from ragas.dataset_schema import EvaluationDataset
from ragas.metrics.collections import (
ContextRecall,
ContextPrecision,
Faithfulness,
AnswerRelevancy,
NoiseSensitivity,
)
# Human-curated ground truth benchmark dataset
BENCHMARK_QA = [
(
"What are the three pillars of sustainable development?",
"The three pillars of sustainable development are economic growth, social inclusion, and environmental protection."
),
(
"What is the Paris Agreement temperature target?",
"The Paris Agreement aims to limit global warming to well below 2 degrees Celsius above pre-industrial levels."
),
]
async def run_evaluation(rag_chain, retriever):
# Initialize asynchronous OpenAI client for evaluator LLM
client = AsyncOpenAI()
eval_llm = llm_factory(model_name="gpt-4o-mini", client=client)
eval_embeddings = embedding_factory(provider="openai", model_name="text-embedding-3-small", client=client)
dataset_records = []
# Run queries through RAG pipeline to capture context and responses
for question, reference_answer in BENCHMARK_QA:
# Retrieve context chunks
docs = retriever.invoke(question)
contexts = [doc.page_content for doc in docs]
# Generate LLM response
response_obj = rag_chain.invoke(question)
response_text = response_obj.content if hasattr(response_obj, "content") else str(response_obj)
# Build sample record for RAGAS
dataset_records.append({
"user_input": question,
"retrieved_contexts": contexts,
"response": response_text,
"reference": reference_answer
})
# Convert records to RAGAS EvaluationDataset
eval_dataset = EvaluationDataset.from_list(dataset_records)
# Instantiate evaluation metrics
metrics = [
ContextRecall(llm=eval_llm),
ContextPrecision(llm=eval_llm),
Faithfulness(llm=eval_llm),
AnswerRelevancy(llm=eval_llm, embeddings=eval_embeddings),
NoiseSensitivity(llm=eval_llm),
]
# Execute evaluation and save results to CSV
results = evaluate(dataset=eval_dataset, metrics=metrics)
df_results = results.to_pandas()
df_results.to_csv("ragas_evaluation_results.csv", index=False)
print("Evaluation completed! Results saved to 'ragas_evaluation_results.csv'.")
Step 3: Run the Complete Pipeline (main.py) #
Finally, create a main driver script to execute building and evaluating your system with a single command.
import asyncio
from rag_pipeline import build_rag_chain
from evaluate import run_evaluation
if __name__ == "__main__":
print("Building RAG chain and initializing vector database...")
rag_chain, retriever = build_rag_chain("book.pdf")
print("Launching RAGAS evaluation suite...")
asyncio.run(run_evaluation(rag_chain, retriever))
Running this script produces a CSV file containing metric scores for every test query, giving you clear data to optimize your chunk sizes, retrieval limits, and prompt templates.
Real-World Examples #
To better understand these metrics, let me walk through four practical scenarios.
Example 1: Context Recall (Type 2 Diabetes Symptoms & Causes)
- User Query: “What are the causes and symptoms of Type 2 Diabetes?”
- Ground Truth Reference: “Type 2 Diabetes is caused by insulin resistance, obesity, and a sedentary lifestyle. Symptoms include frequent urination, excessive thirst, fatigue, blurred vision, and slow-healing sores.”
- Retrieved Context: Contains chunks describing frequent urination, excessive thirst, fatigue, and blurred vision, but misses insulin resistance and lifestyle causes.
- Evaluation: Out of 8 key facts in the reference answer, the retriever only brought chunks covering 4 facts.
- Context Recall Score: 0.50 (50% coverage).
Example 2: Context Precision & Ranking (Eiffel Tower Details)
- User Query: “Where is the Eiffel Tower located and how tall is it?”
- Top-4 Retrieved Chunks:
- Chunk 1: The Eiffel Tower is located in Paris, France. (Relevant)
- Chunk 2: The Louvre Museum attracts 9 million visitors per year. (Irrelevant)
- Chunk 3: The Eiffel Tower stands 330 meters tall. (Relevant)
- Chunk 4: The Arc de Triomphe is 50 meters tall. (Irrelevant)
- Evaluation: The retriever fetched the right information, but placed an irrelevant chunk about the Louvre at Rank 2 ahead of the height information at Rank 3.
- Context Precision Score: 0.75 (Penalized because irrelevant information was ranked higher than relevant context).
Example 3: Faithfulness & Hallucination (Albert Einstein Biography)
- Retrieved Context: “Albert Einstein was born on March 14, 1879, in Germany. He developed the theory of relativity and won the Nobel Prize in Physics in 1921.”
- Generated Response: “Albert Einstein was born on March 14, 1879, in Germany. He developed the theory of relativity, won the Nobel Prize in Physics in 1921, worked extensively on quantum mechanics, and had an IQ of 160.”
- Evaluation:
- Fact 1 (Born March 14, 1879) -> Supported by context (True)
- Fact 2 (Theory of relativity) -> Supported by context (True)
- Fact 3 (Nobel Prize 1921) -> Supported by context (True)
- Fact 4 (Quantum mechanics) -> Not in context (False)
- Fact 5 (IQ of 160) -> Not in context (False)
- Faithfulness Score: 3 / 5 = 0.60 (The LLM hallucinated facts from its pre-training memory instead of relying strictly on retrieved context).
Example 4: Response Relevancy (Boiling Point of Water)
- User Query: “What is the boiling point of water?”
- Generated Response: “Water is a vital resource found across the earth. It covers 71% of the planet’s surface and plays a central role in regulating global climate patterns.”
- Evaluation: While the response contains true scientific statements about water, it completely fails to answer the user’s specific question about boiling point.
- Response Relevancy Score: 0.20 (Significantly penalized for going off-topic).
Comparison Table of RAGAS Metrics
| Metric Name | Target Component | Core Focus | Ideal Score | Primary Goal |
|---|---|---|---|---|
| Context Recall | Retriever | Completeness | 1.0 (High) | Ensure no key facts are missed during retrieval |
| Context Precision | Retriever | Ranking & Relevance | 1.0 (High) | Ensure relevant chunks are ranked at the top |
| Noise Sensitivity | Generator (LLM) | Noise Robustness | 0.0 (Low) | Prevent LLM from including context noise in output |
| Response Relevancy | Generator (LLM) | Topic Utility | 1.0 (High) | Ensure output directly answers the query |
| Faithfulness | Generator (LLM) | Grounding & Truth | 1.0 (High) | Detect and eliminate LLM hallucinations |
Advantages and Limitations of RAGAS #
Advantages
- Component-Level Diagnostics: Pinpoints whether errors stem from the retriever or the generator.
- Semantic Understanding: Uses LLM-as-a-Judge reasoning rather than rigid word-for-word string matching.
- Automated & Scalable: Enables continuous integration testing for AI applications without manual inspection.
- Actionable Tuning: Helps measure the exact impact of changing parameters like chunk size, overlap, or top-k retrieval values.
Limitations
- API Cost and Latency: Running multiple evaluator LLM calls increases API token costs and execution time.
- Ground Truth Dependency: Metrics like Context Recall and Context Precision require well-curated reference answer datasets.
- Judge LLM Bias: The quality of evaluation depends on the reasoning capabilities of the judge LLM being used.
Real-World Applications #
RAGAS evaluation is widely used across production AI domains:
- Enterprise Document Q&A: Benchmark internal search assistants over financial reports, HR policies, and technical documentation.
- Legal & Compliance Search: Ensure legal contract summarizers maintain 100% Faithfulness to avoid incorrect interpretations.
- Medical Knowledge Retrieval: Verify high Context Recall so clinical search engines never omit essential medical context.
- Customer Support Chatbots: Test Response Relevancy to ensure bots deliver direct answers without fluff.
Important Points for Revision #
- RAG Evaluation Scope: Focuses primarily on evaluating the Retrieval Phase and Generation Phase.
- Retriever Metrics: Context Recall measures completeness; Context Precision measures ranking accuracy.
- Generator Metrics: Faithfulness detects hallucinations; Response Relevancy detects off-topic answers.
- Noise Sensitivity Metric: Measures LLM robustness to irrelevant context chunks—lower scores are better.
- Core Philosophy: Quality over quantity. It is better to systematically optimize 3–4 core metrics aligned with your goals than to use dozens of confusing benchmarks.
Technical Questions and Answers #
Q1: What is the difference between Context Recall and Context Precision?
Answer: Context Recall evaluates whether all required information was retrieved from the knowledge base (completeness). Context Precision evaluates whether the retrieved relevant chunks are ranked at the top of the context list rather than buried under irrelevant noise.
Q2: Why is a lower score better for Noise Sensitivity?
Answer: Noise Sensitivity measures how many claims in the final response were pulled from irrelevant context chunks. A score of 0.0 means the LLM successfully ignored all noise, whereas a higher score means the LLM was easily distracted.
Q3: Does Response Relevancy check for factual correctness?
Answer: No. Response Relevancy only evaluates whether the generated answer directly addresses the user’s query topic. Factual accuracy against context is evaluated separately by the Faithfulness metric.
Q4: Why should I use LLM-as-a-Judge instead of BLEU or ROUGE?
Answer: BLEU and ROUGE rely on exact keyword matches. Because LLMs express the same semantic meaning using different vocabulary and sentence structures, exact string matching often marks correct answers as failures. LLM-as-a-Judge evaluates semantic intent much like a human evaluator.
Quick Revision Summary #
The RAGAS framework provides a data-driven approach to evaluating Retrieval-Augmented Generation applications. By decoupling the pipeline into Retrieval and Generation stages, RAGAS allows developers to systematically diagnose errors:
- Use Noise Sensitivity to test LLM robustness against distracting context..
- Use Context Recall to verify context completeness.
- Use Context Precision to optimize re-ranking and chunk order.
- Use Faithfulness to eliminate LLM hallucinations.
- Use Response Relevancy to keep answers direct and concise.
RAGAS Quiz #
1. What does the acronym RAGAS stand for in RAG system evaluation?
Retrieval-Augmented Generation Automated Scoring
RAG Assessment
Robust AI Generation Analysis System
Recurrent Agentic Guidance and Assessment Standard
Explanation
RAGAS stands for RAG Assessment, an evaluation framework used to measure and score the performance of RAG systems.
2. Which two primary components of a RAG pipeline are targeted for evaluation in RAGAS?
Vector Database and Chunking Strategy
Embedding Model and Tokenizer
Retriever and Generator LLM
Document Loader and User Interface
Explanation
RAGAS specifically targets the Retriever and the Generator LLM as the two primary components to evaluate in a RAG pipeline.
3. Why does RAGAS adopt an 'LLM-as-a-Judge' approach rather than using traditional metrics like BLEU or ROUGE?
Traditional metrics are computationally too slow for real-time evaluations.
LLM-as-a-Judge uses semantic understanding and intent matching rather than rigid keyword matching.
BLEU and ROUGE require external web search access.
LLM-as-a-Judge operates without needing any reference answer or context.
Explanation
RAGAS uses an LLM as a judge because RAG evaluations rely on semantic meaning and intent rather than exact word-for-word string matching.
4. What does the Context Recall metric evaluate in RAGAS?
Whether the generated response contains hallucinations.
Whether the retriever fetched all necessary information from the knowledge base to answer the query.
How fast the vector database returns search results.
How well the LLM ignores irrelevant context noise.
Explanation
Context Recall evaluates the completeness of the retrieved context by checking if all required facts from the ground truth reference were fetched by the retriever.
5. How is the Context Recall score calculated in RAGAS?
Ratio of retrieved claims supported by the reference divided by total claims in the response.
Ratio of reference claims present in the retrieved context divided by total claims in the reference.
Average cosine similarity between original query and retrieved context.
Number of noisy chunks divided by total retrieved chunks.
Explanation
Context Recall is calculated as the number of claims in the reference answer supported by the retrieved context divided by the total number of claims in the reference answer.
6. Which metric evaluates both the relevance AND the ranking order of retrieved chunks?
Context Precision
Response Relevancy
Faithfulness
Noise Sensitivity
Explanation
Context Precision evaluates whether relevant chunks are retrieved and whether they are ranked higher in the retrieved context list.
7. In RAGAS, how does the Noise Sensitivity metric differ in its score interpretation compared to other metrics?
A higher score indicates better LLM performance.
A lower score is better, where 0 indicates zero noise included in the response.
It ranges from -1 to +1 instead of 0 to 1.
It only outputs discrete pass or fail labels.
Explanation
Unlike most RAGAS metrics where higher is better, Noise Sensitivity is better when lower; a score of 0 means the generated response contains no noisy or irrelevant claims.
8. What is the formula used to calculate Noise Sensitivity?
Number of claims in reference / Total retrieved chunks
Number of incorrect/noisy claims in response / Total number of claims in response
Number of true claims in context / Total claims in reference
Cosine similarity of generated queries / Original query embedding
Explanation
Noise Sensitivity is calculated by taking the number of incorrect/noisy claims in the response and dividing it by the total number of claims in the response.
9. Which metric serves as the primary hallucination detection metric in RAGAS?
Context Precision
Faithfulness
Context Recall
Response Relevancy
Explanation
Faithfulness is the primary hallucination detection metric in RAGAS, checking whether every claim in the generated response is grounded in the retrieved context.
10. How is the Faithfulness metric calculated?
Number of claims in response supported by retrieved context divided by total claims in response.
Total retrieved chunks divided by total claims in reference answer.
Cosine similarity between response embeddings and query embeddings.
Number of noisy chunks in context divided by total chunks.
Explanation
Faithfulness is calculated as the number of claims in the generated response that are supported by the retrieved context divided by the total number of claims in the response.
11. What smart technique does RAGAS use to calculate Response Relevancy?
It compares keyword frequencies between prompt and answer.
It reverse-engineers hypothetical questions from the response and measures cosine similarity with the user query.
It checks if the response matches a hardcoded human answer string.
It counts the number of citations inside the response.
Explanation
Response Relevancy reverse-engineers hypothetical questions from the generated response using an LLM, then measures average cosine similarity between their embeddings and the original user query embedding.
12. Does the Response Relevancy metric evaluate the factual correctness of the answer?
Yes, it verifies every fact against the ground truth answer.
No, it only evaluates whether the response directly addresses the query topic, regardless of factual accuracy.
Yes, but only for numerical claims and dates.
No, it only measures retrieval speed.
Explanation
Response Relevancy checks if the generated response is on-topic and directly addresses what was asked, without evaluating factual correctness.
13. In RAGAS terminology, what is a 'Sample'?
A full database dump of all vector embeddings.
A single test entry consisting of a test query, its context, and outputs used for evaluation.
A sub-segment of an LLM prompt template.
The execution time log of a vector search call.
Explanation
A sample in RAGAS refers to a single test query or test entry used to evaluate the RAG pipeline.
14. In RAGAS terminology, what defines an 'Experiment'?
Deleting and rebuilding the vector index from scratch.
A complete RAG pipeline setup where a single hyperparameter or knob is changed for comparison.
Running an LLM without any prompt template.
Testing the RAG system with zero internet access.
Explanation
An experiment in RAGAS represents a RAG pipeline run where a specific parameter or knob (e.g. chunk size or top-k) is tweaked to observe performance changes.
15. According to the core evaluation philosophy of RAGAS, what is the best strategy when choosing evaluation metrics?
Use as many metrics as possible (10+) to create a complex evaluation matrix.
Prioritize quality over quantity by selecting a focused set of 3 to 4 metrics suitable for your pipeline.
Rely solely on non-LLM exact string matching metrics.
Evaluate only the document ingestion phase while skipping the retrieval phase.
Explanation
RAGAS emphasizes quality over quantity, advocating for a focused set of 3 to 4 relevant metrics that clearly evaluate and guide the optimization of your RAG pipeline.