Skip to main content

Retreival Augmented Generation Evaluation using Future AGI

Step 1 - Install necessary packages and making necessary imports
Step 2 - Load the dataset and select an instance of the dataset
Step 3 - Choose the evaluations you want to perform

Available RAG evaluations in Future AGI :

Context Adherence

  • Description: Ensures that responses remain within the provided context, avoiding information not present in the retrieved data.
  • Key Points: Focuses on detecting hallucinations and ensuring factual consistency.

Context Relevance

  • Description: Assesses how well the retrieved context aligns with the query.
  • Key Points: Determines sufficiency of context to address the input.

Completeness

  • Description: Evaluates whether the response fully answers the query.
  • Key Points: Focuses on providing comprehensive and accurate answers.

Chunk Attribution

  • Description: Tracks which context chunks are used in generating responses.
  • Key Points: Highlights which parts of the context contribute to the response.

Chunk Utilization

  • Description: Measures the effective usage of context chunks in generating responses.
  • Key Points: Indicates the level of relevance and reliance on the provided context.

Context Similarity

  • Description: Compares the provided context with expected context using similarity metrics.
  • Key Points: Uses techniques like cosine similarity and Jaccard index for comparison.

Groundedness

  • Description: Ensures that the response is strictly grounded in the provided context.
  • Key Points: Verifies factual reliance on retrieved information.

Summarization Accuracy

  • Description: Evaluates the accuracy of a summary against the original document.
  • Key Points: Ensures faithfulness to the source material.

Eval Context Retrieval Quality

  • Description: Assesses the quality and adequacy of the retrieved context.
  • Key Points: Measures sufficiency and relevance of the retrieved information.

Eval Ranking

  • Description: Provides ranking scores for contexts based on relevance and criteria.
  • Key Points: Prioritizes contexts that best align with the query.
Step 5 - Create an object of the chosen evaluator(s)
Step 6 - Initialize the Evaluator and run evaluations
Step 7 - Aggregate the results