Add design/screenshot probe type (render + visual judge)#12
Merged
Conversation
Probes marked 'scoring: screenshot' now render the candidate model's HTML output headlessly to a PNG and grade the rendered image with a multimodal judge, instead of grading source text. Text probes are unchanged. - common.sh: scoring_for_probe, b64_file, render_html (MODELFIT_RENDER_CMD override -> Playwright CLI -> Chromium/Chrome, falling through on failure; MODELFIT_RENDER_VIEWPORT) - run.sh: screenshot probes write result.html, render to result.png, record rendered:true; render failure -> render_error (honest coverage gap) - judge.sh: multimodal judge (anthropic image / openai image_url) built via jq --rawfile; body sent over stdin (--data @-) to dodge the 128KB single-arg limit on base64 images; falls back to text-only when no PNG - bin/render.sh + 'modelfit render' dispatch - probes/example-design.md, prompts + README + limitations docs - tests/design.test.sh (mock renderer + provider, zero browser/network); tests/curl mock reads --data @-; selftest covers the new paths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a first-class
scoring: screenshotprobe type so modelfit can benchmark models on UI/design work. The candidate model returns a self-contained HTML artifact, modelfit renders it headlessly to a PNG, and a multimodal judge grades the rendered image against the rubric. Text probes are unchanged (fully backward compatible).Flow
Changes
common.sh:scoring_for_probe,b64_file,render_html(MODELFIT_RENDER_CMDoverride -> Playwright CLI -> Chromium/Chrome, falling through on failure;MODELFIT_RENDER_VIEWPORT)run.sh: screenshot probes writeresult.html, render toresult.png, recordrendered:true; render failure ->render_errorjudge.sh: multimodal judge (anthropic image / openai image_url) viajq --rawfile; body streamed over stdin (--data @-) to avoid the 128KB single-arg limit on base64 images; text-only fallback when no PNGbin/render.sh+modelfit renderdispatchprobes/example-design.md, prompt/README/limitations docstests/design.test.sh(mock renderer + provider, zero browser/network); mocktests/curlreads--data @-; selftest covers the new pathsVerification
./bin/selftest.shPASS,shellcheckCLEAN