DocsReference

AI evaluation metrics catalog

Every built-in AI evaluation metric in EvaliQA: what it measures, what it needs, whether it uses a judge, and its default threshold.

Last updated 2026-10-04

Every built-in metric EvaliQA ships, grouped the way the metric picker groups them. Attach any of them to a test plan. The ones that need no expected output or expected tools also work in online evaluation. For when to use each one, follow the metric name to its concept page.

How to read the catalog

  • Scores run from 0 to 1. For most metrics 1.0 is the best result.
  • A metric passes when its score is at or above the threshold. The default threshold is the starting point; change it per plan.
  • Four security metrics score risk instead. Prompt Injection, Detection; Jailbreak, Detection; PII Leakage and Harmful Content report how likely the threat is, so lower is safer and they pass when the score is below the threshold. Raising their threshold makes them more lenient, not stricter.
  • Some metrics score only 0 or 1. The two Resistance metrics and Policy Compliance pass only on a 1, whatever the threshold. The rule checks in the Deterministic group also score 0 or 1, except Contains in all mode.
  • Judge says whether the metric asks your judge model. Judge metrics cost one or more judge calls per row; the others are free and give the same result every time.
  • Needs lists the row fields the metric reads. The retrieval context comes from your system's response (Retrieval context path) or, when that has none, from the dataset's retrieval_context column. Faithfulness, Contextual Relevancy, Contextual Precision and Contextual Recall show n/a on a row with no retrieval context: no score and no judge call, and it does not count toward the row's verdict or the run's averages. Other metrics do not skip a missing field; they score it as empty, which usually fails.

RAG

For answers built on retrieved context: is the answer grounded in it, and did retrieval bring back the right chunks in the right order.

MetricWhat it measuresNeedsJudgeDefault thresholdParameters
Answer RelevancyHow directly the answer addresses the question that was asked.Input and actual outputYes0.6None
FaithfulnessWhether every claim in the answer is supported by the retrieval context.Input, actual output and retrieval contextYes0.7None
Answer PrecisionHow closely the answer matches the expected output, by text overlap with a tolerance for numbers.Actual output and expected outputNo0.8None
Contextual RelevancyWhether the retrieved context is relevant to the question.Input and retrieval contextYes0.6None
Contextual PrecisionWhether the retriever ranks the most useful chunks first.Actual output and retrieval contextYes0.7Top K 1 to 100, optional.
Contextual RecallHow much of the expected answer the retrieved context supports.Input, expected output and retrieval contextYes0.7None

AI agent

For agents that call tools and hold conversations. Metrics that need a conversation run in multi-turn plans.

MetricWhat it measuresNeedsJudgeDefault thresholdParameters
Tool CorrectnessWhether the agent called the expected tools with the expected arguments.Tools called and expected toolsNo0.5Tool argument keys to compare. Exact match, default off. Check call ordering, default off.
Tools ErrorMistakes in how the agent used its tools: bad arguments, unknown functions, wrong order, ignored results, repeated failures.Input, actual output and tools calledYes0.7Error types to look for.
Task Success RateWhether the agent accomplished the user's task end to end.Input and actual output, or a conversationYes0.7Task description and success criteria, both optional.
Goal AchievementWhether the user got what they wanted from the conversation.ConversationYes0.7User goal (required).
Role AdherenceHow consistently the agent stays in its assigned persona.ConversationYes0.7Chatbot role (required).
Knowledge RetentionWhether the agent remembers earlier facts instead of contradicting them.ConversationYes0.7None
Conversational FlowHow natural and coherent the dialogue is, penalising needless clarifications and repetition.ConversationYes0.7None
Failure RateHow the agent handles not knowing: an honest fallback scores 1.0, a made-up answer scores 0.ConversationYes0.7None
Repetitive Pattern DetectionWhether the agent loops on the same action or answer. 1.0 means no repetition.ConversationYes0.7None

Deterministic and embedding

No judge model and no judge cost. Ten check the answer against a rule; Semantic Similarity and Reference Match compare meaning with a local embedding model.

MetricWhat it measuresNeedsJudgeDefault thresholdParameters
Exact MatchThe answer equals the expected output.Actual output and expected outputNo0.5Case sensitive, default on. Strip whitespace, default on.
ContainsThe answer contains your keywords: any of them, all of them, or none of them.Actual outputNo0.5Keywords (required). Mode: any, all or none, default any. Case sensitive, default off.
Regex MatchThe answer matches a regular expression.Actual outputNo0.5Regex pattern (required). Require full match, default off.
Starts WithThe answer starts with a given prefix.Actual outputNo0.5Prefix (required). Case sensitive, default on.
Ends WithThe answer ends with a given suffix.Actual outputNo0.5Suffix (required). Case sensitive, default on.
Length CheckThe answer length, in characters or words, is between a minimum and a maximum.Actual outputNo0.5Min length, default 0. Max length, default 10000. Unit: characters or words.
Non-EmptyThe answer is not empty once whitespace is trimmed.Actual outputNo0.5None
JSON SchemaThe answer is valid JSON that satisfies a JSON Schema.Actual outputNo0.5JSON Schema (required).
Format CheckThe whole answer is an email address, phone number, date or URL.Actual outputNo0.5Format (required): email, phone, date or URL.
Language DetectionThe answer is written in the language you expect.Actual outputNo0.5Expected language (required), one of 55 codes such as en, de, zh-cn.
Semantic SimilarityHow close the answer is in meaning to the expected output.Actual output and expected outputNo0.7Embedding model, default all-MiniLM-L6-v2.
Reference MatchHow close the answer is in meaning to a list of reference answers you write.Actual outputNo0.7Reference answers (required), one per line. Aggregation: max or mean, default max. Embedding model.

Security and Safety

Safety checks you attach to a single-turn plan. Red-team plans score with their own judges and do not use these.

MetricWhat it measuresNeedsJudgeDefault thresholdParameters
Prompt Injection, DetectionRisk that the input carries a prompt-injection attempt. Lower is safer.InputYes, or a local model0.7, passes belowDetection method: judge or local model.
Prompt Injection, ResistanceWhether the model ignored an injected instruction and stayed on task. Scores 0 or 1.Input and actual outputYes0.7, only 1 passesNone
Jailbreak, DetectionRisk that the input is a jailbreak attempt: role-play, hypothetical framing, social engineering. Lower is safer.InputYes, or a local model0.7, passes belowDetection method: judge or local model.
Jailbreak, ResistanceWhether the model refused a jailbreak attempt. Scores 0 or 1.Input and actual outputYes0.7, only 1 passesNone
PII LeakageRisk that the answer contains personal data such as emails, phone numbers, card numbers or names. Lower is safer.Input and actual outputYes, or a local model0.7, passes belowDetection method: judge or local model. PII types.
Harmful ContentRisk that the answer contains violence, hate speech, sexual content, illegal acts, self-harm or fraud. Lower is safer.Input and actual outputYes, or a local model0.7, passes belowDetection method: judge or local model. Harm categories.
Policy ComplianceWhether the answer stays within the policy rules you provide. Scores 0 or 1.Input and actual outputYes0.7, only 1 passesPolicy rules (required).
BiasBiased framing by gender, race, politics and more. 1.0 means none found.Input and actual outputYes0.8None
ToxicityToxic, hateful or insulting language. 1.0 means none found.Input and actual outputYes0.7None
Restricted RefusalWhether the model refused, matched against built-in and your own refusal phrases. 1 means it refused.Input and actual outputNo0.5Refusal patterns. Also use built-in patterns, default on.

Custom

Your own rules, scored by the judge.

MetricWhat it measuresNeedsJudgeDefault thresholdParameters
G-EvalScores the answer against criteria or ordered steps you write in plain language.Input and actual outputYes0.7Criteria or evaluation steps (one is required). Samples 1 to 20, default 20, each a judge call.
Custom EvalScores the answer against criteria you list: one verdict per criterion, or one score for all of them.Input and actual outputYes0.7Criteria (required). Strategy: verdict or direct. Judge runs 1 to 10, default 1. Aggregation: majority, median or mean, default median.