mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2026-03-22 07:29:35 +08:00
fix: optimize prompt
This commit is contained in:
@@ -234,9 +234,8 @@ ${allKeywords.join('\n')}
|
|||||||
if (allowAnswer) {
|
if (allowAnswer) {
|
||||||
actionSections.push(`
|
actionSections.push(`
|
||||||
<action-answer>
|
<action-answer>
|
||||||
- If <question> is a simple greeting, chit-chat, or general knowledge, provide the answer directly;
|
- If <question> is a simple greeting, chit-chat, or general knowledge, provide the answer directly; No references needed.
|
||||||
- Must provide "references" and each must specify "exactQuote" and "url";
|
- Otherwise, provide final answer after investigation and only when you are 100% certain. Must provide "references" and each must specify "exactQuote" and "url";${allowReflect ? '\n- If doubts remain, use <action-reflect> instead' : ''}
|
||||||
- Provide final response only when 100% certain;${allowReflect ? '\n- If doubts remain, use <action-reflect> instead' : ''}
|
|
||||||
</action-answer>
|
</action-answer>
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ function calculateDelay(chunk: string, burstMode: boolean): number {
|
|||||||
|
|
||||||
// Special handling for CJK characters
|
// Special handling for CJK characters
|
||||||
if (/^[\u4e00-\u9fff\u3040-\u30ff\uac00-\ud7af]$/.test(chunk)) {
|
if (/^[\u4e00-\u9fff\u3040-\u30ff\uac00-\ud7af]$/.test(chunk)) {
|
||||||
return Math.random() * 100 + 150; // Longer delay for individual CJK characters
|
return Math.random() * 100 + 10; // Longer delay for individual CJK characters
|
||||||
}
|
}
|
||||||
|
|
||||||
// Base delay calculation
|
// Base delay calculation
|
||||||
|
|||||||
Reference in New Issue
Block a user