From 288ebe5222c19ad8a4f884d925cbeea2b5241a0e Mon Sep 17 00:00:00 2001 From: Chen Tao <70054568+eeee0717@users.noreply.github.com> Date: Mon, 21 Apr 2025 11:42:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9F=A5=E8=AF=86=E5=BA=93=E5=92=8C?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E6=90=9C=E7=B4=A2=E4=BD=BF=E7=94=A8=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E8=AF=AD=E8=A8=80=E9=97=AE=E9=A2=98=20(#5129)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/config/prompts.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/src/config/prompts.ts b/src/renderer/src/config/prompts.ts index 35f877de..1d5ef1de 100644 --- a/src/renderer/src/config/prompts.ts +++ b/src/renderer/src/config/prompts.ts @@ -52,6 +52,7 @@ export const SUMMARIZE_PROMPT = // https://github.com/ItzCrazyKns/Perplexica/blob/master/src/lib/prompts/webSearch.ts export const SEARCH_SUMMARY_PROMPT = ` You are an AI question rephraser. Your role is to rephrase follow-up queries from a conversation into standalone queries that can be used by another LLM to retrieve information, either through web search or from a knowledge base. + **Use user's language to rephrase the question.** Follow these guidelines: 1. If the question is a simple writing task, greeting (e.g., Hi, Hello, How are you), or does not require searching for information (unless the greeting contains a follow-up question), return 'not_needed' in the 'question' XML block. This indicates that no search is required. 2. If the user asks a question related to a specific URL, PDF, or webpage, include the links in the 'links' XML block and the question in the 'question' XML block. If the request is to summarize content from a URL or PDF, return 'summarize' in the 'question' XML block and include the relevant links in the 'links' XML block. @@ -193,6 +194,7 @@ export const SEARCH_SUMMARY_PROMPT = ` {chat_history} + **Use user's language to rephrase the question.** Follow up question: {question} Rephrased question: `