Skip to content

Align image eval OCR text with flyer prompt - #3000

Open
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/imagegen-ocr-required-text
Open

Align image eval OCR text with flyer prompt#3000
sylvesterkaczmarek wants to merge 1 commit into
openai:mainfrom
sylvesterkaczmarek:fix/imagegen-ocr-required-text

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

  • Align the coffee-flyer OCR oracle with the exact text required by COFFEE_PROMPT.
  • Replace the two punctuation variants in REQUIRED_TEXT with the prompt's literal hyphenated strings.

Motivation

The prompt explicitly requires these exact lines:

  • 20% OFF - Mon-Thu
  • 123 Market St - 7am-6pm

But the OCR check currently expects bullet separators and en-dashes instead. Because add_ocr_text_check() compares extracted lines by exact set equality, a flyer that follows the generation prompt perfectly can still be marked as missing the expected OCR text and containing extra text.

The oracle should use the same literal strings as the task it is grading.

Validation

This changes only two entries in REQUIRED_TEXT:

  • prompt-compliant text now matches the OCR oracle exactly
  • OCR set-comparison logic is unchanged
  • model, judge, image generation, and reporting behavior are unchanged

Self-review

  • Two-line correctness fix in one file.
  • No API, dependency, notebook, registry, or documentation changes.
  • Searched open PRs for an existing OCR required-text fix and found none.

Maintainers may modify the branch if needed.

@sylvesterkaczmarek
sylvesterkaczmarek requested a review from a team as a code owner August 21, 2026 13:42
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