feat: support multi-place extraction and selection#9
Merged
Conversation
1000hyehyang
approved these changes
May 2, 2026
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.
✨ 무엇을 바꿨나요?
LLM 장소 추출 결과를 단일 대표 장소 중심에서 다중 장소 배열 중심으로 확장했습니다.
각 extracted place별로 Kakao Local enrichment를 수행하고, 매칭 성공한 장소들을
selected_places로 저장 및 API 응답에 포함하도록 변경했습니다.🔗 관련 이슈
Closes #8
💡 왜 바꿨나요?
인스타그램 caption 하나에 여러 장소가 번호 목록이나 브랜드 정보 형태로 포함되는 경우가 많지만, 기존 구조는 첫 번째 장소만 대표값으로 다루고 있었습니다.
다중 장소 caption에서도 모든 장소를 추출하고 Kakao 검색 결과를 저장할 수 있도록 파이프라인과 DB/API schema를 확장했습니다.
📝 주요 변경 사항
extraction_result.places에 전체 extracted place 목록 저장store_name,address,certainty등은 첫 번째 장소 기준 legacy 대표값으로 유지selected_placesJSONB 컬럼 추가 migration 작성selected_places추가, 기존selected_place는 legacy 대표값으로 유지👀 리뷰어가 보면 좋은 부분
ExtractionResult.places와 legacy 대표 필드 간 호환성 유지 방식extraction_result.places에는 남기고place_candidates/selected_places에는 제외하는 처리selected_place가 다중 결과 중 caption 등장 순서 기준 첫 번째 selected place로 유지되는지003_add_selected_places_to_job_results.sqlmigration 내용RUN_LIVE_HF_KAKAO_TESTS=1일 때만 외부 HF/Kakao API를 호출하는 구조🧪 테스트
방식 (해당하는 것만 체크)
메모 (시나리오, 커맨드, 스크린샷 링크 등 — 선택)
.\.venv\Scripts\python.exe -m pytest -q57 passed, 1 skipped$env:RUN_LIVE_HF_KAKAO_TESTS='1'; .\.venv\Scripts\python.exe -m pytest tests/test_hf_kakao_pipeline_live.py -q -s1 passed플루밍,누크녹,예챠,라뚜셩트,코이크,카페토요모두 추출 및 Kakao selected 확인커먼맨션추출 및 Kakao selected 확인