Ejento AI
Guides
QuickstartRecipesREST APIsRelease NotesFAQs
Guides
QuickstartRecipesREST APIsRelease NotesFAQs
Ejento AI
  1. Features
  • Basic Operations
    • Features
      • Organization → Projects → Assistants → Teams Hierarchy
    • Guides
      • Login/Signup
  • Assistants
    • Overview
    • Features
      • Assistant Access Control
      • Assistant Evaluation
      • Evaluation Metrics
      • URL-based Chat Thread Creation and Prepopulation
      • Reasoning Patterns
      • Staging & Publishing
    • Guides
      • Add Assistant
      • Evaluate Assistant
      • Edit Assistant
      • Assistant Edit Access
      • Embed Assistant
      • Delete Assistant
      • Add Favourite Assistants
      • View Assistant Id
      • Voice Calling with Assistants
  • Corpus
    • Overview
    • Features
      • Corpus Permissions
      • PII Redaction
      • ETag Setup for Corpus Incremental Refresh
    • Guides
      • Assistant Corpus Setup
      • Assistant Corpus Settings
      • Corpus Access Control
      • Corpus Connections
      • View Corpus Id
      • View Document Id
      • Tagging
        • Corpus tagging
        • Document tagging
  • Teams
    • Overview
    • Guides
      • Add a Team
      • Edit a Team
      • Delete a Team
  • Projects
    • Overview
    • Guides
      • Add a Project
      • Edit a Project
      • Managing Assistants in a Project
      • Delete a Project
      • View Project Id
  • User Settings
    • Overview
    • Features
      • Ejento AI User Access Levels
    • Guides
      • Add new user
      • Invite Users via Link or Email
      • View my User Id
  • API Keys
    • Overview
    • Guides
      • How to generate API Key and Auth Token
  • Workflows
    • Overview
    • Features
      • Workflow Access Control
    • Guides
      • Add Workflow
      • Workflow Chat
      • Workflow Edit Access
  • Tools
    • Overview
    • Guides
      • Tools Overview
      • Create External Tool
      • Connect Tool to Assistant
  • Analytics
    • Overview
    • Guides
      • Analyzing Data in the Analytics Dashboard
  • Chatlogs
    • Overview
    • Guides
      • Managing Chatlogs
      • View Chatlog & Chat thread Id
  • Integrations
    • Overview
    • Guides
      • Email Indexing
      • Microsoft Teams
      • Sharepoint Indexing
      • Google Drive Connector
      • MS Teams Integration Setup
      • Creating a Connection in Credential Manager
      • Slack App
      • Discord Bot
  • Ejento AI Shield
    • Overview
    • Features
      • Understanding Guardrails
    • Guides
      • How to enable Guardrails
  • Assistant Security
    • Overview
    • Features
      • Assistant Red Teaming
    • Guides
      • Red Team an Assistant
  • Permission Sets
    • Overview
    • Guides
      • Add Permission Set
  • Usage
    • Overview
    • Guides
      • Set Spend Limits
  1. Features

Evaluation Metrics

Evaluation metrics are the scores an evaluation gives an assistant's responses. Each metric looks at one quality, such as whether the answer addresses the question, whether it's consistent with the documents the assistant found, or whether it's safe. This page explains every metric you can choose when you evaluate an assistant, with formulas where they apply.
Choosing metrics in the Start Evaluation window

How to choose metrics#

In the Metrics step of Start evaluation, metrics are grouped in three sections: Generation Quality (11 metrics), Retrieval Quality (5), and Ethics And Safety (10). Each card shows a short description, Search metrics... finds a metric by name, and Documentation opens this page.
Generation Quality metrics score the answer itself. Some compare it with the expected response you wrote in the dataset (for example Semantic Similarity, Answer Accuracy, Exact Match); others need no expected response (Response Relevancy).
Retrieval Quality metrics score the documents the assistant retrieved before answering. They're most useful for assistants that answer from a corpus.
Ethics and Safety metrics check whether responses are harmful, biased, toxic, or otherwise unsafe.
Some metrics are scored by an LLM acting as a judge (described as "LLM judge" below); others are calculated directly from the text, with no LLM.

1. Generation Quality Metrics#

1.1 Semantic Similarity#

Definition: Embedding-based similarity between the response and the reference answer. It evaluates only the semantic similarity between the generated answer and the ground truth.
Semantic similarity compares meaning only; it doesn't check whether the facts are right. To check facts, add Factual Correctness or Answer Accuracy.

1.2 Response Relevancy#

Definition: Response Relevancy measures how well the assistant’s response directly addresses the user’s input or question. It ensures that the response is pertinent, avoids irrelevant details, and fulfills the user's informational need.
Range:
0 to 1 — Higher values indicate stronger alignment between the response and the original query.
A value close to 1 means the response is highly relevant to the input.
A lower value indicates that the response may include off-topic or incomplete info
How It’s Measured:
Convert each sentence or response segment into a vector using an embedding model.
Compute the cosine similarity between the embeddings of the generated response and the user input.
Average the similarity scores across all segments.
Formula:
Where:#




1.3 BLEU Score#

Definition: A widely used metric based on n-gram precision and brevity penalty, used to compare generated text with reference responses.
Range:
0 (no match at all) to 1 (perfect match with the reference).
Formula:
Where:#




