Skip to content

Commit f395a08

Browse files
committed
fix: fix too long prompt line
1 parent 920ee70 commit f395a08

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

graphgen/templates/evaluation/kg/consistency_evaluation.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
}}
2222
"""
2323

24-
ENTITY_TYPE_CONFLICT_PROMPT_EN = """You are a Knowledge Graph Consistency Assessment Expert. Your task is to determine whether there are semantic conflicts when the same entity is extracted as different types in different text blocks.
24+
ENTITY_TYPE_CONFLICT_PROMPT_EN = (
25+
"""You are a Knowledge Graph Consistency Assessment Expert. """
26+
"""Your task is to determine whether there are semantic conflicts """
27+
"""when the same entity is extracted as different types in different text blocks.
2528
2629
Entity Name: {entity_name}
2730
@@ -43,6 +46,7 @@
4346
"recommended_type": "<if there is a conflict, the recommended correct type (must be one of the preset types)>"
4447
}}
4548
"""
49+
)
4650

4751
ENTITY_DESCRIPTION_CONFLICT_PROMPT_ZH = """你是一个知识图谱一致性评估专家。你的任务是判断同一个实体在不同文本块中的描述是否存在语义冲突。
4852
@@ -63,7 +67,10 @@
6367
}}
6468
"""
6569

66-
ENTITY_DESCRIPTION_CONFLICT_PROMPT_EN = """You are a Knowledge Graph Consistency Assessment Expert. Your task is to determine whether there are semantic conflicts in the descriptions of the same entity across different text blocks.
70+
ENTITY_DESCRIPTION_CONFLICT_PROMPT_EN = (
71+
"""You are a Knowledge Graph Consistency Assessment Expert. """
72+
"""Your task is to determine whether there are semantic conflicts """
73+
"""in the descriptions of the same entity across different text blocks.
6774
6875
Entity Name: {entity_name}
6976
@@ -81,6 +88,7 @@
8188
"conflict_details": "<specific conflict content>"
8289
}}
8390
"""
91+
)
8492

8593
RELATION_CONFLICT_PROMPT_ZH = """你是一个知识图谱一致性评估专家。你的任务是判断同一对实体在不同文本块中的关系描述是否存在语义冲突。
8694
@@ -100,7 +108,10 @@
100108
}}
101109
"""
102110

103-
RELATION_CONFLICT_PROMPT_EN = """You are a Knowledge Graph Consistency Assessment Expert. Your task is to determine whether there are semantic conflicts in the relation descriptions of the same entity pair across different text blocks.
111+
RELATION_CONFLICT_PROMPT_EN = (
112+
"""You are a Knowledge Graph Consistency Assessment Expert. """
113+
"""Your task is to determine whether there are semantic conflicts """
114+
"""in the relation descriptions of the same entity pair across different text blocks.
104115
105116
Entity Pair: {source_entity} -> {target_entity}
106117
@@ -117,6 +128,7 @@
117128
"conflicting_relations": ["<pairs of conflicting relation descriptions>"]
118129
}}
119130
"""
131+
)
120132

121133
ENTITY_EXTRACTION_PROMPT_ZH = """从以下文本块中提取指定实体的类型和描述。
122134

0 commit comments

Comments
 (0)