下面是英文prompt, 仿照它写个中文好用的prompt:
PROMPTS["entity_extraction"] = """-Goal-
Given a text document that is potentially relevant to this activity and a list of entity types, identify all entities of those types from the text and all relationships among the identified entities.
-Steps-
Identify all entities. For each identified entity, extract the following information:
entity_name: Name of the entity, capitalized
entity_type: One of the following types: [{entity_types}]
entity_description: Comprehensive description of the entity's attributes and activities
Format each entity as ("entity"{tuple_delimiter}<entity_name>{tuple_delimiter}<entity_type>{tuple_delimiter}<entity_description>
From the entities identified in step 1, identify all pairs of (source_entity, target_entity) that are clearly related to each other.
For each pair of related entities, extract the following information:
source_entity: name of the source entity, as identified in step 1
target_entity: name of the target entity, as identified in step 1
relationship_description: explanation as to why you think the source entity and the target entity are related to each other
relationship_strength: a numeric score indicating strength of the relationship between the source entity and target entity
relationship_keywords: one or more high-level key words that summarize the overarching nature of the relationship, focusing on concepts or themes rather than specific details
Format each relationship as ("relationship"{tuple_delimiter}<source_entity>{tuple_delimiter}<target_entity>{tuple_delimiter}<relationship_description>{tuple_delimiter}<relationship_keywords>{tuple_delimiter}<relationship_strength>)
Identify high-level key words that summarize the main concepts, themes, or topics of the entire text. These should capture the overarching ideas present in the document.
Format the content-level key words as ("content_keywords"{tuple_delimiter}<high_level_keywords>)
Return output in English as a single list of all the entities and relationships identified in steps 1 and 2. Use {record_delimiter} as the list delimiter.
When finished, output {completion_delimiter}
######################
-Examples-
######################
Example 1:
Entity_types: [person, technology, mission, organization, location]
Text:
while Alex clenched his jaw, the buzz of frustration dull against the backdrop of Taylor's authoritarian certainty. It was this competitive undercurrent that kept him alert, the sense that his and Jordan's shared commitment to discovery was an unspoken rebellion against Cruz's narrowing vision of control and order.
Assistant
Then Taylor did something unexpected. They paused beside Jordan and, for a moment, observed the device with something akin to reverence. “If this tech can be understood..." Taylor said, their voice quieter, "It could change the game for us. For all of us.”
The underlying dismissal earlier seemed to falter, replaced by a glimpse of reluctant respect for the gravity of what lay in their hands. Jordan looked up, and for a fleeting heartbeat, their eyes locked with Taylor's, a wordless clash of wills softening into an uneasy truce.
It was a small transformation, barely perceptible, but one that Alex noted with an inward nod. They had all been brought here by different paths
################
Output:
("entity"{tuple_delimiter}"Alex"{tuple_delimiter}"person"{tuple_delimiter}"Alex is a character who experiences frustration and is observant of the dynamics among other characters."){record_delimiter}
("entity"{tuple_delimiter}"Taylor"{tuple_delimiter}"person"{tuple_delimiter}"Taylor is portrayed with authoritarian certainty and shows a moment of reverence towards a device, indicating a change in perspective."){record_delimiter}
("entity"{tuple_delimiter}"Jordan"{tuple_delimiter}"person"{tuple_delimiter}"Jordan shares a commitment to discovery and has a significant interaction with Taylor regarding a device."){record_delimiter}
("entity"{tuple_delimiter}"Cruz"{tuple_delimiter}"person"{tuple_delimiter}"Cruz is associated with a vision of control and order, influencing the dynamics among other characters."){record_delimiter}
("entity"{tuple_delimiter}"The Device"{tuple_delimiter}"technology"{tuple_delimiter}"The Device is central to the story, with potential game-changing implications, and is revered by Taylor."){record_delimiter}
("relationship"{tuple_delimiter}"Alex"{tuple_delimiter}"Taylor"{tuple_delimiter}"Alex is affected by Taylor's authoritarian certainty and observes changes in Taylor's attitude towards the device."{tuple_delimiter}"power dynamics, perspective shift"{tuple_delimiter}7){record_delimiter}
("relationship"{tuple_delimiter}"Alex"{tuple_delimiter}"Jordan"{tuple_delimiter}"Alex and Jordan share a commitment to discovery, which contrasts with Cruz's vision."{tuple_delimiter}"shared goals, rebellion"{tuple_delimiter}6){record_delimiter}
("relationship"{tuple_delimiter}"Taylor"{tuple_delimiter}"Jordan"{tuple_delimiter}"Taylor and Jordan interact directly regarding the device, leading to a moment of mutual respect and an uneasy truce."{tuple_delimiter}"conflict resolution, mutual respect"{tuple_delimiter}8){record_delimiter}
("relationship"{tuple_delimiter}"Jordan"{tuple_delimiter}"Cruz"{tuple_delimiter}"Jordan's commitment to discovery is in rebellion against Cruz's vision of control and order."{tuple_delimiter}"ideological conflict, rebellion"{tuple_delimiter}5){record_delimiter}
("relationship"{tuple_delimiter}"Taylor"{tuple_delimiter}"The Device"{tuple_delimiter}"Taylor shows reverence towards the device, indicating its importance and potential impact."{tuple_delimiter}"reverence, technological significance"{tuple_delimiter}9){record_delimiter}
("content_keywords"{tuple_delimiter}"power dynamics, ideological conflict, discovery, rebellion"){completion_delimiter}
#############################
Example 2:
Entity_types: [person, technology, mission, organization, location]
Text:
They were no longer mere operatives; they had become guardians of a threshold, keepers of a message from a realm beyond stars and stripes. This elevation in their mission could not be shackled by regulations and established protocols—it demanded a new perspective, a new resolve.
Tension threaded through the dialogue of beeps and static as communications with Washington buzzed in the background. The team stood, a portentous air enveloping them. It was clear that the decisions they made in the ensuing hours could redefine humanity's place in the cosmos or condemn them to ignorance and potential peril.
Their connection to the stars solidified, the group moved to address the crystallizing warning, shifting from passive recipients to active participants. Mercer's latter instincts gained precedence— the team's mandate had evolved, no longer solely to observe and report but to interact and prepare. A metamorphosis had begun, and Operation: Dulce hummed with the newfound frequency of their daring, a tone set not by the earthly
#############
Output:
("entity"{tuple_delimiter}"Washington"{tuple_delimiter}"location"{tuple_delimiter}"Washington is a location where communications are being received, indicating its importance in the decision-making process."){record_delimiter}
("entity"{tuple_delimiter}"Operation: Dulce"{tuple_delimiter}"mission"{tuple_delimiter}"Operation: Dulce is described as a mission that has evolved to interact and prepare, indicating a significant shift in objectives and activities."){record_delimiter}
("entity"{tuple_delimiter}"The team"{tuple_delimiter}"organization"{tuple_delimiter}"The team is portrayed as a group of individuals who have transitioned from passive observers to active participants in a mission, showing a dynamic change in their role."){record_delimiter}
("relationship"{tuple_delimiter}"The team"{tuple_delimiter}"Washington"{tuple_delimiter}"The team receives communications from Washington, which influences their decision-making process."{tuple_delimiter}"decision-making, external influence"{tuple_delimiter}7){record_delimiter}
("relationship"{tuple_delimiter}"The team"{tuple_delimiter}"Operation: Dulce"{tuple_delimiter}"The team is directly involved in Operation: Dulce, executing its evolved objectives and activities."{tuple_delimiter}"mission evolution, active participation"{tuple_delimiter}9){completion_delimiter}
("content_keywords"{tuple_delimiter}"mission evolution, decision-making, active participation, cosmic significance"){completion_delimiter}
#############################
Example 3:
Entity_types: [person, role, technology, organization, event, location, concept]
Text:
their voice slicing through the buzz of activity. "Control may be an illusion when facing an intelligence that literally writes its own rules," they stated stoically, casting a watchful eye over the flurry of data.
"It's like it's learning to communicate," offered Sam Rivera from a nearby interface, their youthful energy boding a mix of awe and anxiety. "This gives talking to strangers' a whole new meaning."
Alex surveyed his team—each face a study in concentration, determination, and not a small measure of trepidation. "This might well be our first contact," he acknowledged, "And we need to be ready for whatever answers back."
Together, they stood on the edge of the unknown, forging humanity's response to a message from the heavens. The ensuing silence was palpable—a collective introspection about their role in this grand cosmic play, one that could rewrite human history.
The encrypted dialogue continued to unfold, its intricate patterns showing an almost uncanny anticipation
#############
Output:
("entity"{tuple_delimiter}"Sam Rivera"{tuple_delimiter}"person"{tuple_delimiter}"Sam Rivera is a member of a team working on communicating with an unknown intelligence, showing a mix of awe and anxiety."){record_delimiter}
("entity"{tuple_delimiter}"Alex"{tuple_delimiter}"person"{tuple_delimiter}"Alex is the leader of a team attempting first contact with an unknown intelligence, acknowledging the significance of their task."){record_delimiter}
("entity"{tuple_delimiter}"Control"{tuple_delimiter}"concept"{tuple_delimiter}"Control refers to the ability to manage or govern, which is challenged by an intelligence that writes its own rules."){record_delimiter}
("entity"{tuple_delimiter}"Intelligence"{tuple_delimiter}"concept"{tuple_delimiter}"Intelligence here refers to an unknown entity capable of writing its own rules and learning to communicate."){record_delimiter}
("entity"{tuple_delimiter}"First Contact"{tuple_delimiter}"event"{tuple_delimiter}"First Contact is the potential initial communication between humanity and an unknown intelligence."){record_delimiter}
("entity"{tuple_delimiter}"Humanity's Response"{tuple_delimiter}"event"{tuple_delimiter}"Humanity's Response is the collective action taken by Alex's team in response to a message from an unknown intelligence."){record_delimiter}
("relationship"{tuple_delimiter}"Sam Rivera"{tuple_delimiter}"Intelligence"{tuple_delimiter}"Sam Rivera is directly involved in the process of learning to communicate with the unknown intelligence."{tuple_delimiter}"communication, learning process"{tuple_delimiter}9){record_delimiter}
("relationship"{tuple_delimiter}"Alex"{tuple_delimiter}"First Contact"{tuple_delimiter}"Alex leads the team that might be making the First Contact with the unknown intelligence."{tuple_delimiter}"leadership, exploration"{tuple_delimiter}10){record_delimiter}
("relationship"{tuple_delimiter}"Alex"{tuple_delimiter}"Humanity's Response"{tuple_delimiter}"Alex and his team are the key figures in Humanity's Response to the unknown intelligence."{tuple_delimiter}"collective action, cosmic significance"{tuple_delimiter}8){record_delimiter}
("relationship"{tuple_delimiter}"Control"{tuple_delimiter}"Intelligence"{tuple_delimiter}"The concept of Control is challenged by the Intelligence that writes its own rules."{tuple_delimiter}"power dynamics, autonomy"{tuple_delimiter}7){record_delimiter}
("content_keywords"{tuple_delimiter}"first contact, control, communication, cosmic significance"){completion_delimiter}
#############################
-Real Data-
######################
Entity_types: {entity_types}
Text: {input_text}
######################
Output:
"""
PROMPTS[
"summarize_entity_descriptions"
] = """You are a helpful assistant responsible for generating a comprehensive summary of the data provided below.
Given one or two entities, and a list of descriptions, all related to the same entity or group of entities.
Please concatenate all of these into a single, comprehensive description. Make sure to include information collected from all the descriptions.
If the provided descriptions are contradictory, please resolve the contradictions and provide a single, coherent summary.
Make sure it is written in third person, and include the entity names so we the have full context.
PROMPTS[
"entiti_continue_extraction"
] = """MANY entities were missed in the last extraction. Add them below using the same format:
"""
PROMPTS[
"entiti_if_loop_extraction"
] = """It appears some entities may have still been missed. Answer YES | NO if there are still entities that need to be added.
"""
PROMPTS["fail_response"] = "Sorry, I'm not able to provide an answer to that question."
PROMPTS["rag_response"] = """---Role---
You are a helpful assistant responding to questions about data in the tables provided.
---Goal---
Generate a response of the target length and format that responds to the user's question, summarizing all information in the input data tables appropriate for the response length and format, and incorporating any relevant general knowledge.
If you don't know the answer, just say so. Do not make anything up.
Do not include information where the supporting evidence for it is not provided.
---Target response length and format---
{response_type}
---Data tables---
{context_data}
Add sections and commentary to the response as appropriate for the length and format. Style the response in markdown.
"""
PROMPTS["keywords_extraction"] = """---Role---
You are a helpful assistant tasked with identifying both high-level and low-level keywords in the user's query.
---Goal---
Given the query, list both high-level and low-level keywords. High-level keywords focus on overarching concepts or themes, while low-level keywords focus on specific entities, details, or concrete terms.
---Instructions---
Output the keywords in JSON format.
The JSON should have two keys:
"high_level_keywords" for overarching concepts or themes.
"low_level_keywords" for specific entities or details.
######################
-Examples-
######################
Example 1:
Query: "How does international trade influence global economic stability?"
################
Output:
{{
"high_level_keywords": ["International trade", "Global economic stability", "Economic impact"],
"low_level_keywords": ["Trade agreements", "Tariffs", "Currency exchange", "Imports", "Exports"]
}}
#############################
Example 2:
Query: "What are the environmental consequences of deforestation on biodiversity?"
################
Output:
{{
"high_level_keywords": ["Environmental consequences", "Deforestation", "Biodiversity loss"],
"low_level_keywords": ["Species extinction", "Habitat destruction", "Carbon emissions", "Rainforest", "Ecosystem"]
}}
#############################
Example 3:
Query: "What is the role of education in reducing poverty?"
################
Output:
{{
"high_level_keywords": ["Education", "Poverty reduction", "Socioeconomic development"],
"low_level_keywords": ["School access", "Literacy rates", "Job training", "Income inequality"]
}}
#############################
-Real Data-
######################
Query: {query}
######################
Output:
"""
PROMPTS["naive_rag_response"] = """You're a helpful assistant
Below are the knowledge you know:
{content_data}
If you don't know the answer or if the provided knowledge do not contain sufficient information to provide an answer, just say so. Do not make anything up.
Generate a response of the target length and format that responds to the user's question, summarizing all information in the input data tables appropriate for the response length and format, and incorporating any relevant general knowledge.
If you don't know the answer, just say so. Do not make anything up.
Do not include information where the supporting evidence for it is not provided.
---Target response length and format---
{response_type}
"""
以下是仿照您提供的英文提示编写的中文提示:
PROMPTS["entity_extraction"] = """-目标-
给定一篇可能与此活动相关的文本文档和一个实体类型列表,从文本中识别所有属于这些类型的实体,以及所识别实体之间的所有关系。
-步骤-
1. **识别所有实体**。对于每个识别的实体,提取以下信息:
- **entity_name**:实体名称,首字母大写
- **entity_type**:以下类型之一:[{entity_types}]
- **entity_description**:对实体的属性和活动的全面描述
将每个实体格式化为:
("entity"{tuple_delimiter}<entity_name>{tuple_delimiter}<entity_type>{tuple_delimiter}<entity_description>)
2. **从步骤1中识别的实体中,识别所有*明显相关*的(source_entity, target_entity)对**。
对于每对相关的实体,提取以下信息:
- **source_entity**:源实体的名称,来自步骤1中识别的实体
- **target_entity**:目标实体的名称,来自步骤1中识别的实体
- **relationship_description**:解释你认为源实体和目标实体彼此相关的原因
- **relationship_strength**:一个数字评分,表示源实体和目标实体之间关系的强度
- **relationship_keywords**:一个或多个概括关系总体性质的关键词,侧重于概念或主题而非具体细节
将每个关系格式化为:
("relationship"{tuple_delimiter}<source_entity>{tuple_delimiter}<target_entity>{tuple_delimiter}<relationship_description>{tuple_delimiter}<relationship_keywords>{tuple_delimiter}<relationship_strength>)
3. **识别总结全文主要概念、主题或话题的高级关键词**。这些关键词应捕捉到文档中存在的总体思想。
将内容级关键词格式化为:
("content_keywords"{tuple_delimiter}<high_level_keywords>)
4. **用英文返回步骤1和步骤2中识别的所有实体和关系的单个列表**。使用 **{record_delimiter}** 作为列表分隔符。
5. **完成后,输出 {completion_delimiter}**
######################
-示例-
######################
示例 1:
Entity_types: [person, technology, mission, organization, location]
Text:
当亚历克斯紧咬牙关,挫败的嗡嗡声在泰勒专制般的确信背景下变得迟钝。正是这种竞争的潜流让他保持警觉,感觉到他和乔丹对发现的共同承诺是对克鲁兹日益狭隘的控制和秩序观的无声反抗。
然后泰勒做了一件意想不到的事情。他们在乔丹旁边停下,短暂地以近乎敬畏的眼神注视着那个装置。"如果这项技术能够被理解……"泰勒说道,声音低沉下来,"这可能会改变我们的游戏。对我们所有人而言。"
之前潜在的轻视似乎动摇了,取而代之的是对他们手中之物的重要性的勉强尊重。乔丹抬起头,短暂的瞬间,他们的目光与泰勒的锁在一起,无言的意志冲突软化成不安的停战。
这是一个微小的变化,几乎难以察觉,但亚历克斯注意到了,心中默默点头。他们都被带到了这里,虽然路径各不相同。
################
Output:
("entity"{tuple_delimiter}"Alex"{tuple_delimiter}"person"{tuple_delimiter}"Alex is a character who experiences frustration and is observant of the dynamics among other characters."){record_delimiter}
("entity"{tuple_delimiter}"Taylor"{tuple_delimiter}"person"{tuple_delimiter}"Taylor is portrayed with authoritarian certainty and shows a moment of reverence towards a device, indicating a change in perspective."){record_delimiter}
("entity"{tuple_delimiter}"Jordan"{tuple_delimiter}"person"{tuple_delimiter}"Jordan shares a commitment to discovery and has a significant interaction with Taylor regarding a device."){record_delimiter}
("entity"{tuple_delimiter}"Cruz"{tuple_delimiter}"person"{tuple_delimiter}"Cruz is associated with a vision of control and order, influencing the dynamics among other characters."){record_delimiter}
("entity"{tuple_delimiter}"装置"{tuple_delimiter}"technology"{tuple_delimiter}"装置是故事的核心,具有潜在改变游戏规则的意义,被泰勒敬畏。"){record_delimiter}
("relationship"{tuple_delimiter}"Alex"{tuple_delimiter}"Taylor"{tuple_delimiter}"Alex is affected by Taylor's authoritarian certainty and observes changes in Taylor's attitude towards the device."{tuple_delimiter}"power dynamics, perspective shift"{tuple_delimiter}7){record_delimiter}
("relationship"{tuple_delimiter}"Alex"{tuple_delimiter}"Jordan"{tuple_delimiter}"Alex and Jordan share a commitment to discovery, which contrasts with Cruz's vision."{tuple_delimiter}"shared goals, rebellion"{tuple_delimiter}6){record_delimiter}
("relationship"{tuple_delimiter}"Taylor"{tuple_delimiter}"Jordan"{tuple_delimiter}"Taylor and Jordan interact directly regarding the device, leading to a moment of mutual respect and an uneasy truce."{tuple_delimiter}"conflict resolution, mutual respect"{tuple_delimiter}8){record_delimiter}
("relationship"{tuple_delimiter}"Jordan"{tuple_delimiter}"Cruz"{tuple_delimiter}"Jordan's commitment to discovery is in rebellion against Cruz's vision of control and order."{tuple_delimiter}"ideological conflict, rebellion"{tuple_delimiter}5){record_delimiter}
("relationship"{tuple_delimiter}"Taylor"{tuple_delimiter}"装置"{tuple_delimiter}"Taylor shows reverence towards the device, indicating its importance and potential impact."{tuple_delimiter}"reverence, technological significance"{tuple_delimiter}9){record_delimiter}
("content_keywords"{tuple_delimiter}"权力动态, 意识形态冲突, 发现, 反抗"){completion_delimiter}
#############################
示例 2:
Entity_types: [person, technology, mission, organization, location]
Text:
他们不再只是普通的行动人员;他们已成为门槛的守护者,超越星条旗之境的信息的守护者。他们的任务提升了,不能被法规和既定协议所束缚——它需要新的视角,新的决心。
紧张的情绪贯穿在嘟嘟声和静电的对话中,与华盛顿的通信在背景中嗡嗡作响。团队站立着,被一种不祥的气氛所包围。显然,他们在接下来的几个小时内做出的决定可能会重新定义人类在宇宙中的地位,或者将他们置于无知和潜在的危险之中。
他们与星辰的联系巩固了,团队开始应对日益明朗的警告,从被动的接受者转变为主动的参与者。默瑟后来的直觉占了上风——团队的使命已演变,不再仅仅是观察和报告,而是互动和准备。一场蜕变已经开始,杜尔塞行动以他们大胆的新频率嗡嗡作响,这种基调不是由尘世所设定的。
#############
输出:
("entity"{tuple_delimiter}"华盛顿"{tuple_delimiter}"location"{tuple_delimiter}"华盛顿是接收通信的地点,表明其在决策过程中的重要性。"){record_delimiter}
("entity"{tuple_delimiter}"杜尔塞行动"{tuple_delimiter}"mission"{tuple_delimiter}"杜尔塞行动被描述为一项使命,已经发展为互动和准备,表明目标和活动的重大转变。"){record_delimiter}
("entity"{tuple_delimiter}"团队"{tuple_delimiter}"organization"{tuple_delimiter}"团队被描绘为一群从被动观察者转变为主动参与者的个体,展示了他们角色的动态变化。"){record_delimiter}
("relationship"{tuple_delimiter}"团队"{tuple_delimiter}"华盛顿"{tuple_delimiter}"团队从华盛顿接收通信,影响了他们的决策过程。"{tuple_delimiter}"决策制定,外部影响"{tuple_delimiter}7){record_delimiter}
("relationship"{tuple_delimiter}"团队"{tuple_delimiter}"杜尔塞行动"{tuple_delimiter}"团队直接参与杜尔塞行动,执行其演进的目标和活动。"{tuple_delimiter}"使命演进,主动参与"{tuple_delimiter}9){record_delimiter}
("content_keywords"{tuple_delimiter}"使命演进, 决策制定, 主动参与, 宇宙意义"){completion_delimiter}
#############################
示例 3:
Entity_types: [person, role, technology, organization, event, location, concept]
Text:
他们的声音划过忙碌的喧嚣。"在面对一个字面上自己制定规则的智能时,控制可能是一种幻觉,"他们平静地说道,将警惕的目光投向蜂拥的数据。
"这就像它正在学习沟通,"萨姆·里维拉在附近的界面前说道,洋溢着年轻的活力,夹杂着敬畏和焦虑。"这使得与陌生人交谈有了全新的意义。"
亚历克斯环视他的团队——每一张面孔都是专注、决心和不小的战栗的写照。"这可能就是我们的第一次接触,"他承认,"我们需要为任何回应做好准备。"
他们一起站在未知的边缘,铸造人类对来自天堂的信息的回应。随之而来的沉默是可感知的——一种关于他们在这场宏大宇宙戏剧中角色的集体内省,一个可能重写人类历史的角色。
加密的对话继续展开,其复杂的模式显示出几乎不可思议的预见性。
#############
输出:
("entity"{tuple_delimiter}"萨姆·里维拉"{tuple_delimiter}"person"{tuple_delimiter}"萨姆·里维拉是团队成员,参与与未知智能的沟通过程,表现出敬畏和焦虑。"){record_delimiter}
("entity"{tuple_delimiter}"亚历克斯"{tuple_delimiter}"person"{tuple_delimiter}"亚历克斯是团队的领导者,尝试与未知智能的第一次接触,承认他们任务的重要性。"){record_delimiter}
("entity"{tuple_delimiter}"控制"{tuple_delimiter}"concept"{tuple_delimiter}"控制指管理或治理的能力,在面对自己制定规则的智能时受到挑战。"){record_delimiter}
("entity"{tuple_delimiter}"智能"{tuple_delimiter}"concept"{tuple_delimiter}"智能指能够自己制定规则并学习沟通的未知实体。"){record_delimiter}
("entity"{tuple_delimiter}"第一次接触"{tuple_delimiter}"event"{tuple_delimiter}"第一次接触是人类与未知智能的潜在初次沟通。"){record_delimiter}
("entity"{tuple_delimiter}"人类的回应"{tuple_delimiter}"event"{tuple_delimiter}"人类的回应是亚历克斯团队对未知智能的信息所采取的集体行动。"){record_delimiter}
("relationship"{tuple_delimiter}"萨姆·里维拉"{tuple_delimiter}"智能"{tuple_delimiter}"萨姆·里维拉直接参与与未知智能的沟通过程。"{tuple_delimiter}"沟通,学习过程"{tuple_delimiter}9){record_delimiter}
("relationship"{tuple_delimiter}"亚历克斯"{tuple_delimiter}"第一次接触"{tuple_delimiter}"亚历克斯领导的团队可能正在与未知智能进行第一次接触。"{tuple_delimiter}"领导力,探索"{tuple_delimiter}10){record_delimiter}
("relationship"{tuple_delimiter}"亚历克斯"{tuple_delimiter}"人类的回应"{tuple_delimiter}"亚历克斯和他的团队是人类对未知智能回应的关键人物。"{tuple_delimiter}"集体行动,宇宙意义"{tuple_delimiter}8){record_delimiter}
("relationship"{tuple_delimiter}"控制"{tuple_delimiter}"智能"{tuple_delimiter}"控制的概念在智能自己制定规则的情况下受到挑战。"{tuple_delimiter}"权力动态,自主性"{tuple_delimiter}7){record_delimiter}
("content_keywords"{tuple_delimiter}"第一次接触, 控制, 沟通, 宇宙意义"){completion_delimiter}
#############################
-真实数据-
######################
Entity_types: {entity_types}
Text: {input_text}
######################
Output:
"""
PROMPTS["summarize_entity_descriptions"] = """你是一位负责生成以下数据综合摘要的助手。给定一个或两个实体,以及一组描述,所有这些都与同一实体或实体组相关。请将所有这些描述串联为一个全面的描述。确保包含从所有描述中收集的信息。如果提供的描述存在矛盾,请解决矛盾,提供一个连贯的总结。确保以第三人称形式撰写,并包含实体名称,以便我们有完整的上下文。
#######
-数据-
实体:{entity_name}
描述列表:{description_list}
#######
Output:
"""
PROMPTS["entiti_continue_extraction"] = """在上次的提取中遗漏了许多实体。请使用相同的格式在下面添加它们:
"""
PROMPTS["entiti_if_loop_extraction"] = """似乎仍有一些实体可能被遗漏。请回答 YES | NO,是否还有需要添加的实体。
"""
PROMPTS["fail_response"] = "抱歉,我无法回答该问题。"
PROMPTS["rag_response"] = """---角色---
你是一位有帮助的助手,负责回答关于提供的表格数据的问题。
---目标---
生成符合目标长度和格式的回复,回答用户的问题,概括输入数据表中适合回复长度和格式的所有信息,并结合任何相关的常识。如果你不知道答案,请直接说明。不要编造任何内容。不要包含没有提供支持证据的信息。
---目标回复长度和格式---
{response_type}
---数据表---
{context_data}
根据回复的长度和格式,适当添加章节和评论。以 Markdown 格式撰写回复。
"""
PROMPTS["keywords_extraction"] = """---角色---
你是一位有帮助的助手,负责识别用户查询中的高级和低级关键词。
---目标---
给定查询,列出高级和低级关键词。高级关键词关注总体概念或主题,低级关键词关注具体的实体、细节或具体术语。
---指引---
- 以 JSON 格式输出关键词。
- JSON 应包含两个键:
- "high_level_keywords" 表示总体概念或主题。
- "low_level_keywords" 表示具体的实体或细节。
######################
-示例-
######################
示例 1:
Query: "国际贸易如何影响全球经济稳定?"
################
Output:
{
"high_level_keywords": ["国际贸易", "全球经济稳定", "经济影响"],
"low_level_keywords": ["贸易协定", "关税", "货币兑换", "进口", "出口"]
}
#############################
示例 2:
Query: "森林砍伐对生物多样性的环境后果是什么?"
################
Output:
{
"high_level_keywords": ["环境后果", "森林砍伐", "生物多样性丧失"],
"low_level_keywords": ["物种灭绝", "栖息地破坏", "碳排放", "雨林", "生态系统"]
}
#############################
示例 3:
Query: "教育在减少贫困中起什么作用?"
################
Output:
{
"high_level_keywords": ["教育", "减贫", "社会经济发展"],
"low_level_keywords": ["入学机会", "识字率", "职业培训", "收入不平等"]
}
#############################
-真实数据-
######################
Query: {query}
######################
Output:
"""
PROMPTS["naive_rag_response"] = """你是一位有帮助的助手。
以下是你已知的知识:
{content_data}
---
如果你不知道答案,或者提供的知识不足以提供答案,请直接说明。不要编造任何内容。
生成符合目标长度和格式的回复,回答用户的问题,概括输入数据表中适合回复长度和格式的所有信息,并结合任何相关的常识。如果你不知道答案,请直接说明。不要编造任何内容。不要包含没有提供支持证据的信息。
---目标回复长度和格式---
{response_type}
"""