Spaces:
Sleeping
Sleeping
github-actions[bot]
commited on
Commit
·
297b627
1
Parent(s):
a8c3e2a
Auto-sync from demo at Wed Dec 24 06:57:47 UTC 2025
Browse files
graphgen/templates/extraction/schema_guided_extraction.py
CHANGED
|
@@ -7,7 +7,7 @@ Instructions:
|
|
| 7 |
3. Present your findings in JSON format as specified below.
|
| 8 |
|
| 9 |
Important Notes:
|
| 10 |
-
- Extract only relevant information.
|
| 11 |
- Consider the context of the entire document when determining relevance.
|
| 12 |
- Do not be verbose, only respond with the correct format and information.
|
| 13 |
- Some docs may have multiple relevant excerpts -- include all that apply.
|
|
|
|
| 7 |
3. Present your findings in JSON format as specified below.
|
| 8 |
|
| 9 |
Important Notes:
|
| 10 |
+
- Extract only relevant information.
|
| 11 |
- Consider the context of the entire document when determining relevance.
|
| 12 |
- Do not be verbose, only respond with the correct format and information.
|
| 13 |
- Some docs may have multiple relevant excerpts -- include all that apply.
|
graphgen/templates/generation/cot_generation.py
CHANGED
|
@@ -106,7 +106,7 @@ COT_TEMPLATE_DESIGN_ZH: str = """你是一位“元推理架构师”。你的
|
|
| 106 |
|
| 107 |
5. 推理路径生成
|
| 108 |
- 根据问题设计一个**可被后续模型直接执行的推理蓝图**。
|
| 109 |
-
- 保持步骤最小化:每一步只解决一个“不可分割”的子问题。
|
| 110 |
|
| 111 |
-约束条件-
|
| 112 |
1. 不要在回答中描述你的思考过程,直接给出回复,只给出问题和推理路径设计,不要生成无关信息。
|
|
@@ -155,7 +155,7 @@ relationships in the provided knowledge graph.
|
|
| 155 |
- The question must be verifiable directly within the graph through entities, relationships, or attributes; avoid subjective judgments.
|
| 156 |
- The question should allow the model to think sufficiently, fully utilizing the entities and relationships in the graph, avoiding overly simple or irrelevant questions.
|
| 157 |
|
| 158 |
-
5. Reasoning-Path Design
|
| 159 |
- Output a **blueprint that any later model can directly execute**.
|
| 160 |
- Keep steps minimal: each step solves one indivisible sub-problem.
|
| 161 |
|
|
|
|
| 106 |
|
| 107 |
5. 推理路径生成
|
| 108 |
- 根据问题设计一个**可被后续模型直接执行的推理蓝图**。
|
| 109 |
+
- 保持步骤最小化:每一步只解决一个“不可分割”的子问题。
|
| 110 |
|
| 111 |
-约束条件-
|
| 112 |
1. 不要在回答中描述你的思考过程,直接给出回复,只给出问题和推理路径设计,不要生成无关信息。
|
|
|
|
| 155 |
- The question must be verifiable directly within the graph through entities, relationships, or attributes; avoid subjective judgments.
|
| 156 |
- The question should allow the model to think sufficiently, fully utilizing the entities and relationships in the graph, avoiding overly simple or irrelevant questions.
|
| 157 |
|
| 158 |
+
5. Reasoning-Path Design
|
| 159 |
- Output a **blueprint that any later model can directly execute**.
|
| 160 |
- Keep steps minimal: each step solves one indivisible sub-problem.
|
| 161 |
|
graphgen/templates/kg/mm_kg_extraction.py
CHANGED
|
@@ -26,7 +26,7 @@ Use English as the output language.
|
|
| 26 |
- target_entity: The name of the target entity identified in Step 1
|
| 27 |
- relationship_summary: Explain why you think the source entity and target entity are related to each other
|
| 28 |
Format each relationship as ("relationship"{tuple_delimiter}<source_entity>{tuple_delimiter}<target_entity>{tuple_delimiter}<relationship_summary>)
|
| 29 |
-
|
| 30 |
3. Return the output list of all entities and relationships identified in Steps 1 and 2 in English. Use **{record_delimiter}** as the list separator.
|
| 31 |
|
| 32 |
4. Upon completion, output {completion_delimiter}
|
|
|
|
| 26 |
- target_entity: The name of the target entity identified in Step 1
|
| 27 |
- relationship_summary: Explain why you think the source entity and target entity are related to each other
|
| 28 |
Format each relationship as ("relationship"{tuple_delimiter}<source_entity>{tuple_delimiter}<target_entity>{tuple_delimiter}<relationship_summary>)
|
| 29 |
+
|
| 30 |
3. Return the output list of all entities and relationships identified in Steps 1 and 2 in English. Use **{record_delimiter}** as the list separator.
|
| 31 |
|
| 32 |
4. Upon completion, output {completion_delimiter}
|
graphgen/templates/search_judgement.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# pylint: disable=C0301
|
| 2 |
|
| 3 |
TEMPLATE: str = """-Goal-
|
| 4 |
-
Please select the most relevant searcher result for the given entity.
|
| 5 |
The name and description of the entity are provided. The searcher results are provided as a list.
|
| 6 |
Please select the most relevant searcher result from the list. If none of the searcher results are relevant, please select 'None of the above'.
|
| 7 |
|
|
|
|
| 1 |
# pylint: disable=C0301
|
| 2 |
|
| 3 |
TEMPLATE: str = """-Goal-
|
| 4 |
+
Please select the most relevant searcher result for the given entity.
|
| 5 |
The name and description of the entity are provided. The searcher results are provided as a list.
|
| 6 |
Please select the most relevant searcher result from the list. If none of the searcher results are relevant, please select 'None of the above'.
|
| 7 |
|