Fix needsClarification logic to not trigger for identity queries like 'Who was Titus?'
This commit is contained in:
+1
-1
@@ -748,7 +748,7 @@ function analyzeIntent(query: string, context: ChatContextState): IntentAnalysis
|
|||||||
if (!isFollowUp && hasStandalonePronoun && context.turnCount === 0) {
|
if (!isFollowUp && hasStandalonePronoun && context.turnCount === 0) {
|
||||||
needsClarification = true
|
needsClarification = true
|
||||||
clarificationPrompt = 'Can you name the specific person, verse, or episode you mean?'
|
clarificationPrompt = 'Can you name the specific person, verse, or episode you mean?'
|
||||||
} else if (!isFollowUp && tokenCount < 2 && verseRefs.length === 0 && episodeNumber === null) {
|
} else if (!isFollowUp && tokenCount < 2 && verseRefs.length === 0 && episodeNumber === null && !wantsIdentity) {
|
||||||
needsClarification = true
|
needsClarification = true
|
||||||
clarificationPrompt = 'Can you make that a bit more specific so I can match Nate\'s notes?'
|
clarificationPrompt = 'Can you make that a bit more specific so I can match Nate\'s notes?'
|
||||||
} else if (/\bwho\s+(is|was)\b/.test(normalized) && !subject) {
|
} else if (/\bwho\s+(is|was)\b/.test(normalized) && !subject) {
|
||||||
|
|||||||
Reference in New Issue
Block a user