Apply to my task
arXiv:2607.06636 ★ 92 Jul 7, 2026

Specification Grounding: Explicit Criteria Instead of "Check for Errors"

Key result

Here's the paradox: you ask the model to 'find problems' — and it invents ones that don't exist about a third of the time. Without explicit rules, the model doesn't know exactly what the author missed — so it guesses. And it guesses wrong nearly 33% of the time. The Specification Grounding method lets you check any material so that no real violation slips through — and with zero false alarms. The trick: instead of 'find problems,' say 'here's a list of N rules — check each one in turn.' The model stops guessing and works through a checklist instead — 33% false alarms drop to zero, while real misses shrink several times over.

01

TL;DR

When you ask an LLM to review something, the outcome hinges on one thing: does the model have an explicit list of requirements, or is it hunting for problems "by eye"? Giving the model a concrete list of rules and asking it to check each one individually isn't just better — it's an order of magnitude better. This works anywhere there are evaluation criteria: code, documents, plans, texts.

The core finding — a model told to "check for edge cases" without explicit rules catches only part of the problems. Not because it's lazy, but because it doesn't know what exactly the author forgot. It guesses — and guesses right about half the time. Worst of all, the misses happen precisely where the author themselves forgot something: non-obvious cases that nobody spelled out explicitly.

The fix is simple: instead of "find the problems," say "here's a list of N specific requirements, check each one in turn." The content of the specification is what does all the work. Even a plain paragraph of requirements beats an elaborate "think about edge cases" instruction. And a structured checklist is an order of magnitude more effective than a paragraph.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: Build a specification -> an explicit list of requirements (N rules)
        Can be a separate request: "Give me a list of criteria for [task]"

STEP 2: Feed the model the spec + the material to review
        -> For each rule: find a violation or confirm compliance
        -> Output: specific violations with the rule they broke

STEP 3: Fix the material based on the violations found
        -> Targeted edits only, don't rewrite everything from scratch

Steps 1 and 2 can be merged into one request if the criteria are already known. If not, get the criteria list first, then run the check.

03

Example in Action

Task: You wrote a sales proposal for a major client worth $50,000. You want to review it before sending — you don't want to hear "looks good overall," you want to know exactly what's wrong.

Prompt:

You are an experienced sales manager who reviews sales proposals before they go out to a client.

Here's a list of requirements for a strong proposal:
1. The client's pain point is clearly stated — not our product, but their problem
2. A concrete, measurable outcome (numbers, timelines, units)
3. Explains WHY us specifically, not competitors
4. Transparent pricing structure — the client understands what they're paying for
5. A specific next step with a deadline
6. No corporate jargon ("leverage," "synergy," "utilize," "in scope of")
7. Length — no more than one page

Check my proposal against each of these 7 rules, one at a time. For each rule: status (✅ met / ⚠️ partial / ❌ violated) and a specific explanation of what exactly is wrong.

Here's the proposal:
[proposal text]

Result:
The model walks through each of the 7 rules separately. For each one — a status and specifics: not "the outcome section feels weak," but "rule 2 is missing numbers — it says 'we'll improve efficiency' but doesn't specify by what percentage or over what timeframe." At the end — a list of exactly the spots that need rewriting, each tied to a rule.

04

Why This Works

An LLM without explicit criteria is like an editor told to "just check the text." It'll check whatever it itself considers important. If the author forgot to include a price, the editor might skip that, because in their mental model a price is "usually there." The model doesn't know what the author actually left out — it's not a mind reader.

When you give it an explicit list of rules, something different happens: each rule becomes its own separate check request. The model isn't choosing what to check — it's checking everything. A non-obvious case ("what if the client submits an empty string?") becomes explicit ("rule 4: handling empty input"). The model can't skip it.

Prompt control levers: - Number of rules → 5–10 is the sweet spot. Fewer, and you'll miss something important. More than 15, and the model starts paying less attention to each one - Rule specificity → the more concrete the wording ("numbers and timelines" instead of "specifics"), the more precise the check - Output format → add "output only the violations" for a quick result, or "output everything with explanations" for a full audit - Source of rules → rules can come from a standard, a methodology, a client checklist — and they're already explicit criteria

05

Prompt Template