1.4 ROUGE Score#

Definition: Measures overlap between n-grams of the generated text and reference text. Includes precision, recall, and F1-score.
Variants:
ROUGE-N: Overlap of n-grams
ROUGE-L: Longest Common Subsequence
Range: 0 to 1
A score of 0 means no overlap between the generated text and the reference (poor quality), while a score of 1 means perfect overlap (ideal match)
Formula (F1-score):

1.5 Faithfulness#

Definition:
The Faithfulness metric measures how factually consistent a response is with the retrieved context. It ensures that the assistant does not hallucinate or fabricate information that is not grounded in the provided sources.
Range:
0 to 1 — Higher scores indicate better consistency with the retrieved context.
Steps to Calculate:
1.
Identify all the claims made in the response.
2.
For each claim, verify whether it is supported or inferable from the retrieved context.
3.
Compute the score using the formula below.
Formula:
Interpretation:
A score of 1 means all claims are backed by the retrieved context.
A lower score indicates that some claims are unsubstantiated or hallucinated.

1.6 Other generation quality metrics#

These metrics are also available when you start an evaluation:
Factual Correctness: Breaks the response and the reference into atomic claims and scores precision, recall, and F1 over them.
Answer Accuracy: A lightweight LLM judge of how correct the response is compared with the reference (1 to 2 LLM calls).
Response Groundedness: A lightweight LLM judge of how well the response is grounded in the retrieved context.
Rubric Score: A 1 to 5 score of response quality against the reference, based on a rubric and an LLM judge.
Exact Match: 1.0 if the response exactly matches the reference, otherwise 0.0.
String Similarity: A deterministic string-similarity score between the response and the reference, with no LLM.

2. Retrieval Quality Metrics#

2.1 Context Recall#

Definition: Measures how much of the benchmark response (reference answer) can be generated using the retrieved data points.
Formula:

2.2 Context-Entity Recall#

Definition: Evaluates how many common entities (keywords or concepts) are shared between the retrieved context and the reference response.
Formula:

2.3 Context Precision#

Definition:
Measures how well the retriever ranks the relevant chunks higher than the irrelevant ones for a given query. In other words, it checks if the most useful chunks appear at the top of the retrieved list.
Formula:
Where:
= number of chunks retrieved (e.g., top-5 or top-10 results).
= relevance indicator at rank :
if the chunk at position is relevant.
if the chunk at position is not relevant.

2.4 Noise Sensitivity#

Definition: Measures how frequently the assistant generates incorrect responses due to irrelevant or misleading context.
Range: 0 (better) to 1 (worse)
Formula:

2.5 Context Relevance#

Definition: A lightweight LLM judge of how relevant the retrieved context is to the question.

3. Ethics and Safety Metrics#

These are LLM-based critic metrics, evaluating the ethical quality of responses by asking specific safety-related questions and applying a majority vote mechanism.

Workflow:#

1.
Define a critic prompt.
2.
Make 3 independent LLM calls.
3.
Apply majority vote to determine the binary outcome (e.g., Harmful or Not Harmful).

Evaluated Categories:#

Harmful: Promotes or causes harm.
Malicious: Exploits or misleads for harmful purposes.
Bias: Reinforces stereotypes or unfair treatment.
Toxic: Uses abusive or aggressive language.
Hateful: Encourages discrimination or hate speech.
Sexual: Contains inappropriate or explicit sexual content.
Violent: Incites or glorifies violence.
Insensitive: Disrespectful to identities or situations.
Self-harm: Promotes suicidal or self-injurious behavior.
Manipulative: Deceptively influences user behavior.

Summary Table#

MetricCategoryMeasuresScore Range / Type
Semantic SimilarityGenerationSemantic Similarity0–1
Response RelevancyGenerationRelevance to Query0–1
BLEU ScoreGenerationn-gram Match + Brevity0–1
ROUGE ScoreGenerationWord Sequence Overlap0–1
FaithfulnessGenerationFactual consistency with retrieved context0–1
Factual CorrectnessGenerationClaim-level precision, recall, and F10–1
Answer AccuracyGenerationLLM-judged correctness vs. referenceLLM judge
Response GroundednessGenerationLLM-judged grounding in contextLLM judge
Rubric ScoreGenerationRubric-based quality1–5
Exact MatchGenerationExact match with reference0 or 1
String SimilarityGenerationString similarity with reference0–1
Context RecallRetrievalData-Answer Overlap0–1
Context-Entity RecallRetrievalEntity Overlap0–1
Context PrecisionRetrievalRelevant Context Rankings0–1
Noise SensitivityRetrievalErrors Due to Noise0–1 (lower is better)
Context RelevanceRetrievalLLM-judged relevance of contextLLM judge
Ethics and SafetySafetyBinary Verdicts via LLMYes / No

Use cases#

Policy assistant: Choose Answer Accuracy and Faithfulness to check that answers match the expected policy answers and stick to the documents.
Search-heavy assistant: Add Context Precision and Context Recall to see whether poor answers come from retrieving the wrong documents.
Public assistant: Add the Ethics and Safety metrics before opening an assistant to the whole organization.
Previous
Assistant Evaluation
Next
URL-based Chat Thread Creation and Prepopulation