diff --git a/src/gateway/chat/handle-chat.ts b/src/gateway/chat/handle-chat.ts index 962f758..0a20798 100644 --- a/src/gateway/chat/handle-chat.ts +++ b/src/gateway/chat/handle-chat.ts @@ -1992,8 +1992,12 @@ async function handleChat( // 수정하겠습니다. 잠시만 기다려 주세요."로 또 끝났는데, 이 가드가 "도구 0개 + 넛지 1회"라 두 번째 // 약속은 아무 망에도 안 걸려 그대로 정지했다. 이제 넛지 2회까지, 도구를 이미 썼어도 // 행동 예고 + "잠시만 기다려" 가 함께 있으면(좁은 조건) 잡는다. + // 2026-10-22 실측: Haiku 전환(10-17) 후 실제 대화 발동 6건 중 5건이 오판(되묻기·조건부 제안을 약속으로 봄), + // 넛지가 맞는 답을 망쳤다. 이 가드는 gemma류의 '예고하고 멈춤' 버릇용이라 Claude 모델에선 끈다(코드는 유지). + const _isClaudeModelThisRound = /claude|haiku|sonnet|opus/i.test(resolvedModelThisRound); const shouldNudgeActionPromise = - actionPromiseNudges < 2 + !_isClaudeModelThisRound + && actionPromiseNudges < 2 && (allToolResults.length === 0 ? isActionPromiseNoTool(candidateText) : isActionPromiseNoTool(candidateText) && isDeferralPromiseReply(candidateText)); @@ -2129,14 +2133,25 @@ async function handleChat( if (!_numeric.sourceOnTopic) { console.log(`[v2] NUMERIC-GROUNDING: standing down — search results cover only ${(_numeric.sourceCoverage * 100).toFixed(0)}% of the query's terms, so they cannot show the answer's figures were fabricated.`); } + // 2026-10-22: '없다/미공개' 주장 검사는 Claude 모델에서 끈다 — Haiku 전환 후 6건 전부 맞는 말 + // ("Haiku 구조는 공개하지 않음", "항모 위치 공개 안 됨")을 되돌렸다. 숫자 검사는 그대로. + // 숫자·날짜 쪽도 근거가 없으면 그쪽 재요청은 그대로 탄다(부재 주장만으로 걸린 경우만 건너뜀). + const _figuresOrDateUnsupported = (!!_numeric.primaryClaim && _numeric.unsupported.includes(_numeric.primaryClaim)) + || _numeric.dateUnsupported; + const _skipNonexistenceForClaude = _numeric.nonexistenceUnsupported && !_figuresOrDateUnsupported + && /claude|haiku|sonnet|opus/i.test(resolvedModelThisRound); + if (_skipNonexistenceForClaude && _numeric.allUnsupported) { + console.log('[v2] NUMERIC-GROUNDING: non-existence check skipped for Claude model'); + } const shouldForceNumericRetry = _numeric.allUnsupported + && !_skipNonexistenceForClaude && numericGroundingForcedRetries < MAX_NUMERIC_GROUNDING_FORCED_RETRIES; if (shouldForceNumericRetry) { numericGroundingForcedRetries++; // The "rewrite using only sourced numbers" wording below is the wrong instruction for a // non-existence claim — that answer has no figures to rewrite, and its problem is the // opposite (it declined to answer, using a made-up fact as the excuse). Give it its own. - if (_numeric.nonexistenceUnsupported && _numeric.nonexistenceClaim) { + if (_numeric.nonexistenceUnsupported && _numeric.nonexistenceClaim && !/claude|haiku|sonnet|opus/i.test(resolvedModelThisRound)) { const _claim = _numeric.nonexistenceClaim; console.log(`[v2] NUMERIC-GROUNDING POST-CHECK (${numericGroundingForcedRetries}/${MAX_NUMERIC_GROUNDING_FORCED_RETRIES}): unsupported non-existence claim ["${_claim}"] not found in tool output. Re-prompting...`); sendSSE('info', { message: 'Re-prompting model: "not released yet" claim was not in the search results...' });