AI coding

A Tie-Breaker Prompt That Requires Evidence: Fields and Examples

Antonio Evans7 min read

A split-screen illustration: on the left, a stylized judge's gavel hovering over two nearly identical documents, with a magnifying glass highlighting a specific line of text; on the right, a checklist with three items.
Key points

Key points

  1. 1A tie-breaker prompt has three parts: the decision, the evidence required for each option, and a rule that rejects any verdict without a citation.
  2. 2Forcing the model to place its rationale and source quote before the verdict improves answers because the model reasons before it commits, a structure common in prompt engineering guides.
  3. 3Every anti-pattern in this article shows up in real evaluation data: reviewers reject a majority of plausible but wrong review comments, and automated judges are known to favor length and position over correctness.
  4. 4If you cannot retrieve the cited artifact byte for byte, you have a suggestion, not a verdict.

Why a tie-breaker needs an evidence contract

Close calls are where automated judgment fails quietly. Asked to pick between two functions that look the same, or two clauses that both claim to govern the same case, a model will pick one and narrate a reason either way. The narration reads the same whether or not the model found the deciding fact.

The research on LLM judges identifies the same failure modes. Judges are sensitive to prompt phrasing, label order, response length and position, and they tend to favor their own generations, as summarized in a survey on LLM-as-a-judge. Arize's guide to LLM-as-a-judge makes the practical version of the point: a judge should receive the task input plus the reference material it needs, and its output has to be inspectable.

The code-review world has hard numbers on plausible-but-wrong. A study of CodeRabbit review-feedback pairs across 239 GitHub repositories found developers rejected 56.3% of agent-generated reviews, mostly for false alarms and out-of-scope suggestions, as reported in CRJudgeBench. A benchmark of 1,199 review-comment instances in the same paper found that even strong general-purpose models struggle to tell a technically correct comment from a plausible but invalid one. The paper's own agent, which actively gathers code evidence before judging, reached 76.60% accuracy on a 359-instance test set, ahead of a strong general-purpose baseline by 6.13 percentage points. The lesson is direct: the difference between a guess and a judgment is whether the judge went and looked.

The prompt skeleton

The skeleton below is sanitized: no company names, no domain specifics. Fill the three bracketed blocks. Keep the output contract exactly as written, because the rejection rule has to be machine-checkable.

You are resolving a close call. You do not give an opinion.

DECISION
[One sentence: choose Option A or Option B, or return "UNDECIDED".]

OPTION A: [short description]
OPTION B: [short description]

EVIDENCE RULES
1. For each option, list every piece of evidence that bears on the
   decision. For each item give: source id, exact location
   (file and line, section and clause, record id and field),
   and a verbatim quote of at most 40 words.
2. Do not paraphrase in the evidence block. Copy exactly.
3. If a fact you want to use has no source id in the context,
   you must omit it and say "not available in context".
4. If either option has zero evidence items, return UNDECIDED
   with reason "no evidence for <option>".
5. A verdict is valid only if it names at least one evidence item
   for the chosen option and at least one for the rejected option.

OUTPUT FORMAT (reasoning first, verdict last)
EVIDENCE_A: [list]
EVIDENCE_B: [list]
DISCRIMINATOR: [the single evidence item that decides it,
               and one sentence saying why]
VERDICT: [A | B | UNDECIDED]
CONFIDENCE: [0-100]

If you intend to return A or B and DISCRIMINATOR is empty,
you must return UNDECIDED instead.

Two structural choices matter. First, the reasoning fields sit before the verdict. Autoregressive models generate left to right, so asking for rationale and sources ahead of the answer makes the model think before committing rather than justify after, a pattern recommended in prompt engineering best practices. Second, the format uses named fields rather than prose. Galtea's template guidance treats explicit criteria and structured outputs as the baseline for a judge prompt.

Note that the skeleton does not ask for a citation count or a citation quality score. Both invite padding: the model adds weak items to seem thorough. One discriminator is harder to fake than five supporting quotes.

Worked example 1: two similar functions in a code review

Setup: a pull request adds a second helper, parse_amount_v2, next to an existing parse_amount. The reviewer asks the model which one should be kept.

Bad output: "Both functions look similar. parse_amount_v2 is more readable, so keep it and deprecate the other." No line, no test, no reason tied to behavior.

Good output, in the contract:

EVIDENCE_A ("parse_amount"):
  - src/money.py L41-L47: "return Decimal(raw.replace(',', ''))"
    cited by tests/test_money.py L12 test_european_thousands
  - CHANGELOG entry id=chg-2291: "parse_amount handles grouped digits"
EVIDENCE_B ("parse_amount_v2"):
  - src/money.py L88-L96: "raise ValueError('comma grouping unsupported')"
