mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
refactor: adjust minRelScore and maxBadAttempts
This commit is contained in:
parent
727767e93b
commit
75275a7065
@ -393,7 +393,7 @@ export async function getResponse(question?: string,
|
||||
badHostnames: string[] = [],
|
||||
onlyHostnames: string[] = [],
|
||||
maxRef: number = 10,
|
||||
minRelScore: number = 0.85,
|
||||
minRelScore: number = 0.80,
|
||||
languageCode: string | undefined = undefined,
|
||||
searchLanguageCode?: string,
|
||||
searchProvider?: string,
|
||||
@ -956,7 +956,10 @@ But unfortunately, you failed to solve the issue. You need to think out of the b
|
||||
}
|
||||
|
||||
if (!(thisStep as AnswerAction).isFinal) {
|
||||
logWarning('Enter Beast mode!!!');
|
||||
logInfo(`Beast mode!!! budget ${(context.tokenTracker.getTotalUsage().totalTokens / tokenBudget * 100).toFixed(2)}%`, {
|
||||
usage: context.tokenTracker.getTotalUsageSnakeCase(),
|
||||
evaluationMetrics,
|
||||
});
|
||||
// any answer is better than no answer, humanity last resort
|
||||
step++;
|
||||
totalStep++;
|
||||
|
||||
@ -225,10 +225,10 @@ function getTokenBudgetAndMaxAttempts(
|
||||
case 'low':
|
||||
return { tokenBudget: 100000, maxBadAttempts: 1 };
|
||||
case 'high':
|
||||
return { tokenBudget: 1000000, maxBadAttempts: 2 };
|
||||
return { tokenBudget: 1000000, maxBadAttempts: 4 };
|
||||
case 'medium':
|
||||
default:
|
||||
return { tokenBudget: 500000, maxBadAttempts: 1 };
|
||||
return { tokenBudget: 500000, maxBadAttempts: 2 };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user