[NOOK-191] 게시물 상세 위치 기반 장소 매칭 정확도 개선 - #124
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82eb44f3f3
ℹ️ 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".
| groundedMatches: List<PlaceCandidateSelector.Candidate>, | ||
| ): CandidateSelection? = when { | ||
| strictMatches.size == 1 -> CandidateSelection(strictMatches.single().place, "strict_match") | ||
| groundedMatches.size == 1 -> CandidateSelection(groundedMatches.single().place, "grounded_match") |
There was a problem hiding this comment.
Do not auto-select an ungrounded sole candidate
When a text clue has neither addressHint nor image evidence, PlaceClue.isSupportedBy returns true for every candidate because evidence.isEmpty(). If search returns exactly one non-strict result—even an unrelated fuzzy result—this branch now selects it as a grounded_match without invoking the candidate selector, whereas the previous flow allowed the selector to reject it. Limit this shortcut to candidates with actual identity, address, or evidence support.
Useful? React with 👍 / 👎.
| hintAddressKeys.isNotEmpty() && | ||
| candidateAddressKeys.isNotEmpty() && | ||
| hintAddressKeys.intersect(candidateAddressKeys).isEmpty() | ||
| ) { |
There was a problem hiding this comment.
Allow equivalent road and lot-number addresses
When addressHint is a lot-number address such as 서울 마포구 상수동 354-12 지하 1층 201호 but the provider returns the same place's road address, both key sets are nonempty and disjoint, so the real candidate is rejected. This is especially likely because both KakaoPlaceMapper and NaverPlaceMapper prefer the road address whenever one is available. Only hard-reject addresses expressed in comparable forms, or retain/provider-map both road and lot-number forms for equivalence checking.
Useful? React with 👍 / 👎.
목적
Instagram 원문과 이미지에 명시된 층·호 상세 위치가 장소 추론 과정에서 유실되어 같은 건물의 다른 장소가 연결되는 문제를 수정합니다.
범위
PlaceClue.addressHint에 상세 주소를 보존하고 OpenAI 응답 스키마에 반영제외 범위
검증
./gradlew check통과/actuator/health상태UP확인DbS1IcrmtNO: 라벤다, 파티오피즈, 도원, 마타사 효창 4곳 정확히 연결DbsiY69mbHC: 하이웨이빈티지(삼일대로 301 8층), bwt, 옴oum 연결