DISCRIMINATOR: tests/test_money.py L12 exercises comma-grouped input
  and passes against parse_amount only. The existing test suite is the
  deciding evidence; the readability claim is not checkable.
VERDICT: A
CONFIDENCE: 82

The test name is the discriminator, not taste. That follows the verification-first posture in Augment Code's guide to reviewing AI-generated code: the compiler, the diff and the test suite act as referee, and human review degrades past 400 lines reviewed at once, per the SmartBear and Cisco study cited there. Keeping code review honest also means treating the reviewer as its own component: the adversarial code review approach separates the agent that writes a change from the agent that certifies it, and an evidence contract is what makes that separation auditable.

If the pull request also touches manifests or lock files, add one more evidence rule: any changed dependency must be cited with the dependency review result, since that check reports added, removed and updated packages plus known vulnerabilities per GitHub's dependency review documentation.

Worked example 2: two clauses that conflict in a policy question

Setup: one clause says a refund is available within 30 days of purchase; another says a refund is available "while the subscription is active". A customer cancels on day 45 of an annual plan. The question is which clause governs.

The prompt body stays the same; only the evidence rules get a domain line: "quote clause text verbatim, and if a clause contains a precedence or supersession statement, quote that too." Then:

FieldWeak outputStrong output under the contract
Evidence for A"Section 4 supports refunds within 30 days" (paraphrase, no quote)Q: "Customers may request a refund within 30 days of purchase." (sec-4.1, verbatim)
Evidence for Bnone givenQ: "Refunds remain available while the subscription is active." (sec-4.3, verbatim)
Precedencenot checkedQ: "Where 4.1 and 4.3 conflict, 4.3 controls for subscription products." (sec-4.4, verbatim)
VerdictAB
Citation count0 verifiable3 verifiable, one of them the deciding one

The weak output is exactly what the rejection rule is for. It borrowed the authority of a section number without quoting it, so a human cannot check it. The strong output quotes all three clauses and names section 4.4 as the discriminator. If 4.4 had not existed in the context, rule 3 forces "not available in context", and the correct verdict becomes UNDECIDED with a note to retrieve the precedence clause.

Two extra rules are worth adding for policy work. Treat the scope or applicability clause as mandatory evidence; a refund clause that only applies to regulated products is not evidence for anything else. And cap the quote length, as the skeleton does at 40 words, so long clauses cannot be cited by volume.

Worked example 3: two annotators disagree on a label

Setup: an annotator labeled a support ticket "billing" and a second labeled it "account access". The model is asked to break the tie against a written label definition.

Here the evidence is not prose, it is a passage plus a rule:

EVIDENCE_A ("billing"):
  - ticket t-88421 field=body: "invoice shows two charges for March"
  - label-guide sec-2: "billing: any dispute about an amount charged"
EVIDENCE_B ("account access"):
  - ticket t-88421 field=body: "cannot log in to view the invoice"
