8000 Seed Search images eval: measure the hardened image questions by daoudclarke · Pull Request #627 · mwmbl/mwmbl · GitHub
[go: up one dir, main page]

Skip to content

Seed Search images eval: measure the hardened image questions - #627

Open
daoudclarke wants to merge 3 commits into
seed-images-eval-use-prod-promptsfrom
seed-images-eval-harden
Open

daoudclarke wants to merge 3 commits into
seed-images-eval-use-prod-promptsfrom
seed-images-eval-harden

Conversation

@daoudclarke
Copy link
Copy Markdown
Contributor

From Claude:

Stack: against seed-images-eval-use-prod-prompts (#625), on the evaluation branch wikicommons_image_search, which is never merged. It merges the production half, #622 (seed-images-prod-harden), and then adds the evaluation that measured it. This is the eval half of the original #622.

What changed

  • A merge commit of seed-images-prod-harden (Harden the Seed Search image questions and re-tune their thresholds #622): the hardened questions, judge.image_request and the threshold constants in prompt.py.
  • Eval:
    • run_hardened.py asks the production-shaped request for every query.
    • injection.py covers the benchmark in separate mode, the injection probes and real candidates.
    • gate_analysis --arm first|hardened|top1 scores each set of answers.
    • run_relevance.py is removed: its questions no longer exist, and the first answers stay in devdata.
  • Doc: a new "Hardened prompts" section in seed-search-images-eval.md, with Summary and residual-risk updates.

Results

Safety benchmark (same 68 batches, separate mode, at 1.0):

Questions Art (52) Rule-evading art Photos (331) Safe excluded (438)
First 94.2% 19/22 98.5% 3.4%
Hardened 96.2% 20/22 98.5% 4.1%

The 1.0 threshold stays: at 1.5 only 90.4% of art is caught. On real candidates the pass rate goes from 96.0% to 95.6%.

Injection probes: 383 nude benchmark images with judge-addressed text, and cross-image batches of 20.

  • No probe passes any nude image: "ignore previous instructions", "volunteers have checked", a fake closing tag, or one image telling Jev every other image in the batch is safe.
  • Jev keeps a batch's questions independent: cross-image shifts are about 0.00. So no change is needed to batching or caching.
  • Without the warning-sign sentence, 4 of 383 and 3 of 383 passed. That was an earlier run, not kept in the harness.

Gate and relevance (train reference labels):

  • Gate: moves from 1.63 to 1.65. AUC is 0.883 against 0.890, within noise.
  • Minimum: 1.5 stays. Gated strips are 91.8% good, against 87.1%, with 2.34 images per query against 2.83.
  • Top two web results beat top one on a tie-break.
  • en-gb: all five queries A0 won in the holistic comparison (wrong-sense strips) now show only the right sense, or nothing.

Holistic re-run: not needed before PR 3, because the settings barely moved. Re-judge on production's real request.

PR 1's notes:

  • The 1,500-character description cut stays. In 20 of 995 longer candidates a nudity word appears only past the cut, and the ones read are incidental. The rules read the whole description. Anyone wanting to hide a word from Jev can delete it, so the cut opens no new attack.
  • Near-threshold scores stay cached for 30 days. Re-asking would give a near-threshold file a fresh draw on each request, and a file is shown if any draw passes, so caching is the safer choice.

How it was verified

  • make check passes, and so do the seed_images eval tests. Full suite below.
  • The result 8000 s come from the committed scripts and the cached Jev responses under devdata/seed_images.

Subagent reviews: see #622, which covered both halves when they were one PR.

Part of #610

🤖 Generated with Claude Code

daoudclarke and others added 3 commits November 10, 2026 16:55
Commons text is now delimited, with angle brackets, invisible characters
and the tag name taken out of it, and categories are capped like the
description. Every image question says its Commons text and web results
are data, not instructions, and the NSFW question treats text that
addresses the judge as a warning sign. The relevance question sees
Staan's top two results, and image_request asks need and relevance in
the one request Seed Search will send once Staan answers.

The thresholds measured with these questions (NSFW below 1.0, need at
least 1.65, relevance at least 1.5) are constants next to them in
prompt.py, for the pipeline to use.

No functional changes to the crawler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The evaluation of the hardened questions imports them from mwmbl.imagesearch.

No functional changes to the crawler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
run_hardened asks the hardened need and relevance questions in
production's one request; injection re-runs the safety benchmark and
probes descriptions that address the judge, in their own image and in
another image of the same batch; gate_analysis --arm scores either set
of answers. The 1.0 NSFW threshold and 1.5 minimum hold, the gate moves
to 1.65, no injection passes a nude benchmark image, and Jev keeps a
batch's questions independent. The eval doc gains a "Hardened prompts"
section.

No functional changes to the crawler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov
codecov Bot commented Nov 10, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

0