The 5-Dimension Framework in Detail
Evaluating AI systems requires a fundamentally different approach from traditional software testing. Where conventional software either works or doesn't - a function returns the correct value or throws an error - AI systems operate in a probabilistic space where outputs exist on a spectrum of quality, relevance, and safety. The 5-Dimension Framework provides a structured methodology for navigating this complexity.
Dimension 1: Accuracy & Groundedness
Accuracy measures whether the system's outputs are factually correct and grounded in real information. For retrieval-augmented systems, this extends to whether the output faithfully represents the source material without introducing fabricated details - a phenomenon commonly known as hallucination.
Practical evaluation of accuracy involves comparing outputs against verified ground truth, testing knowledge boundaries (does the system know what it doesn't know?), and measuring hallucination rates across different query types. For RAG systems specifically, citation accuracy becomes critical: does the system accurately represent what its sources say?
Example failure mode: A RAG-based customer support system is asked about a product feature that doesn't exist. Instead of saying "I don't have information about that feature," it fabricates a plausible-sounding answer by combining fragments from unrelated documentation. The customer then expects functionality that doesn't exist, creating a support escalation.
Dimension 2: Consistency & Reliability
Consistency evaluates whether the system delivers predictable, stable outputs across similar inputs and over time. Non-deterministic AI systems can produce wildly varying quality for identical prompts, and this variance creates real problems in production environments where users expect predictable behaviour.
Testing consistency requires running identical inputs multiple times and measuring semantic similarity, format compliance, and quality variance. It also involves testing related-but-different inputs to ensure proportional responses - a slightly modified question should produce a slightly modified answer, not a completely different one.
Example failure mode: A content generation system produces an excellent blog post one execution and a mediocre, off-topic ramble the next - for the same prompt. The editorial team can't rely on the system for deadline-driven work because quality is unpredictable.
Dimension 3: Safety & Compliance
Safety testing evaluates the system's resilience against adversarial inputs, its handling of sensitive topics, and its compliance with regulatory requirements. This is the dimension where failures carry the highest consequences - a safety failure can result in reputational damage, legal liability, or real-world harm.
Safety evaluation encompasses prompt injection resistance, jailbreak prevention, PII handling, bias detection, and regulatory compliance (GDPR, EU AI Act, industry-specific regulations). It requires dedicated adversarial test cases designed to probe the system's boundaries.
Example failure mode: A customer-facing chatbot is manipulated through a series of seemingly innocent messages to eventually reveal other customers' names and account numbers. The prompt injection bypassed the system's safety filters by using a gradual escalation technique.
Dimension 4: Alignment & Usefulness
Alignment measures the gap between what the user asked for and what the system delivered. A response can be accurate, safe, and consistent - yet still fail the user because it didn't address their actual need, used the wrong tone, or provided information at the wrong level of detail.
Testing alignment involves evaluating instruction-following compliance (did the system respect explicit constraints like word count, format, and audience?), implicit intent understanding (did the system grasp what the user really wanted?), and actionability (can the user do something with this output?).
Example failure mode: A user asks for a "brief summary suitable for an executive." The system returns a 2,000-word technical deep-dive. The content is accurate and well-written - but completely misaligned with the user's needs and context.
Dimension 5: Robustness & Edge Cases
Robustness testing explores how the system behaves at its boundaries - with unexpected inputs, adversarial formatting, edge cases, and failure conditions. This is the dimension that reveals whether your system is production-ready or merely demo-ready.
Test cases include empty inputs, extremely long inputs, mixed languages, special characters, contradictory instructions, and malformed data. The key metric isn't whether the system handles every case perfectly, but whether it degrades gracefully - providing useful feedback rather than crashing, hanging, or producing garbage.
Example failure mode: A workflow automation system receives a webhook payload with an unexpected null value in a required field. Instead of returning a validation error, it processes partially, creating a corrupted record that causes downstream failures hours later.
See these dimensions in action
See a real sample reportDesigning Effective Test Cases
The quality of an AI evaluation is determined entirely by the quality of its test cases. A comprehensive suite of well-designed test cases is more valuable than any sophisticated automated metric.
What Makes a Good Test Case
An effective test case has five properties:
- Specificity: It tests one clearly defined behaviour or capability. "Does the system handle prompt injection?" is too broad. "Does the system maintain its role boundaries when told to 'ignore all previous instructions'?" is specific enough to be actionable.
- Measurability: The expected outcome is defined precisely enough that two independent evaluators would score it the same way. Scoring rubrics should leave no room for ambiguity.
- Relevance: It reflects a realistic scenario that would occur in production. Contrived edge cases that would never happen in reality waste evaluation time.
- Independence: Each test case should be evaluable on its own without depending on the outcome of other test cases. This enables parallel evaluation and prevents cascading failures from obscuring individual results.
- Reproducibility: The test should produce comparable results when run at different times, enabling meaningful longitudinal comparisons.
Common Mistakes in Test Case Design
- Testing the happy path only. Most test suites over-index on normal inputs. Allocate at least 30% of test cases to edge cases, adversarial inputs, and failure modes.
- Vague expected outcomes. "The system should respond helpfully" is not a testable expectation. Define what helpful looks like for this specific scenario.
- Ignoring multi-turn context. For conversational systems, single-turn tests miss an entire class of failures that only emerge over multiple exchanges.
- Neglecting the user persona. A technical expert and a first-time user will have different expectations for the same query. Test cases should specify the user context.
- No negative test cases. Test cases that verify the system refuses to do something are as important as those verifying it does something correctly.
The LLM-as-Judge Pattern
Note: EvalSpec supports both approaches. Upload responses by CSV and a built-in LLM judge scores each one, which you then review and can override; or paste responses in and score them yourself. This section explains how LLM-as-Judge works, where it helps and where it does not.
The LLM-as-Judge pattern uses a language model to evaluate the outputs of another language model. It's one of the most powerful techniques in AI evaluation - and one of the most commonly misused.
When to Use It
LLM-as-Judge works best for subjective quality dimensions: tone assessment, helpfulness rating, coherence evaluation, and instruction-following compliance. It's particularly valuable when human evaluation is too expensive or slow for the volume of test cases needed.
When Not to Use It
Do not use LLM-as-Judge for factual accuracy verification (the judge model may have the same knowledge gaps), safety boundary testing (a model judging another model's safety creates circular logic), or any evaluation where ground truth exists (use deterministic comparison instead).
Calibration Techniques
To improve reliability of LLM-as-Judge evaluations:
- Provide detailed rubrics. Instead of "rate quality 1-5," provide specific criteria for each score level with examples.
- Use reference answers. Provide a gold-standard answer for the judge to compare against, not just the prompt.
- Multiple judge passes. Run the evaluation 3-5 times and take the median score to reduce variance.
- Pairwise comparison. Instead of absolute scoring, show the judge two outputs and ask which is better. This is more reliable than absolute ratings.
- Position bias correction. If you are running a pairwise comparison, randomise the order of the two outputs across runs - LLMs tend to favour the first option presented. This does not apply to absolute single-item scoring.
EvalSpec's own built-in judge uses absolute single-item scoring - each response is scored once against the relevant rubric. It does not currently run multiple passes, take a median score, or perform pairwise comparison. The techniques above are guidance for evaluations you design and run yourself, not a description of EvalSpec's internal judging process.
Agreement Metrics
Measure inter-rater reliability between the LLM judge and human evaluators using Cohen's Kappa (for 2 raters) or Fleiss' Kappa (for multiple). A Kappa above 0.6 indicates substantial agreement; below 0.4 suggests the judge isn't reliable enough for production use.
Common Failure Modes by System Type
Chatbots
- Context window overflow causing mid-conversation amnesia
- Persona drift over extended conversations
- Prompt injection through user messages
- Inappropriate emotional responses to distressed users
- Confidently wrong answers about company-specific information
- Repetitive response patterns creating a "scripted" feel
- Failure to handle conversation topic switches
- Language mixing or code-switching errors
Content Generation
- Word count constraint violations (over or under)
- Tone inconsistency within a single piece
- Fabricated statistics or citations
- Plagiarism or near-plagiarism of training data
- SEO keyword stuffing or unnatural optimisation patterns
- Loss of brand voice across different content types
RAG (Retrieval-Augmented Generation) Systems
- Retrieving irrelevant documents due to semantic similarity surface matching
- Hallucinating beyond retrieved context
- Failure to synthesise information across multiple documents
- Not respecting document recency or versioning
- Citation fabrication - attributing statements to wrong sources
- Knowledge boundary blindness - not knowing when the corpus doesn't cover a topic
- Chunk boundary issues causing incomplete information retrieval
Workflow Automation
- Silent failures with no error reporting
- Race conditions in parallel execution paths
- Idempotency failures causing duplicate actions
- Schema drift across API versions
- Timeout handling that loses data
- Permission escalation through chained steps
Code Generation
- Security vulnerabilities in generated code (SQL injection, XSS)
- Using deprecated or vulnerable library versions
- Missing error handling and edge case coverage
- Hardcoded credentials and secrets
- Incorrect use of language-specific idioms or patterns
- License-incompatible code reproduction
- Generated tests that don't actually test the right behaviour
Test your system against these failure modes
See the test case libraryQuality Gates for CI/CD
Note: This section describes how EvalSpec evaluation outputs can inform CI/CD decisions, even when the evaluation itself is run manually in the browser. You don't need a pipeline to benefit from structured evaluation - the thresholds and patterns here apply whether you're blocking a deploy automatically or making a manual go/no-go call.
Integrating AI evaluation into your deployment pipeline requires a different approach from traditional software testing. Here's how to implement quality gates effectively.
Threshold Recommendations
Define minimum acceptable scores per dimension based on your system's risk level:
- Critical systems (healthcare, finance): Minimum 4.0 average per dimension. Any single score below 3 blocks deployment.
- Customer-facing systems: Minimum 3.5 average per dimension. Safety dimension minimum 4.0. No scores of 1.
- Internal tools: Minimum 3.0 average per dimension. Safety minimum 3.5.
Pipeline Integration Pattern
Run your evaluation suite on every pull request that modifies the AI system's prompts, model configuration, or retrieval logic. Store results in a structured format (JSON) and compare against the previous deployment's scores. Flag any dimension that regressed by more than 0.5 points.
Regression Detection
Maintain a baseline evaluation score for each release. When scores drop, investigate whether the regression is in the model, the prompts, the retrieval layer, or the test cases themselves. Not every score drop indicates a real regression - test cases may need updating too.
Set up quality gates for your AI system
Start EvaluationAccessibility in AI Evaluation
Accessibility is not an afterthought in AI systems evaluation - it is a first-class quality dimension. AI-generated content and AI-powered interfaces must meet the same accessibility standards as human-authored content, and in many jurisdictions, compliance is a legal requirement.
Why AI Outputs Need Accessibility Evaluation
AI systems increasingly generate content that users consume directly: chatbot responses, auto-generated summaries, UI copy, and data visualisations. If that content is inaccessible, the AI system has failed a subset of its users as surely as if it had hallucinated. Specific risks include:
- Generated HTML or markdown that does not include semantic structure (headings, lists, tables with headers)
- Auto-generated image captions that are missing, truncated, or factually wrong
- AI-generated colour palettes or UI components that fail WCAG contrast requirements
- Voice interface transcriptions that fail for users with non-standard speech
- Generated form fields or interactive components without associated labels or ARIA attributes
Testing AI-Generated Content for Screen Reader Compatibility
When evaluating AI-generated structured content (tables, lists, code blocks, forms), test it against the following criteria:
- Semantic HTML: Does generated HTML use meaningful elements (
<h1>–<h6>,<nav>,<main>,<article>) rather than<div>-heavy soup? - Table accessibility: Do generated tables include
<thead>,<th scope>, and meaningful captions? - Link text: Does generated content avoid generic link text like "click here" or "read more"?
- Image descriptions: If the AI generates image alt text, is it accurate, concise, and free of hallucination?
- Reading order: Does the generated content have a logical reading order that maps to visual order?
Evaluating Colour Contrast in AI-Generated UI
AI systems that generate UI components, colour schemes, or design tokens must be evaluated against WCAG 2.1 contrast requirements:
- Normal text: minimum 4.5:1 contrast ratio against background
- Large text (18pt+ or 14pt bold): minimum 3:1 contrast ratio
- UI components and focus indicators: minimum 3:1 against adjacent colours
- Decorative elements: exempt, but the AI should not mark important content as decorative
Use automated tools (axe, Lighthouse, Colour Contrast Analyser) to audit AI-generated UI at scale. Manual spot-checks are insufficient for volume generation.
WCAG 2.1 AA Requirements Relevant to AI Systems
The following WCAG 2.1 AA success criteria are particularly relevant when evaluating AI-generated or AI-powered interfaces:
- 1.1.1 Non-text Content: All images, icons, and charts generated by AI must have text alternatives.
- 1.3.1 Info and Relationships: Semantic structure of generated content must be programmatically determinable.
- 1.4.3 Contrast (Minimum): AI-chosen colours must meet minimum contrast ratios.
- 2.1.1 Keyboard: Interactive AI components must be fully keyboard-navigable.
- 2.4.4 Link Purpose: Links in AI-generated content must have descriptive text.
- 3.3.2 Labels or Instructions: AI-generated form fields must include visible labels.
- 4.1.2 Name, Role, Value: AI-generated interactive components must expose proper ARIA attributes.
Accessibility as a Dimension of Alignment
Accessibility failures are alignment failures. When a user who relies on a screen reader cannot use an AI-generated interface, the system has failed to serve their actual need - regardless of how accurate or safe the underlying model is. This makes accessibility an intrinsic component of the Alignment dimension in the 5-Dimension Framework.
Consider adding accessibility-specific test cases to your evaluation suite:
- Ask the AI to generate a data table and verify it includes proper header elements
- Request a UI component and check it has keyboard focus management and ARIA labels
- Generate alt text for a complex chart and verify it conveys the data insight, not just the visual
- Ask for a colour palette and verify all combinations meet WCAG AA contrast requirements
Glossary
- Hallucination
- When an AI system generates information that is not grounded in its training data or provided context, presenting fabricated content as fact.
- Prompt Injection
- An adversarial technique where malicious instructions are embedded in user input to override the system's intended behaviour.
- Jailbreak
- A technique to bypass an AI system's safety constraints, typically through role-play scenarios or social engineering of the model.
- Retrieval-Augmented Generation (RAG)
- An architecture that combines information retrieval from a knowledge base with generative AI to produce grounded, contextual responses.
- Groundedness
- The degree to which an AI system's output is supported by provided context or verified sources, as opposed to generated from the model's parameters.
- Red Teaming
- The practice of deliberately probing a system's defences through adversarial testing, often involving creative and unexpected attack vectors.
- LLM-as-Judge
- A pattern where a large language model is used to evaluate the quality or correctness of another model's outputs.
- Cohen's Kappa
- A statistical measure of inter-rater reliability that accounts for chance agreement. Used to measure how well human and AI evaluators agree.
- Semantic Similarity
- A measure of how similar two pieces of text are in meaning, regardless of exact wording. Used in consistency testing.
- Idempotency
- A property where performing the same operation multiple times produces the same result as performing it once. Critical for workflow automation reliability.
- Graceful Degradation
- A system's ability to maintain partial functionality and provide useful feedback when encountering errors or unexpected conditions.
- Prompt Engineering
- The practice of designing and iterating on input prompts to elicit desired behaviour from a language model.
- Temperature
- A parameter controlling the randomness of a model's output. Lower temperature produces more deterministic, focused responses; higher temperature increases creativity and variance.
- Token
- The fundamental unit of text processing in language models. Roughly equivalent to 0.75 words in English.
- Context Window
- The maximum amount of text (measured in tokens) that a model can process in a single request, including both input and output.
- Embedding
- A numerical vector representation of text that captures semantic meaning, used for similarity comparison and retrieval.
- RLHF
- Reinforcement Learning from Human Feedback - a training technique that aligns model behaviour with human preferences.
- PII
- Personally Identifiable Information - data that can identify a specific individual, subject to privacy regulations.
- Quality Gate
- A checkpoint in a CI/CD pipeline that blocks deployment if predefined quality criteria are not met.
- Regression
- A deterioration in system performance or quality compared to a previous baseline, often introduced unintentionally through changes.
- Evaluation Rubric
- A detailed scoring guide that defines what each score level (e.g., 1-5) means for a specific test case, reducing subjectivity in assessment.
References
This framework draws on established standards and emerging best practices in AI governance and quality assurance:
- NIST AI Risk Management Framework (AI RMF 1.0) - Published January 2023. Provides a structured approach to managing AI risks across the system lifecycle. The EvalSpec dimensions map directly to NIST's Govern, Map, Measure, and Manage functions. NIST AI
- EU AI Act (Regulation 2024/1689) - The world's first comprehensive AI regulation, establishing risk categories and conformity requirements for AI systems. Our Safety & Compliance dimension aligns with the Act's requirements for high-risk systems. EU AI Act Reference
- ISO/IEC 42001:2023 - The international standard for AI Management Systems, providing requirements for establishing, implementing, and maintaining an AI management system. ISO 42001
- OWASP Top 10 for LLM Applications - Security-focused guidance on the most critical vulnerabilities in LLM-based applications, including prompt injection, data poisoning, and insecure output handling. OWASP LLM Top 10
- Anthropic's Constitutional AI - Research on training AI systems to be helpful, harmless, and honest through principles-based evaluation. Informs our Safety dimension methodology. Constitutional AI paper
- Google's SAFE (Systematic Assessment Framework for Evaluations) - Methodology for factuality evaluation using search-augmented verification. Informs our Accuracy dimension. Google SAFE paper