Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ private List<AiSearchResponse.Match> applyConfidenceGate(

/**
* 검색 결과 LLM 관련도 재판정(4번째 신호). 문장형 질의에 포함된 고유명사처럼 재작성·문자열
* 검색·재정렬 세 신호 모두의 사각지대를(예: "싸피 다녔던 헬스장"에서 본문에 "싸피"가 그대로
* 있는 기록이 벡터 유사도만으로는 밀리는 경우) 이 신호가 메운다. 신호는 {@code matches}·
* 검색·재정렬 세 신호 모두의 사각지대를(예: "부트캠프 다녔던 헬스장"에서 본문에 "부트캠프"가
* 그대로 있는 기록이 벡터 유사도만으로는 밀리는 경우) 이 신호가 메운다. 신호는 {@code matches}·
* {@code verified}·{@code matchedContexts}가 전부 갖춰진 뒤 마지막에 붙는다 — 그래야
* <b>3신호 병합까지 끝난 진짜 최종 후보</b>를 LLM이 본다.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

/**
* 검색 결과 LLM 관련도 재판정(4번째 신호)의 계약을 고정한다. 배포 후 사용자가 보고한 실사례
* ("싸피 다녔던 헬스장" 질의에서 본문에 "싸피"가 있는 기록이 없는 기록보다 낮은 순위로 나온 것)를
* 이 신호가 교정한다는 것이 목적이다.
* ("부트캠프 다녔던 헬스장" 질의에서 본문에 "부트캠프"가 있는 기록이 없는 기록보다 낮은 순위로
* 나온 것)를 이 신호가 교정한다는 것이 목적이다.
*
* <p>이 클래스는 플래그를 <b>켠</b> 컨텍스트에서 돈다. 기본값(끔)에서 현행과 동일하다는 계약은
* {@link RecordSearchApiTests}가 기본값 컨텍스트에서 고정한다.
Expand Down Expand Up @@ -81,7 +81,7 @@ static void stopStub() {
}

/**
* 사용자 보고 실사례와 같은 모양이다 — 벡터 유사도로는 뒤진 기록("싸피"가 본문에 그대로
* 사용자 보고 실사례와 같은 모양이다 — 벡터 유사도로는 뒤진 기록("부트캠프"가 본문에 그대로
* 있는 쪽)이 판정에서 {@code VERY_RELEVANT}를 받아 1위로 올라온다.
*/
@Test
Expand All @@ -90,15 +90,15 @@ void veryRelevantJudgmentOutranksAHigherSimilarityMatch() throws Exception {
long higherSimilarity = newRecord(me, "judge-a", "37.5000000", "127.0000000");
long higherSimilarityContext = newContext(higherSimilarity, me, "군대 전역하고 다닌 헬스장");
long literalMatch = newRecord(me, "judge-b", "37.6000000", "127.1000000");
long literalMatchContext = newContext(literalMatch, me, "싸피 2학기 동안 다니던 헬스장");
long literalMatchContext = newContext(literalMatch, me, "부트캠프 다닐 때 1년 동안 다니던 헬스장");
STUB.willReturn(
new FastApiSearchStub.Match(higherSimilarity, higherSimilarityContext, 0.85),
new FastApiSearchStub.Match(literalMatch, literalMatchContext, 0.70));
STUB.willJudge(
new FastApiSearchStub.Judgment(higherSimilarityContext, "WEAKLY_RELEVANT"),
new FastApiSearchStub.Judgment(literalMatchContext, "VERY_RELEVANT"));

search(me, "싸피 다녔던 헬스장")
search(me, "부트캠프 다녔던 헬스장")
.andExpect(status().isOk())
.andExpect(jsonPath("$.data.items.length()").value(2))
.andExpect(jsonPath("$.data.items[0].recordId").value(literalMatch))
Expand Down
Loading