Skip to content

[NOOK-191] 게시물 상세 위치 기반 장소 매칭 정확도 개선 - #124

Merged
dh1010a merged 6 commits into
mainfrom
codex/NOOK-191
Aug 16, 2026
Merged

[NOOK-191] 게시물 상세 위치 기반 장소 매칭 정확도 개선#124
dh1010a merged 6 commits into
mainfrom
codex/NOOK-191

Conversation

@dh1010a

@dh1010a dh1010a commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

목적

Instagram 원문과 이미지에 명시된 층·호 상세 위치가 장소 추론 과정에서 유실되어 같은 건물의 다른 장소가 연결되는 문제를 수정합니다.

범위

  • PlaceClue.addressHint에 상세 주소를 보존하고 OpenAI 응답 스키마에 반영
  • 상세 주소 검색을 우선하고 지역·상호 별칭 검색을 보완
  • 도로명·건물 번호 및 층·호가 충돌하는 후보 제외
  • 주소가 같아도 상호 근거가 없는 다른 매장 제외
  • 카카오·네이버에서 같은 장소를 찾은 경우 상세 주소가 있는 후보 하나로 병합
  • 상세 주소 및 동일 건물 회귀 테스트 추가

제외 범위

  • 지도 provider 교체
  • 장소·게시물 공개 API 변경
  • DB 스키마 변경
  • 기존 저장 게시물 전체 재파싱

검증

  • ./gradlew check 통과
  • dev 배포 및 /actuator/health 상태 UP 확인
  • 재현 URL 2건의 기존 게시물·스크래핑 캐시 삭제 후 API로 재생성
  • DbS1IcrmtNO: 라벤다, 파티오피즈, 도원, 마타사 효창 4곳 정확히 연결
  • DbsiY69mbHC: 하이웨이빈티지(삼일대로 301 8층), bwt, 옴oum 연결
  • 기존 오연결 후보(다른 주소의 도원, 고은손카드, 세보가) 0건 확인
  • source post와 user saved post의 장소 연결 건수 일치 확인

@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: 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")

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 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 👍 / 👎.

Comment on lines +9 to +12
hintAddressKeys.isNotEmpty() &&
candidateAddressKeys.isNotEmpty() &&
hintAddressKeys.intersect(candidateAddressKeys).isEmpty()
) {

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 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 👍 / 👎.

@dh1010a
dh1010a merged commit 479fb11 into main Aug 16, 2026
2 checks passed
@dh1010a
dh1010a deleted the codex/NOOK-191 branch August 16, 2026 13:45
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