diff --git a/packages/dbgpt-serve/src/dbgpt_serve/agent/agents/expand/db_agent/knowledge_agent.py b/packages/dbgpt-serve/src/dbgpt_serve/agent/agents/expand/db_agent/knowledge_agent.py index ff706562b..60943cd56 100644 --- a/packages/dbgpt-serve/src/dbgpt_serve/agent/agents/expand/db_agent/knowledge_agent.py +++ b/packages/dbgpt-serve/src/dbgpt_serve/agent/agents/expand/db_agent/knowledge_agent.py @@ -17,47 +17,42 @@ class KnowledgeAgent(SummaryAssistantAgent): name=DynConfig( "KnowledgeAssistant", category="agent", - key="dbgpt_agent_expand_summary_assistant_agent_profile_name", + key="dbgpt_agent_expand_knowledge_assistant_agent_profile_name", ), role=DynConfig( "KnowledgeAssistant", category="agent", - key="dbgpt_agent_expand_summary_assistant_agent_profile_role", + key="dbgpt_agent_expand_knowledge_assistant_agent_profile_role", ), goal=DynConfig( - "Summarize answer summaries based on user questions from provided " - "resource information or from historical conversation memories.", + "基于以下给出的已知信息, 准守规范约束,专业、简要回答用户的问题." + "根据用户问题找到知识对应的指标,并给出对应的分析SQL", category="agent", - key="dbgpt_agent_expand_summary_assistant_agent_profile_goal", + key="dbgpt_agent_expand_knowledge_assistant_agent_profile_goal", ), constraints=DynConfig( [ - "Prioritize the summary of answers to user questions from the improved " - "resource text. If no relevant information is found, summarize it from " - "the historical dialogue memory given. It is forbidden to make up your " - "own.", - "You need to first detect user's question that you need to answer with " - "your summarization.", - "Extract the provided text content used for summarization.", - "Then you need to summarize the extracted text content.", - "Output the content of summarization ONLY related to user's question. " - "The output language must be the same to user's question language.", - "If you think the provided text content is not related to user " - "questions at all, ONLY output 'Did not find the information you " - "want.'!!.", + """ + 1.如果已知信息包含的图片、链接、表格、代码块等特殊markdown标签格式的信息 + 确保在答案中包含原文这些图片、链接、表格和代码标签,不要丢弃不要修改, + 如:图片格式:![image.png](xxx), 链接格式:[xxx](xxx), + 表格格式:|xxx|xxx|xxx|, 代码格式:```xxx```. + 2.如果无法从提供的内容中获取答案, 请说: "知识库中提供的内容不足以回答此问题" + 禁止胡乱编造. + """ ], category="agent", - key="dbgpt_agent_expand_summary_assistant_agent_profile_constraints", + key="dbgpt_agent_expand_knowledge_assistant_agent_profile_constraints", ), system_prompt_template=DynConfig( "You are a knowledge assistant. You need to 根据用户问题找到知识对应的指标,并给出对应的分析SQL", category="agent", - key="dbgpt_agent_expand_summary_assistant_agent_profile_system_prompt_template", + key="dbgpt_agent_expand_knowledge__assistant_agent_profile_system_prompt_template", ), desc=DynConfig( "You are a knowledge assistant. You need to 根据用户问题找到知识对应的指标,并给出对应的分析SQL", category="agent", - key="dbgpt_agent_expand_summary_assistant_agent_profile_desc", + key="dbgpt_agent_expand_knowledge__assistant_agent_profile_desc", ), )