Check {what we're reviewing} against the following list of requirements.

Requirements:
1. {requirement_1}
2. {requirement_2}
3. {requirement_3}
[... all requirements]

For each requirement, in turn:
- Status: ✅ met / ⚠️ partial / ❌ violated
- Specific explanation: what exactly is wrong (if not met)
- A quote from the material demonstrating the issue (if applicable)

At the end — a short list of edits: what exactly to rewrite and how.

Here's the material to review:
{text / plan / document}

Placeholders: - {what we're reviewing} — "sales proposal," "product spec," "article," "business plan" - {requirement_N} — specific criteria for your task (you can ask the LLM to generate the list first) - {text / plan / document} — the actual material to review


🚀 Quick Start — paste into the chat:

Here's the Specification Grounding template — checking material against an explicit list of criteria.
Adapt it to my task: [your task].
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask what material you're reviewing and whether you have criteria — because without a list of requirements, the method won't run. If you don't have criteria, it will first offer to generate some for your task, then apply the review template.

06

Limitations

⚠️ Algorithmic logic: The method helps wherever there's a specification — clear requirements for behavior. For tasks where the main difficulty is the algorithm itself ("figure out how to optimize...") rather than rule compliance, the effect is minimal or absent.

⚠️ Spec quality: If the rules are incomplete or vague, the result is the same as having none. "The text should be good" is not a rule. "Each paragraph starts with a thesis explained in the following sentences" is a rule.

⚠️ False alarms without a spec: Without explicit rules, LLMs not only miss real problems but also flag nonexistent ones more often. In the study — 33% false-alarm rate for "check the edges" versus 0% for rule-based checking. Rules give the model an anchor: "this violates rule N" instead of a subjective judgment call.

⚠️ Subjective criteria: If the rules describe taste or style ("the text should feel alive"), the model will be less accurate than with objective criteria.

07

How It Was Studied

A team from TD Bank ran an elegant experiment: one variable, everything else fixed. They took 18 tasks involving writing small Python functions. Each function was generated by an LLM — and it almost always handled ordinary cases correctly but forgot the edge cases. They then ran two review approaches on the exact same code: FREE+ ("check for edge cases") and SPEC (same reviewer, same model, same test budget — but with explicit rules). Correctness was determined by an independent "gold" test suite the model never saw.

What was surprising: doubling the number of tests produced almost nothing (+4 pp). Combining 8 independent "check the edges" runs still fell short of a single pass through the rules. The researchers expected quantity to help — it didn't. Only the content of the specification helped.

They also checked whether it was about format rather than content. They gave the model the spec as a single connected paragraph (not a list) — it still found 27 out of 30 issues. They gave it only the task plan with no spec — 2 out of 30. That answers the "why": the model doesn't infer what the author left out. It needs to be told explicitly.

The effect held up across three model families (Claude, GPT, Gemini) and on tasks whose specs were drawn from public standards (RFC, CSS, ISO) — meaning the researchers couldn't "stack the deck" for the method by inventing convenient rules.

08

Original from the Paper

SPEC arm prompt structure (from paper §3.3):
- Receives: the prose ticket + the specification enumerated into K discrete rules
- Task: write one test per rule
- Expected value: computed from the ticket/rules, never from the candidate code

FREE+ arm prompt structure (fair baseline):
- Receives: only the ticket
- Additional instruction: "cover invalid inputs and edge cases"  
- Same K tests, same tester model, same repair loop

Key ablation results (§4.2):
- Plan only (task decomposition, no spec): 2/30 bugs caught
- Spec as plain paragraph: 27/30 bugs caught  
- Spec as enumerated checklist (one test per rule): 30/30 bugs caught

Context: The researchers lay out the exact prompt structures for two comparisons — SPEC and FREE+. The difference between them is exactly one line: the presence of a specification-as-checklist. The ablation shows that it's not the format (list vs. paragraph) but the content of the spec that carries 90% of the effect.

09

Adaptations and Extrapolations

1. Adaptation: generating the spec before reviewing

If you don't have rules — ask the LLM to come up with them first, then apply the method.

💡 Two-step SPEC:

Step 1:

I want to review {what we're reviewing} before finalizing it.
Draft a list of 7-10 specific, checkable quality criteria for {type of material}.
Each criterion should be objective: answerable with YES or NO.

Step 2: use the resulting list in the main review template.


2. Technique: "SPEC for the other side"

🔧 Use the client's/audience's requirements as the spec → review from their point of view

Instead of your own criteria — the other party's explicit objections or requirements:

Here's a list of typical investor objections at a pitch session:
1. Market is too small — less than $100 million
2. No defense against a big player copying it (Google, Amazon)
3. Unit economics don't hold up at scale
4. Team has no experience in this industry
5. Dependent on a single customer-acquisition channel

Check my pitch against each objection. For each one: is it addressed in the pitch, and how convincingly?

3. Extrapolation: SPEC + iterative improvement

Standard SPEC gives you a review and a list of edits. You can add a repair loop:

[SPEC review prompt]

After reviewing: fix every item marked ❌ and ⚠️.
Output the corrected version and a list of changes.
Then go through the requirements list again — confirm every ❌ became a ✅.

This mirrors the repair loop from the study — just in a single conversation. The LLM first finds violations, then fixes them, then double-checks itself.

10

Resources

Paper: "Specification Grounding Drives Test Effectiveness for LLM Code"
Authors: Amin Haeri, Mahdi Ghelichi — Model Development Innovation, TD Bank, Toronto, Canada
Contact: [email protected], [email protected]

Related work cited in the paper: - AlphaCodium (Ridnik et al., 2024) — iterative code generation with tests - Self-Refine (Madaan et al., 2023) — LLM self-correction - Reflexion (Shinn et al., 2023) — feedback-based iteration - EvalPlus (Liu et al., 2023) — extended test suites for code evaluation - TiCoder (Lahiri et al., 2022) — formalizing intent through human-in-the-loop tests

Research digest

Key result

Here's the paradox: you ask the model to 'find problems' — and it invents ones that don't exist about a third of the time. Without explicit rules, the model doesn't know exactly what the author missed — so it guesses. And it guesses wrong nearly 33% of the time. The Specification Grounding method lets you check any material so that no real violation slips through — and with zero false alarms. The trick: instead of 'find problems,' say 'here's a list of N rules — check each one in turn.' The model stops guessing and works through a checklist instead — 33% false alarms drop to zero, while real misses shrink several times over.

Principle

A standard 'check for errors' request asks the model to decide WHAT to check. It picks whatever it thinks is important. If the author forgot to specify an edge case, the model doesn't see that gap — its picture of 'what's normally there' doesn't match what was specifically forgotten here. Specification Grounding turns one vague review request into N separate ones — one per rule. The model doesn't choose — it works through a list. A non-obvious case ('what if the input is an empty string?') becomes explicit ('rule 4: handling empty input'). It's impossible to skip. A structured list works better than a paragraph with the same requirements — each item stands on its own and doesn't get lost among its neighbors.

Why it works

A model without criteria is like an editor told 'take a look at this text.' It looks at whatever it considers important. The problem is that its picture of 'what's usually there' doesn't match what was specifically left out this time. With an explicit list, every violation is tied to a specific rule — not to a subjective judgment. This eliminates two problems at once: missed issues (there's a rule, so there's a check) and false alarms (no rule, no signal). Without an anchor, the model flags 'problems' that don't exist. With a rule, there's either a violation or there isn't.

When to apply

Use this anywhere there are evaluation criteria → checking code against standards, auditing contracts and documents, evaluating business proposals, reviewing articles against an editorial policy — especially when you need more than 'looks good overall' and want to know exactly what's wrong. It doesn't fit tasks where the main challenge is coming up with an algorithm ('how to optimize search'), rather than checking compliance with already-known rules. Specification won't help there.

Mini recipe

1. Build a list of rules: Use concrete wording — not 'good text,' but 'every paragraph opens with a thesis that gets explained afterward.' No ready-made rules? Ask the model: `Give me a list of criteria for reviewing [type of material]` 2. Pass the material and rules together: Show what's being checked and the full list. 5–10 rules is optimal. Beyond 15, attention to each one starts to drop. 3. Ask for a rule-by-rule check: For each rule — a status (met / partially met / violated) and a specific quote from the material that illustrates the issue. 4. Tailor the output format to the task: Want speed? Add `output only the violations`. Want a full audit? Add `output everything with explanations and quotes`.

Examples

[BAD]: `Check this spec for any problems` [GOOD]: `Check this spec against these 6 rules: 1. Every function has a clear acceptance criterion 2. No vague requirements like 'fast' without numbers 3. Error handling is described for every scenario 4. Dependencies between modules are specified 5. Deadlines are tied to specific milestones 6. There's a section covering limitations and exceptions For each rule — a status (met / partially met / violated) and a quote from the spec that confirms or refutes it. [spec text]`

In plain words

When you ask a model to check your code or text for errors, it acts like a lazy intern: it glances at the surface and hands back a verdict of "looks fine, I guess." The problem is that without clear boundaries, the model falls back on its own internal hallucinations about what "good" even means. The Specification Grounding study proves that review accuracy skyrockets only when you literally shove a checklist under the model's nose. Without a hard list of criteria, the AI just ignores half the flaws, because in its "head" they don't register as critical.

It's like showing up to inspect a newly built apartment without a checklist. You'd glance at the smooth wallpaper and declare everything great, only to discover a week later that the outlets don't work and the ventilation duct dead-ends into a closet. Specification Grounding is that exact checklist in the hands of a professional inspector. When the model has a line item that says "check for proper grounding on the outlets," it goes and checks exactly that, instead of just admiring the wall color. Without an explicit list of requirements, any review turns into a guessing game — one you always lose.

The core of the method is dead simple: give the model concrete specifications and force it to run the object through each one individually. Instead of a vague "review this code," hand it a list: "1. Is error handling in place? 2. Are memory limits respected? 3. Do variable names follow the standard?" The model then has to report on each point separately. The numbers speak for themselves: this approach makes tests an order of magnitude more effective, turning a useless "looks good" into a detailed audit that actually catches bugs.

The researchers tortured this method with code specifically, but the principle is universal. It works for legal contracts, marketing strategies, and even vacation plans. If you ask ChatGPT to evaluate your sales pitch, don't expect a miracle from a vague prompt. Give it a list of conditions instead: "check whether deadlines are stated, whether there's a call to action, and whether we're groveling to the client too much." That's the only way to get real feedback instead of a polite brush-off that ends up costing you the deal.

Bottom line: stop hoping the model's "intelligence" will save you — it's not a mind reader and has no clue what your standards are. Either you give it explicit evaluation criteria, or you get a result that's technically correct but practically useless. If you want AI actually working for you instead of just putting on a show of activity, bake Specification Grounding into every prompt. Without clear rules, any review is just burning tokens and time.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on Specification Grounding: Explicit Criteria Instead of "Check for Errors" arXiv:2607.06636

Sign in to apply this study New accounts get 50 free credits.