DISCRIMINATOR: The disputed charge is the subject of the request;
  the login problem is the means by which it was noticed. Label-guide
  sec-2 matches the subject, and sec-5 ("use the subject of the
  request when symptoms and subject differ") resolves the overlap.
VERDICT: A
CONFIDENCE: 74

Notice what the model is not allowed to do: prefer the majority, prefer the first annotator, or reason from ticket length. The label guide, not the model, arbitrates. Research on models as evaluators that write and apply their own rubrics reports that scoring reliability degrades in factual and knowledge-intensive settings, and that agreement is higher within a model than across models, per GER-Eval. Supplying the guide as retrieved evidence is the practical hedge.

This example is also the cheapest place to measure the prompt. Take 50 historic ties where a senior human already ruled. Run the prompt. If the model returns A or B with an empty discriminator more than a few times, tighten rule 5 and rerun.

How to reject a verdict that cites nothing

A prompt is a request; a check is a guarantee. Separate the writer of the verdict from the code that gates its release, as this piece on forcing an LLM to cite its evidence argues: a citation guard at the exit point checks every cited identifier against the evidence store and aborts the run if any identifier was not retrieved in that run. The prompt persuades; the guard decides.

A minimal guard, runnable wherever the judge output is parsed:

import re

FIELD = re.compile(r"^EVIDENCE_(A|B):\s*(.*)$", re.M)

def first_rejection(output, valid_ids):
    ids = set(valid_ids)
    cited = set()
    has_evidence = {"A": False, "B": False}
    for label, body in FIELD.findall(output):
        if body.strip():
            has_evidence[label] = True
        cited.update(re.findall(r"\b[a-z]{2,5}-\d{2,5}(?:\.\d)?\b", body))
    if not all(has_evidence.values()):
        return "missing evidence block for one option"
    phantom = cited - ids
    if phantom:
        return "uncited source: " + ", ".join(sorted(phantom))
    disc = re.search(r"^DISCRIMINATOR:\s*(.+)$", output, re.M)
    if not disc or not disc.group(1).strip():
        return "empty discriminator"
    if "VERDICT: UNDECIDED" not in output and not cited:
        return "verdict without citation"
    return None

Run it on every candidate verdict and treat a non-None return as a hard failure, not a warning. On rejection, the fallback is UNDECIDED, and a human or a retrieval step takes over. Three practical settings:

  1. Route rejections back as a retry that must add the missing evidence, capped at one retry. After that, escalate.
  2. Log rejection reasons by type (missing block, phantom source, empty discriminator) so you can tell whether the prompt is failing or the retrieval is.
  3. Version the label guide or rubric alongside the prompt. A verdict is only reproducible against the document it cited.

The discipline behind all three is the same one Guidance on verifying agent output describes: distinguish a finding, a fix and evidence, and inspect the evidence rather than trusting the summary. Arize's evaluator guide adds the operational part: validate the judge against reviewed examples before you rely on its scores, and keep the evaluator version visible when comparing results over time.

Evidence-first judging versus a plain "which is better" prompt: a checklist

Use this table to decide whether a given tie needs the contract or a simple prompt.

ConditionPlain prompt is enoughEvidence contract required
StakesCosmetic naming, comment wordingMerge decisions, policy interpretation, training labels
ReversibilityCopied or rerun cheaplyFeeds a pipeline or a customer response
Evidence availableNo documents, no test suiteFiles with line numbers, clauses, test output
Reviewer loadOne human will read every verdictVerdicts outnumber reviewers
Audit needNoneSomeone may ask "show me" later
Failure modeWrong but harmlessPlausible but invalid, and hard to spot

If two or more cells land in the right column, write the contract. A related decision: whether to judge in one pass or pairwise. Evidently AI's guide notes that judges handle both pairwise comparison and direct scoring, and that judge quality depends on the prompt and the task. Pairwise framing is a tie-breaker's natural shape, but either way the evidence fields are what make it checkable.

One more rule for teams: if the cited evidence is retrieved by a tool, scope that tool tightly. A code review agent with broad credentials is a privileged component, and secret scanning before content reaches the model is a baseline control, as Redfox Security's build guide sets out. An evidence contract that quotes source lines also means those lines left your repository, so the retrieval boundary is part of the design.

FAQ

FAQ

Why put the evidence before the verdict instead of after?

Models generate left to right, so fields written before the verdict condition the verdict. Asking for the quote and the discriminator first makes the model commit to checkable facts before it picks a side, and it exposes a verdict that has nothing behind it before the answer is even produced.

What counts as sufficient evidence for a tie-breaker?

A source identifier that resolves in the context you supplied, an exact location such as a file and line or section and clause, and a verbatim quote. Tests count if you name the test and its result. Paraphrase does not count, and neither does a section number the model never quoted.

When should the model return UNDECIDED?

When either option has zero evidence items, when the discriminator field would be empty, or when the deciding fact is not in the context. Returning UNDECIDED is a correct outcome, not a failure: it tells you to retrieve the missing document or escalate to a human instead of shipping a guess.

How do I test whether the tie-breaker prompt is working?

Collect historic ties where a human already ruled, run the prompt on them, and score two things separately: verdict agreement with the human and citation validity. A prompt that agrees often but cites phantom sources is worse than one that agrees less and cites only artifacts you can retrieve.

Can I use one skeleton for code, policy and labeling?

Yes. The decision block, the evidence rules and the output fields stay fixed; only the definition of a valid source and the retrieval step change. Keep the rejection rule identical across domains so the same guard code can enforce it, and swap the reference document or test suite per task.

Sources

Sources

  1. A survey on LLM-as-a-judge
  2. LLM-as-a-Judge: Guide & Pre-built Evaluators
  3. CRJudgeBench: Can AI Detect Plausible but Invalid Code Reviews?
  4. Best Practices in Prompt Engineering: A Real-World Guide
  5. LLM as a Judge prompts: templates, rubrics, and best ...
  6. Reviewing AI-Generated Code: A Verification Discipline for ...
  7. Adversarial Code Review: Why the Maker Shouldn't Grade the Checker
  8. Dependency review - GitHub Docs
  9. LLMs Designing and Applying Evaluation Rubrics
  10. Forcing an LLM to Cite Its Evidence - by Jose Ruiz-Vazquez
  11. Best AI Code Review Tools in 2026 | Early
  12. LLM-as-a-judge: a complete guide to using LLMs for ...
  13. Building a Secure AI-Powered Code Review Agent: Guide
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles