Skip to content

fix(leads): count the ask as grounding, not as a fabrication to reject - #148

Merged
ralyodio merged 1 commit into
masterfrom
fix/grounding-set
Jul 28, 2026
Merged

ralyodio merged 1 commit into
masterfrom
fix/grounding-set

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

A live campaign rejected every draft it produced — five per tick, for hours:

cto-usa.com: links to https://threatcrush.com/get-whitepaper,
             which is not in the campaign's declared facts

Its pitch_ask reads "download our free whitepaper at https://threatcrush.com/get-whitepaper". The model included that URL exactly as instructed. The guard compared the body against pitch_facts alone — which held only a 30-years-experience line — and scored following the instruction as an invented link.

The grounding set was wrong, not the drafts

Everything the operator authored is grounded: the intro says who is writing, the ask says what to ask for. An ask naming a URL is an instruction to include it. Checking output against a subset of the instructions makes correct output unrepresentable.

Now checks against facts + intro + ask.

Still refuses what it exists to refuse

A link or number appearing nowhere the operator wrote is still rejected. Both cases are tested with the real campaign's values:

  • accepts threatcrush.com/get-whitepaper (named in the ask)
  • rejects not-ours.test/landing (named nowhere)
  • accepts "30 years" (in the facts)
  • rejects "450 customers" (invented)

Plus a regression test pinning the old behaviour as the bug.

Checks

  • tsc --noEmit clean
  • 938/938 tests pass, 5 new
  • production build compiles

🤖 Generated with Claude Code

A live campaign rejected every draft it produced, five per tick, for
hours. Its ask read "download our free whitepaper at
https://threatcrush.com/get-whitepaper"; the model included that URL
exactly as instructed, and the guard compared the body against the facts
list alone and scored following the instruction as an invented link.

The grounding set was wrong, not the drafts. Everything the operator
authored is grounded — the intro says who is writing, the ask says what
to ask for, and an ask naming a URL is an instruction to include it.
Checking output against a subset of the instructions makes correct output
unrepresentable.

Kept: a link or number appearing nowhere the operator wrote is still
refused, which is the case the guard exists for.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit 209d2c4 into master Jul 28, 2026
8 checks passed
@ralyodio
ralyodio deleted the fix/grounding-set branch July 28, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant