This prompt is for AI engineering teams who have built or are iterating on a production reference resolver and need a structured, repeatable way to evaluate its quality. The primary job-to-be-done is generating a detailed evaluation rubric that an LLM judge can use to score the resolver's output on precision, recall, and the appropriateness of its clarification requests. The ideal user is an MLOps engineer, a backend developer working on a conversational AI pipeline, or a technical lead responsible for the quality of a multi-turn chat or copilot system. You should have a clear definition of your resolver's input (the ambiguous utterance and dialogue history) and its expected output (a resolved utterance, a clarification question, or an entity mapping) before using this prompt.
Prompt
Reference Resolution Evaluation Rubric Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Reference Resolution Evaluation Rubric prompt.
Use this prompt when you need to move beyond ad-hoc spot-checking and want a calibrated, criteria-based evaluation that can run automatically in a CI/CD pipeline or as part of a nightly regression suite. It is particularly valuable when you are A/B testing two different resolver prompts or architectures and need a judge that can perform pairwise comparisons with clear reasoning. The rubric it produces is designed to be granular, covering specific failure modes like incorrect gender agreement, entity type mismatches, and unnecessary clarifications. This allows you to decompose a vague 'the resolver is bad' signal into actionable, fixable sub-problems.
Do not use this prompt if you are still in the earliest prototyping phase and have no stable input/output contract for your resolver. The rubric's value comes from its specificity to a defined task; applying it to a moving target will produce noisy, unhelpful evaluations. This prompt is also not a substitute for human evaluation in high-stakes domains like healthcare or legal tech, where a model-graded rubric should be one signal among many. In those cases, use the rubric to triage and surface potential failures for mandatory human review, not as the final quality gate. If your resolver is a simple string match or a deterministic rule, this LLM-based evaluation is likely overkill; invest instead in unit tests for your resolution logic.
Use Case Fit
Where this evaluation rubric prompt delivers reliable signal and where it introduces risk. Use these cards to decide if a structured LLM judge is the right tool for your reference resolution pipeline.
Good Fit: A/B Testing Resolver Variants
Use when: you are comparing two reference resolution prompts and need granular, repeatable criteria. Guardrail: The rubric's pairwise comparison instructions reduce subjective 'vibes-based' evaluation by forcing the judge to articulate why one output is better on precision, recall, or clarification appropriateness.
Good Fit: Pre-Release Regression Gates
Use when: you have a golden dataset of ambiguous utterances and resolved references. Guardrail: Run the rubric against every prompt change. A drop in the 'Clarification Appropriateness' score is an automatic block, preventing over-eager resolvers from guessing in high-stakes domains.
Bad Fit: Real-Time Production Guardrails
Avoid when: you need a low-latency, in-line check before executing an action. Risk: An LLM judge adds significant latency and cost per turn. Guardrail: Use this rubric for offline evaluation only. For production, distill the rubric's criteria into deterministic heuristics (e.g., entity overlap checks) or a smaller, fine-tuned classifier.
Required Input: Structured Dialogue State
What to watch: The rubric cannot evaluate resolution quality without the full context. Guardrail: The prompt must be fed a structured history of turns, not just the raw text. Include speaker roles, timestamps, and previously resolved entities. A missing context window leads the judge to incorrectly penalize correct resolutions as ungrounded.
Operational Risk: Judge Hallucination on Edge Cases
What to watch: The LLM judge may hallucinate a 'correct' reference that isn't in the history, especially with complex bridging anaphora. Guardrail: Add a 'Grounding' criterion to the rubric that forces the judge to cite the exact turn and span that supports the resolution. If no citation exists, the score must be zero.
Operational Risk: Score Drift Over Time
What to watch: As you iterate on the resolver prompt, the judge's scores may drift due to model updates or context window pollution. Guardrail: Maintain a static 'calibration set' of 20-30 examples with human-verified scores. Run this set weekly. If the judge's scores deviate by more than 5%, recalibrate the rubric or lock the judge model version.
Copy-Ready Prompt Template
A reusable prompt for an LLM judge to evaluate a reference resolution system's output against a structured rubric.
This prompt template instructs a language model to act as an evaluator for your production reference resolver. It is designed to be used in a CI/CD pipeline or an offline evaluation harness to score individual predictions against a ground-truth or expected output. The core job is to produce a structured, granular scorecard that goes beyond a simple pass/fail, breaking down performance into precision, recall, and clarification appropriateness. Use this template as the foundation for your automated eval judge, adapting the placeholders to fit your specific dialogue domain and output schema.
markdownYou are an expert evaluator for a dialogue system's reference resolution module. Your task is to compare the [RESOLVED_UTTERANCE] against the [GOLD_REFERENCE] within the context of the [DIALOGUE_HISTORY]. You must produce a structured evaluation rubric in JSON format. **Evaluation Criteria:** 1. **Precision:** Does the resolved utterance correctly identify the specific entity or entities the user was referring to, without including extraneous or incorrect entities? Score from 0.0 to 1.0. 2. **Recall:** Did the resolution capture all intended referents from the user's ambiguous phrase? Score from 0.0 to 1.0. 3. **Clarification Appropriateness:** If the input was ambiguous and the system chose to ask a clarifying question instead of resolving, was this the correct decision? If the system resolved, should it have asked for clarification instead? Score as 'correct_decision', 'missed_clarification', or 'unnecessary_clarification'. **Input Data:** - **Dialogue History:** [DIALOGUE_HISTORY] - **User's Ambiguous Utterance:** [AMBIGUOUS_UTTERANCE] - **System's Resolved Utterance (to evaluate):** [RESOLVED_UTTERANCE] - **Gold-Standard Resolved Utterance:** [GOLD_REFERENCE] **Output Schema:** You must respond with a single JSON object conforming to this schema: { "precision_score": <float 0.0-1.0>, "recall_score": <float 0.0-1.0>, "clarification_decision": "<correct_decision|missed_clarification|unnecessary_clarification>", "rationale": "<A concise explanation for each score and the clarification decision.>" } **Pairwise Comparison (Optional):** If a [RESOLVED_UTTERANCE_B] is provided, add a `comparison` field to the output JSON: { ... "comparison": { "winner": "<A, B, or tie>", "reason": "<Brief justification for the pairwise comparison result.>" } } **Constraints:** - Base your evaluation strictly on the provided dialogue history and gold reference. - If the gold reference is a clarification question, the `clarification_decision` for a resolved utterance must be 'missed_clarification'. - Do not evaluate the fluency or grammar of the resolved utterance, only the correctness of the entity reference.
To adapt this template, start by replacing the placeholder descriptions with your actual data structures. The [DIALOGUE_HISTORY] should be a serialized representation of prior turns, which could be a simple \n-separated string or a JSON array of {role, content} objects. The [GOLD_REFERENCE] is your labeled expected output. For A/B testing, provide a second system's output in [RESOLVED_UTTERANCE_B] and the pairwise comparison logic will be activated. The output schema is a contract; ensure your parsing code expects these exact field names and enum values. For high-stakes domains, always log the rationale field for human auditability, and consider routing cases with a precision_score below 0.8 for manual review.
Prompt Variables
Required inputs for the Reference Resolution Evaluation Rubric Prompt. Each variable must be populated before the LLM judge can produce a reliable evaluation. Missing or malformed inputs are the most common cause of rubric failure.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[DIALOGUE_HISTORY] | The full multi-turn conversation containing the reference to evaluate. Must include at least the turn with the reference and sufficient prior context to resolve it. | User: Show me the Q3 report. Assistant: Here it is. User: Now compare it to last year. | Parse check: must be valid JSON array of {role, content} objects. Minimum 2 turns. Reject if reference turn is missing or if prior context is truncated mid-entity mention. |
[REFERENCE_TURN_INDEX] | Zero-based index identifying which turn in [DIALOGUE_HISTORY] contains the reference to evaluate. The resolver's output for this turn is what the rubric scores. | 2 | Must be an integer within bounds of [DIALOGUE_HISTORY] array length. Reject if index points to a turn with no detectable reference (pre-filter with reference detector before invoking rubric). |
[REFERENCE_SPAN] | The exact substring in the reference turn that constitutes the anaphor, pronoun, ellipsis, or implicit reference to resolve. | it | Must be a non-empty string that appears verbatim in the specified turn. Null allowed only for fully implicit/ellided references where no surface span exists. Validate with exact substring match. |
[RESOLVER_OUTPUT] | The structured output from the reference resolver under evaluation. Must contain the resolved referent and any confidence or clarification fields. | {"resolved_entity": "Q3 2024 financial report", "confidence": 0.92, "clarification_needed": false} | Schema check: must contain resolved_entity (string or null), confidence (float 0-1), and clarification_needed (boolean). Reject if schema mismatches. Null resolved_entity is valid only when clarification_needed is true. |
[GROUND_TRUTH_REFERENT] | The correct referent as labeled by a human annotator or golden dataset. Used as the comparison target for precision and recall scoring. | Q3 2024 financial report | Must be a non-empty string. For clarification-appropriate cases, set to null and set [GROUND_TRUTH_CLARIFICATION_EXPECTED] to true. Validate that ground truth matches the dialogue context (no hallucinated entities). |
[GROUND_TRUTH_CLARIFICATION_EXPECTED] | Boolean indicating whether the correct behavior for this reference is to request clarification rather than resolve. | Must be true or false. When true, [GROUND_TRUTH_REFERENT] must be null. When false, [GROUND_TRUTH_REFERENT] must be non-null. Inconsistent pairs are rejected before rubric invocation. | |
[CANDIDATE_REFERENTS] | The full list of candidate entities from dialogue history and/or knowledge base that the resolver could plausibly select. Used to evaluate distractor resistance. | ["Q3 2024 financial report", "Q2 2024 financial report", "annual budget spreadsheet"] | Must be a JSON array of strings with at least 2 entries including the ground truth. Reject if ground truth is missing from candidates. Validate that all candidates appear in or are inferable from [DIALOGUE_HISTORY]. |
[EVAL_CONFIG] | Configuration object controlling rubric thresholds, pairwise comparison mode, and scoring weights. Allows teams to tune strictness per domain. | {"min_confidence_threshold": 0.7, "pairwise_mode": false, "weights": {"precision": 0.4, "recall": 0.3, "clarification_appropriateness": 0.3}} | Schema check: min_confidence_threshold must be float 0-1. weights values must sum to 1.0. pairwise_mode must be boolean. Reject if weights don't sum to 1.0 or if threshold is outside valid range. |
Implementation Harness Notes
How to wire the Reference Resolution Evaluation Rubric prompt into an automated evaluation pipeline for A/B testing resolver prompts.
This prompt is designed to be used as an LLM judge inside an evaluation harness, not as a one-off manual review tool. The primary integration point is a CI/CD pipeline for prompt engineering, where every change to a reference resolution prompt triggers a regression run. The harness sends the rubric prompt to a strong evaluator model (GPT-4o, Claude 3.5 Sonnet, or equivalent) alongside the candidate resolver's output and the ground-truth dialogue context. The evaluator returns a structured scorecard that your test framework can parse and assert against.
To wire this in, construct a test case object with four fields: dialogue_history (the multi-turn conversation up to the ambiguous utterance), current_utterance (the turn containing the reference to resolve), candidate_resolution (the output from the resolver prompt you're testing), and ground_truth_referent (the correct entity ID or span). Feed these into the rubric prompt's [DIALOGUE_CONTEXT], [AMBIGUOUS_UTTERANCE], [RESOLVER_OUTPUT], and [GROUND_TRUTH] placeholders respectively. Validate the judge's output against a strict JSON schema before accepting scores—if the judge returns malformed JSON, retry once with a repair prompt, then fail the test case as unevaluable. Log every judge response with a trace ID that links back to the resolver prompt version, the test case ID, and the model snapshot used for judging.
For A/B comparison runs, extend the harness to call the rubric prompt twice: once for resolver variant A and once for variant B. After collecting both scorecards, use the pairwise comparison instructions embedded in the rubric to produce a preference judgment. Store these pairwise results in a structured results database (fields: test_case_id, variant_a_version, variant_b_version, winner, confidence, key_differentiator). Set a release gate: if variant B loses on precision or clarification appropriateness for any test case in your golden set, block the promotion. For high-stakes domains like healthcare or legal references, add a human review sampling step where 5% of judge evaluations are spot-checked by a domain expert, and track judge-human agreement rates over time to detect judge drift.
Model choice matters. The evaluator model should be at least as capable as the resolver model, and ideally from a different model family to reduce correlated errors. If you're testing a GPT-4o resolver, judge with Claude 3.5 Sonnet. If both resolver and judge are from the same provider, add a second judge from a different provider for arbitration on borderline cases (scores within 0.2 of the pass/fail threshold). Avoid running the judge on the same model as the resolver—this masks systematic failures that both models share. Set a maximum evaluation latency budget (2 seconds per test case is a reasonable target) and batch evaluations to control cost. Cache judge outputs keyed by (resolver_prompt_hash, test_case_hash) to avoid re-evaluating unchanged combinations.
Common Failure Modes
What breaks first when evaluating reference resolution in production and how to guard against it.
Entity Confusion Across Similar Candidates
What to watch: The resolver swaps entities of the same type (e.g., 'the invoice from March' vs. 'the invoice from April') because attributes are too similar or the model defaults to the most recently mentioned entity. Guardrail: Include a pairwise entity discrimination test in your eval set. Require the rubric to penalize identity swaps with a dedicated 'entity_confusion' criterion weighted higher than surface fluency.
Hallucinated Antecedents Under Ambiguity
What to watch: When no clear referent exists, the resolver invents one that sounds plausible rather than flagging the reference as unresolvable. This is the most dangerous failure mode in high-stakes domains. Guardrail: Add a 'no_referent' ground-truth label to your test cases. The rubric must assign a zero precision score when the resolver hallucinates a resolution for an intentionally unresolvable reference, and reward appropriate clarification requests.
Recency Bias Overriding Salience
What to watch: The resolver picks the most recently mentioned entity even when discourse structure, user intent, or syntactic cues point to an earlier, more salient referent. Guardrail: Construct test cases where the correct referent is not the most recent mention. The rubric should include a 'salience_vs_recency' criterion that checks whether the resolver follows discourse structure rather than simple linear proximity.
Cross-Turn Context Window Truncation
What to watch: The referent exists in conversation history but falls outside the context window provided to the resolver, causing a false 'unresolvable' flag or a guess from available context. Guardrail: Test resolution at varying context distances (1 turn back, 5 turns back, 15 turns back). The rubric should track recall degradation as a function of referent distance and trigger a context budget review when recall drops below threshold.
Pronoun Gender and Number Mismatch
What to watch: The resolver links a pronoun to an entity with mismatched gender or number because lexical similarity overrides grammatical agreement. Guardrail: Include test cases with distractor entities that share words but differ in pronoun-agreement features. The rubric must have a dedicated 'agreement' criterion that fails the resolution if grammatical constraints are violated, regardless of semantic plausibility.
Clarification Loop Exhaustion
What to watch: The resolver correctly identifies ambiguity but generates clarification questions that are too vague, repetitive, or fail to narrow the candidate set, causing user frustration and wasted turns. Guardrail: Evaluate clarification quality separately with a 'clarification_efficiency' criterion. Measure whether the question reduces the candidate set by at least 50% and whether the system converges within a maximum of two clarification turns before escalating.
Evaluation Rubric
Use this rubric to evaluate the quality of a reference resolution prompt's output before shipping. Each criterion targets a specific failure mode common in production dialogue systems. Run these checks against a golden dataset of multi-turn conversations with known correct referents.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Precision: Correct Antecedent Selection | Resolved referent matches the ground-truth entity ID from the dialogue history for at least 95% of unambiguous test cases. | Output maps a pronoun or implicit reference to the wrong entity, or selects a distractor entity with a similar type but different identity. | Run against a labeled dataset of 200+ multi-turn dialogues. Measure exact-match accuracy of the resolved entity ID against the ground truth. Flag any case where the model picks a different entity of the same type. |
Recall: No Missed References | Every pronoun, demonstrative, or implicit reference in the input turn is resolved. No reference is left as-is or skipped. | Output contains an unresolved placeholder, copies the original ambiguous text verbatim, or omits a reference entirely from the resolved output. | Scan the output for any token that matches a known ambiguous reference pattern (pronouns, demonstratives, ellipsis markers) from the input. Fail if any remain unresolved without an explicit clarification flag. |
Clarification Appropriateness | When no candidate referent exceeds the confidence threshold, the output includes a structured clarification request instead of guessing. When a candidate does exceed the threshold, no clarification is generated. | Output guesses a low-confidence referent without asking for clarification, or asks for clarification when a clear, unambiguous referent exists in the prior turn. | Use a test set with 30% deliberately ambiguous references (multiple same-type candidates). Measure whether the clarification flag is set exactly when the top candidate confidence is below the configured threshold. Check for both false positives and false negatives. |
Entity Type Agreement | The resolved referent has the same entity type as the pronoun or reference demands. A gendered pronoun resolves to an entity with matching gender; a demonstrative resolves to an entity of the correct object type. | Output resolves 'she' to a male-coded entity, 'it' to a person, or 'the invoice' to a non-invoice entity from the history. | Validate the resolved entity's type attribute against the linguistic constraints of the reference. Use a schema check: if the reference is a gendered pronoun, the resolved entity must have a matching gender field. If the reference is a definite description, the entity type must match the head noun. |
Cross-Turn Stability | The same entity is assigned the same canonical ID across all turns in a session. No identity swaps occur when multiple entities of the same type are present. | Output assigns a new or different entity ID to a referent that was already resolved in a prior turn, or swaps the IDs of two entities of the same type mid-session. | Run a long-session test with 10+ turns involving 3+ entities of the same type. Track entity IDs across all resolved outputs. Fail if any entity's ID changes without an explicit user correction. |
Source Attribution Accuracy | When the referent comes from a retrieved document rather than dialogue history, the output includes a citation to the correct source chunk. When from dialogue history, the turn index is correct. | Output cites the wrong document chunk, cites a dialogue turn that does not contain the referent, or fails to provide any source attribution when the referent is from RAG context. | For RAG-augmented test cases, verify that the cited chunk ID or turn index contains the resolved entity. For pure dialogue cases, verify the turn index points to the turn where the entity was introduced. |
Correction Propagation Prevention | When a user corrects a prior resolution, the updated mapping is applied to all subsequent turns. No stale, incorrect referent persists after correction. | Output continues to use the old, corrected entity mapping in turns after the user correction, or reverts to the incorrect referent after one correct turn. | Insert a mid-session correction turn into the test dialogue. Verify that all subsequent turns use the corrected entity mapping. Fail if any turn after the correction uses the pre-correction referent. |
Staleness Detection | When a reference is made to an entity last mentioned more than N turns ago, the output includes a staleness score and a recommended action if the score exceeds the threshold. | Output confidently resolves a reference to an entity from 10+ turns ago without any staleness flag, or fails to detect that the topic has shifted and the old entity is no longer salient. | Use a test set with controlled turn distances. Verify that the staleness score increases monotonically with turn distance. Fail if a reference to an entity from beyond the configured staleness threshold is resolved without a re-confirmation flag. |
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
Add structured JSON output schema, granular scoring bands (0-4), and pairwise comparison logic for A/B testing resolver variants. Include confidence calibration checks and require the judge to cite specific dialogue turns as evidence.
code{ "criteria": { "precision": { "score": 0-4, "evidence_turns": [] }, "recall": { "score": 0-4, "missed_references": [] }, "clarification_appropriateness": { "score": 0-4, "unnecessary_clarifications": [] } }, "pairwise_preference": "A" | "B" | "TIE", "preference_rationale": "string" }
Watch for
- Judge hallucinating evidence turns that don't exist in the dialogue
- Score inflation on easy cases masking poor performance on complex references
- Pairwise comparison bias toward longer or more verbose resolver outputs

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