Skip to content

[NOOK-176] OCR 장소 후보 추출 상한 확대 - #116

Merged
dh1010a merged 2 commits into
mainfrom
codex/NOOK-176-ocr-candidate-recall-main
Aug 13, 2026
Merged

[NOOK-176] OCR 장소 후보 추출 상한 확대#116
dh1010a merged 2 commits into
mainfrom
codex/NOOK-176-ocr-candidate-recall-main

Conversation

@dh1010a

@dh1010a dh1010a commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

목적

OCR transcript에 다수의 장소명이 포함된 게시물에서 장소 clue 추출 단계의 개수 제한 때문에 후보가 과도하게 탈락하지 않도록 개선합니다.

변경 내용

  • 장소 clue 반환 상한을 20개에서 60개로 확대
  • 본문 기대 장소 수 인식 상한을 20개에서 80개로 확대해 52곳 같은 게시물을 OCR fallback/recovery 판단에 반영
  • OpenAI structured output schema의 place maxItems를 60개로 확대
  • OpenAI place clue 출력 토큰 한도 상향
    • text clue: 800 → 2500
    • image transcript clue: 4000 → 12000
    • content inference: 3000 → 8000
  • 프롬프트의 “최대 20개 가게” 문구를 “최대 60개 가게”로 갱신
  • 회귀 테스트 추가
    • 20개 초과 image place clue 처리
    • 52곳 본문에서 text result가 부족하면 OCR fallback 수행

검증

  • ./gradlew :nook-api-application:test --tests org.every.nook.api.application.place.ProcessPlaceParsingJobUseCaseTest
  • ./gradlew :nook-api-infrastructure:test --tests org.every.nook.api.infrastructure.openai.OpenAiContentInferenceAdapterTest
  • ./gradlew clean check

참고

  • develop에는 동일 변경을 0c6e492로 반영했고 push 완료했습니다.
  • main PR 브랜치는 origin/main 기준으로 NOOK-176 변경만 cherry-pick했습니다.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84d716fafd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

val eventLogger = LoggerFactory.getLogger(ProcessPlaceParsingJobUseCase::class.java)

const val MAX_PLACE_COUNT = 20
const val MAX_PLACE_COUNT = 60

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the processing lease valid for the enlarged workload

When a post now yields dozens of clues, resolveClues can perform up to four sequential provider searches plus candidate selection per clue, so processing can exceed the default one-minute lease. The presentation worker still dispatches outstanding jobs every 10 seconds, while PlaceParsingPersistenceAdapter.findOutstanding marks a PROCESSING job available solely from its last updatedAt; there is no heartbeat during resolution. A second worker can therefore reclaim the same high-count job while the first is still running, causing duplicate provider work and competing complete transactions that can hit post_places uniqueness constraints or overwrite the job status. Increase/renew the lease or otherwise prevent reclamation while processing the newly supported workload.

Useful? React with 👍 / 👎.

@dh1010a
dh1010a merged commit 8a319c6 into main Aug 13, 2026
2 checks passed
@dh1010a
dh1010a deleted the codex/NOOK-176-ocr-candidate-recall-main branch August 13, 2026 16:31
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