Use this prompt when you already have a golden dataset and a stable prompt specification, but you suspect the test suite is incomplete. The job-to-be-done is auditing your evaluation coverage: identifying input categories, edge cases, and failure modes that your current tests don't exercise. The ideal user is an evaluation lead or prompt engineer who owns a regression suite and needs evidence to prioritize test expansion before the next prompt release. Required context includes the prompt template under test, its documented constraints and expected behaviors, and the full golden dataset with metadata tags.
Prompt
Golden Dataset Coverage Gap Analysis Prompt

When to Use This Prompt
Understand when a coverage gap analysis is the right tool and when it's the wrong one.
This prompt is not a test case generator. It does not produce new test inputs or expected outputs—it analyzes what's missing from what already exists. Don't use it when you have no golden dataset at all; start with the Golden Dataset Construction Prompt instead. Don't use it when you need to run tests or compare prompt versions; those workflows belong to the Regression Test Suite Runner or Prompt Version Comparison prompts. Don't use it when your prompt specification is still in flux—coverage analysis against a moving target produces noise, not signal. The prompt works best when the spec is versioned and the dataset has consistent metadata like input category, difficulty, and expected behavior tags.
The output is a structured gap report, not a pass/fail judgment. Expect prioritized recommendations with rationale, not just a list of missing cases. The prompt will flag underrepresented categories, boundary conditions that lack test coverage, and failure modes the dataset doesn't probe. It may also identify redundant tests that over-represent certain patterns while leaving others untested. Before running this analysis, ensure your golden dataset metadata is clean—inconsistent tags or missing category labels will degrade the quality of the gap detection. If your evaluation pipeline is high-stakes (safety-critical outputs, regulated domains, or customer-facing automation), treat the gap report as an input to human review, not an automated gate. A human should validate that the recommended expansions make sense before committing engineering time to building new test cases.
After running this prompt, the natural next step is to feed the prioritized gap recommendations into the Golden Dataset Expansion from Production Failures prompt or the Test Case Generation from Prompt Spec prompt, depending on whether you're filling gaps from real incidents or from spec analysis. Avoid the temptation to close every gap at once—prioritize by risk and frequency of the uncovered input category in production traffic.
Use Case Fit
Where the Golden Dataset Coverage Gap Analysis Prompt delivers value and where it introduces risk. Use these cards to decide if this prompt fits your evaluation pipeline before investing in integration.
Good Fit: Pre-Release Test Suite Audits
Use when: you have a stable prompt specification and an existing golden dataset, and you need to find coverage gaps before a release. Guardrail: Run this analysis after every major prompt change and require a coverage report as part of the release gate checklist.
Good Fit: Post-Incident Coverage Retrospectives
Use when: a production failure exposed an untested edge case and you need to systematically find similar gaps. Guardrail: Feed the incident's root cause category into the prompt's [FAILURE_MODE_TAXONOMY] to focus the analysis on the failure class that escaped testing.
Bad Fit: Initial Dataset Creation
Avoid when: you don't yet have a golden dataset and need to build one from scratch. This prompt analyzes existing coverage, not generates test cases. Guardrail: Use the Golden Dataset Construction Prompt Template first, then run this gap analysis on the result.
Bad Fit: Real-Time Production Monitoring
Avoid when: you need to detect regressions in live traffic. This prompt is a batch analysis tool for test suites, not a streaming evaluator. Guardrail: Pair this with the Prompt Behavior Drift Detection Prompt for production monitoring and reserve gap analysis for scheduled dataset reviews.
Required Inputs: Prompt Spec and Labeled Dataset
Risk: Running gap analysis without a structured prompt specification or without difficulty and category tags on test cases produces vague, unactionable results. Guardrail: Ensure [PROMPT_SPEC] includes input schema, constraints, and expected behaviors, and that [GOLDEN_DATASET] includes metadata fields for category, difficulty, and input type.
Operational Risk: Analysis Drift Over Time
Risk: As your prompt evolves, the gap analysis from last month may no longer reflect current coverage needs. Stale analyses create false confidence. Guardrail: Version-pin your gap analysis reports to the prompt version they analyzed and set a recurring schedule that triggers re-analysis on prompt change or every N sprints.
Copy-Ready Prompt Template
A reusable prompt template with square-bracket placeholders for analyzing golden dataset coverage gaps.
This section provides the core prompt template for auditing a golden dataset against a prompt specification. The template is designed to be copied directly into your evaluation pipeline, with placeholders that you replace with your actual prompt under test, dataset samples, and domain constraints. The prompt instructs the model to act as an evaluation auditor, systematically comparing what your test suite covers against what your prompt specification demands. It produces a structured gap report with prioritized recommendations, making it suitable for automated coverage checks in CI/CD or manual review before a release.
textYou are an evaluation coverage auditor. Your task is to analyze a golden dataset against a prompt specification and identify gaps in test coverage. ## PROMPT SPECIFICATION [PROMPT_SPECIFICATION] ## GOLDEN DATASET SAMPLE [DATASET_SAMPLE] ## ANALYSIS INSTRUCTIONS 1. Parse the prompt specification to extract all explicit and implicit requirements, constraints, edge cases, and behavioral expectations. 2. Review the golden dataset sample to understand what input categories, difficulty levels, and failure modes are currently represented. 3. Identify coverage gaps across these dimensions: - **Missing Input Categories**: Input types, domains, or formats that the specification handles but the dataset lacks. - **Underrepresented Edge Cases**: Boundary conditions, adversarial inputs, or rare scenarios with insufficient examples. - **Untested Failure Modes**: Specified error handling, refusal conditions, or constraint violations without corresponding test cases. - **Difficulty Imbalance**: Overrepresentation of easy cases and underrepresentation of complex, multi-step, or ambiguous inputs. - **Demographic or Linguistic Gaps**: Missing languages, dialects, or user personas that the specification should serve. 4. For each gap, assign a severity score (Critical, High, Medium, Low) based on: - Likelihood of encountering the gap in production. - Impact severity if the prompt fails on that input. - Whether the gap masks a known failure mode from past incidents. 5. Produce prioritized expansion recommendations with concrete example inputs that would fill each gap. ## OUTPUT FORMAT Return a JSON object with this exact structure: { "specification_summary": "Brief summary of what the prompt specification requires", "dataset_profile": { "total_examples_reviewed": [NUMBER], "input_categories_covered": ["category1", "category2"], "difficulty_distribution": {"easy": [NUMBER], "medium": [NUMBER], "hard": [NUMBER]}, "represented_failure_modes": ["mode1", "mode2"] }, "coverage_gaps": [ { "gap_id": "GAP-001", "category": "Missing Input Category | Underrepresented Edge Case | Untested Failure Mode | Difficulty Imbalance | Demographic or Linguistic Gap", "description": "What is missing or underrepresented", "severity": "Critical | High | Medium | Low", "severity_justification": "Why this severity level applies", "recommended_examples": ["example input 1", "example input 2"], "estimated_examples_needed": [NUMBER] } ], "prioritized_recommendations": [ { "rank": [NUMBER], "gap_id": "GAP-XXX", "action": "What to add to the dataset", "rationale": "Why this is prioritized at this rank" } ], "overall_coverage_score": [NUMBER 0-100], "critical_gaps_count": [NUMBER] } ## CONSTRAINTS - Only report gaps you can justify from the specification. Do not invent requirements. - If the dataset sample is too small to draw reliable conclusions, note this limitation and recommend a full-dataset review. - For each gap, provide at least one concrete example input that would address it. - If no critical gaps exist, acknowledge this but still report lower-severity gaps. - Do not recommend removing existing test cases; focus only on expansion.
To adapt this template, replace [PROMPT_SPECIFICATION] with the full text of the prompt you are evaluating, including its system instructions, output format requirements, and any behavioral constraints. Replace [DATASET_SAMPLE] with a representative sample of your golden dataset entries—include at least 20-30 examples spanning different categories if possible. If your dataset is large, provide a stratified sample rather than random rows. The output JSON schema is designed to be machine-readable for automated coverage dashboards, but the severity justifications and concrete example recommendations also support manual review during release readiness checks. For high-risk domains where coverage gaps could cause safety failures, route Critical-severity findings to a human reviewer before accepting the analysis.
Prompt Variables
Required inputs for the Golden Dataset Coverage Gap Analysis Prompt. Each variable must be populated before execution to ensure the analysis is grounded in the actual prompt specification and test suite.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[PROMPT_SPECIFICATION] | The complete prompt template under analysis, including system instructions, user message structure, and output format constraints | You are a customer support classifier. Given a [TICKET_TEXT], classify the intent as BILLING, TECHNICAL, or ACCOUNT. Return JSON with intent and confidence. | Must contain at least one instruction and one output constraint. Validate that the spec includes the full prompt text, not just a summary or pointer. |
[GOLDEN_DATASET] | The full set of test cases with inputs, expected outputs, and metadata tags | JSON array with 150 objects, each containing input, expected_output, category, difficulty, and source fields | Must be parseable as a valid JSON array. Each entry must have an input field. Validate that expected_output is present for at least 80% of cases. Null expected_output is allowed for open-ended test cases. |
[INPUT_CATEGORIES] | Taxonomy of input types the prompt is expected to handle, derived from the specification or product requirements | billing_dispute, password_reset, account_closure, refund_request, plan_upgrade, technical_outage, login_failure | Must contain at least 3 categories. Validate that each category maps to at least one instruction or constraint in [PROMPT_SPECIFICATION]. Categories with zero coverage in [GOLDEN_DATASET] will be flagged as gaps. |
[FAILURE_MODE_TAXONOMY] | Known failure modes the analysis should check for, such as hallucination, format drift, over-refusal, or context mishandling | hallucination, format_violation, instruction_misinterpretation, over_refusal, confidence_miscalibration, edge_case_mishandling | Must contain at least 3 failure modes. Validate that each mode is testable given the [PROMPT_SPECIFICATION] output format. Modes requiring tool-call observation should be noted as partially testable. |
[COVERAGE_THRESHOLDS] | Minimum acceptable coverage levels per category and failure mode, used to trigger expansion recommendations | min_examples_per_category: 5, min_edge_cases_per_category: 2, min_adversarial_examples_total: 10 | Must specify numeric thresholds for at least category coverage and edge-case coverage. Validate that thresholds are achievable given the dataset size. Threshold of 0 means the dimension is optional. |
[OUTPUT_SCHEMA] | Expected structure of the gap analysis output, including required fields for gaps, severity, and recommendations | JSON schema with gaps array containing category, gap_type, severity, current_coverage_count, recommended_minimum, and expansion_suggestions fields | Must be a valid JSON Schema or a structured field list. Validate that required fields include gap identification, severity, and actionable recommendations. Schema-only output without narrative is acceptable. |
[CONSTRAINTS] | Boundary conditions for the analysis, such as maximum recommendations, minimum severity to report, or categories to exclude | max_recommendations: 20, min_severity_to_report: medium, exclude_categories: [deprecated_legacy_intents] | Must be parseable as key-value constraints. Validate that constraints do not contradict [COVERAGE_THRESHOLDS]. Null is allowed if no additional constraints exist beyond the thresholds. |
Implementation Harness Notes
How to wire the coverage gap analysis prompt into an evaluation pipeline with validation, retries, and actionable output.
The Golden Dataset Coverage Gap Analysis Prompt is designed to run as a pre-release or periodic audit step in your evaluation pipeline, not as a real-time production call. Wire it into a scheduled job or a manual trigger in your prompt versioning workflow—typically after a golden dataset has been updated or before a major prompt release. The prompt expects a prompt specification (system prompt, constraints, expected behavior) and a golden dataset manifest (input categories, edge cases, difficulty distribution) as inputs. It returns a structured gap report with prioritized expansion recommendations. Because this analysis informs downstream test case generation, the output should be reviewed by an evaluation lead before new test cases are created.
For implementation, wrap the prompt call in a function that validates the output schema before accepting results. The expected output is a JSON object with a coverage_gaps array, each entry containing category, gap_description, severity, recommended_test_count, and rationale. Use a JSON schema validator to confirm field presence, types, and enum values for severity (Critical, High, Medium, Low). If validation fails, retry once with the validation error message appended to the prompt as a correction hint. Log both the raw output and the validation result for auditability. For model choice, a reasoning-capable model (such as Claude 3.5 Sonnet or GPT-4o) is recommended because the analysis requires cross-referencing the prompt specification against dataset composition—a task that benefits from structured reasoning. Set temperature to 0 or near-zero to maximize reproducibility across runs.
The most common failure mode is the model producing vague gap descriptions that lack actionable specificity (e.g., 'missing edge cases' without identifying which edge cases). Mitigate this by including a CONSTRAINTS placeholder in the prompt that requires each gap to reference a specific input category or test scenario from the dataset manifest. A second failure mode is hallucinated gaps—the model inventing missing categories that are actually present in the dataset. To catch this, implement a post-processing check that cross-references each reported gap against the dataset manifest. Flag any gap that references a category not present in the manifest for human review. Store gap analysis results alongside the dataset version and prompt version in your evaluation registry so you can track coverage improvement over time and avoid re-analyzing already-addressed gaps.
Expected Output Contract
Defines the structure, types, and validation rules for the output of the Golden Dataset Coverage Gap Analysis Prompt. Use this contract to parse, validate, and integrate the analysis results into your evaluation pipeline.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
coverage_summary | Object | Must contain total_cases, covered_categories, and coverage_percentage fields. coverage_percentage must be a number between 0 and 100. | |
gap_analysis | Array of Objects | Each object must have category, severity, missing_edge_cases, and underrepresented_inputs fields. severity must be one of critical, high, medium, low. | |
gap_analysis[].category | String | Must match a category defined in the input prompt specification or be tagged as uncategorized. Non-empty string required. | |
gap_analysis[].missing_edge_cases | Array of Strings | Each string must describe a specific, testable scenario not covered by the golden dataset. Minimum 1 item if severity is critical or high. | |
gap_analysis[].underrepresented_inputs | Array of Strings | Each string must identify an input category with insufficient representation. Must include a suggested minimum sample count in parentheses, e.g., 'non-English queries (min 20 samples)'. | |
expansion_recommendations | Array of Objects | Each object must have priority, test_case_template, rationale, and estimated_effort fields. priority must be an integer where 1 is highest. | |
expansion_recommendations[].test_case_template | Object | Must contain input and expected_behavior fields. input must be a valid representation of the test case. expected_behavior must describe the correct model response or a pass condition. | |
untested_failure_modes | Array of Strings | Each string must describe a failure mode from the prompt specification that has zero corresponding test cases in the golden dataset. If none exist, use an empty array. |
Common Failure Modes
What breaks first when running a coverage gap analysis and how to guard against it.
Surface-Level Gap Detection
What to watch: The prompt identifies only obvious missing keywords or topics, missing deeper structural gaps like underrepresented input lengths, complex multi-intent combinations, or edge-case sequences. Guardrail: Include explicit instructions to analyze the dataset across multiple dimensions: input complexity, intent combinations, demographic variance, and adversarial patterns, not just topic labels.
Specification Misalignment
What to watch: The analysis evaluates coverage against what the dataset contains rather than what the prompt specification requires. Gaps are missed because the judge uses the dataset's own distribution as the reference point. Guardrail: Provide the full prompt specification as a separate, immutable input and instruct the model to treat it as the ground truth for required coverage, not the dataset's current distribution.
Overconfident Coverage Claims
What to watch: The model declares categories "well-covered" based on a few superficial examples, missing that those examples lack diversity in phrasing, entities, or constraints. Guardrail: Require the output to include a confidence level and explicit evidence count for each coverage claim. Flag any category with fewer than a configurable minimum number of diverse examples as under-tested.
Hallucinated Edge Cases
What to watch: The model invents plausible-sounding but irrelevant edge cases that don't actually relate to the prompt specification's real failure modes, wasting engineering time on phantom gaps. Guardrail: Require each recommended gap to include a direct trace back to a specific constraint or requirement in the prompt specification. Reject recommendations that can't cite their source requirement.
Prioritization Without Impact Context
What to watch: The analysis produces a flat list of gaps without considering which missing cases would cause the most severe production failures or affect the largest user segments. Guardrail: Include severity and blast-radius criteria in the prompt. Require each gap recommendation to estimate potential failure impact and user exposure, not just coverage percentage.
Blindness to Near-Miss Coverage
What to watch: The model treats coverage as binary—either a case exists or it doesn't—missing that some existing test cases only partially exercise a requirement and would pass while leaving critical sub-conditions untested. Guardrail: Instruct the model to evaluate coverage depth, not just presence. For each requirement, assess whether existing test cases exercise all sub-conditions, boundary values, and failure paths, not just the happy path.
Evaluation Rubric
Criteria for evaluating the quality of a coverage gap analysis report. Use these standards to gate the prompt before integrating it into a CI/CD pipeline or evaluation workflow.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Gap Identification Completeness | Report identifies at least one gap per input category defined in the prompt specification | Report returns 'no gaps found' for a deliberately incomplete dataset or misses an obvious missing edge case | Run against a seeded golden dataset with known missing categories and verify all are flagged |
Category Coverage Mapping | Each identified gap is mapped to a specific input category from [PROMPT_SPECIFICATION] | Gaps are listed without category tags or mapped to categories not present in the specification | Parse output for category fields and cross-reference against the allowed category list in the specification |
Priority Justification | Every gap includes a concrete rationale for its priority level tied to risk, frequency, or blast radius | Priority labels are assigned without explanation or all gaps receive the same priority | Check that each gap entry has a non-empty justification field and that at least two distinct priority levels appear |
Expansion Recommendation Actionability | Each recommendation includes a specific input example or generation strategy for the missing test case | Recommendations are vague statements like 'add more edge cases' without concrete input values | Validate that each recommendation contains a testable input string or a parameterized generation template |
Failure Mode Coverage | Report identifies untested failure modes from [KNOWN_FAILURE_MODES] that are absent from the dataset | Report ignores documented failure modes or only focuses on happy-path gaps | Cross-reference output failure mode tags against the provided known failure modes list and verify overlap |
Dataset Statistics Accuracy | Reported counts for category distribution, total examples, and gap percentages match actual dataset statistics | Counts are off by more than 5% or category totals don't sum to the reported dataset size | Compute ground-truth statistics from the golden dataset and compare to reported numbers with a tolerance check |
Output Schema Compliance | Report conforms to [OUTPUT_SCHEMA] with all required fields present and correctly typed | Missing required fields, wrong types, or extra fields not in the schema | Validate output against the JSON schema using a programmatic validator and reject on any schema violation |
No Hallucinated Test Cases | All referenced existing test cases match actual entries in the provided golden dataset | Report cites test case IDs or input strings that don't exist in the dataset | Extract all referenced test case identifiers and verify each exists in the golden dataset index |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a smaller golden dataset (10-20 examples) and lighter validation. Replace [INPUT_SCHEMA] with a simple text description of expected input categories. Skip automated scoring—manually review the gap analysis output for reasonableness.
Watch for
- Overly broad category suggestions that don't match your actual traffic
- Missing edge case types because the sample is too small
- No schema validation on the output, so format drift goes undetected

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us