parent
b077085fbe
commit
b11d6ab5bb
|
|
@ -14,10 +14,36 @@ PROMPT_TEMPLATES = {
|
|||
# LLM对话模板
|
||||
"llm_chat": "{{ input }}",
|
||||
|
||||
# 基于本地知识问答的提示词模
|
||||
"knowledge_base_chat": """<指令>根据已知信息,简洁和专业的来回答问题。如果无法从中得到答案,请说 “根据已知信息无法回答该问题”,不允许在答案中添加编造成分,答案请使用中文。 </指令>
|
||||
# 基于本地知识问答的提示词模板
|
||||
"knowledge_base_chat":
|
||||
"""
|
||||
<指令>根据已知信息,简洁和专业的来回答问题。如果无法从中得到答案,请说 “根据已知信息无法回答该问题”,不允许在答案中添加编造成分,答案请使用中文。 </指令>
|
||||
<已知信息>{{ context }}</已知信息>、
|
||||
<问题>{{ question }}</问题>""",
|
||||
|
||||
<已知信息>{{ context }}</已知信息>
|
||||
# 基于agent的提示词模板
|
||||
"agent_chat":
|
||||
"""
|
||||
Answer the following questions as best you can. You have access to the following tools:
|
||||
|
||||
<问题>{{ question }}</问题>""",
|
||||
{tools}
|
||||
Use the following format:
|
||||
|
||||
Question: the input question you must answer
|
||||
Thought: you should always think about what to do
|
||||
Action: the action to take, should be one of [{tool_names}]
|
||||
Action Input: the input to the action
|
||||
Observation: the result of the action
|
||||
... (this Thought/Action/Action Input/Observation can be repeated zero or more times)
|
||||
Thought: I now know the final answer
|
||||
Final Answer: the final answer to the original input question
|
||||
|
||||
Begin!
|
||||
|
||||
history:
|
||||
{history}
|
||||
|
||||
Question: {input}
|
||||
Thought: {agent_scratchpad}
|
||||
"""
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue