Skip to content

Commit 1f7d73b

Browse files
committed
add open benchmark
1 parent a1f0464 commit 1f7d73b

5 files changed

Lines changed: 111 additions & 89 deletions

File tree

kag/examples/baike/kag_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ kag_hybrid_executor: &kag_hybrid_executor_conf
144144
- *rc
145145
merger:
146146
type: kag_merger
147-
enable_summary: true
147+
enable_summary: true
148148

149149
kag_output_executor: &kag_output_executor_conf
150150
type: kag_output_executor
Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,122 @@
11
namespace BaiKe
22

3+
SemanticConcept(语义概念): EntityType
4+
properties:
5+
desc(内容): Text
6+
index: Text
7+
isA(上位): SemanticConcept
8+
39
ArtificialObject(人造物体): EntityType
410
properties:
511
desc(描述): Text
612
index: TextAndVector
7-
semanticType(语义类型): Text
8-
index: Text
13+
semanticType(语义类型): SemanticConcept
14+
synonyms(同义词): ArtificialObject
15+
officialName(标准名): ArtificialObject
916

1017
Astronomy(天文学): EntityType
1118
properties:
1219
desc(描述): Text
1320
index: TextAndVector
14-
semanticType(语义类型): Text
15-
index: Text
21+
semanticType(语义类型): SemanticConcept
22+
synonyms(同义词): Astronomy
23+
officialName(标准名): Astronomy
1624

1725
Building(建筑): EntityType
1826
properties:
1927
desc(描述): Text
2028
index: TextAndVector
21-
semanticType(语义类型): Text
22-
index: Text
29+
semanticType(语义类型): SemanticConcept
30+
synonyms(同义词): Building
31+
officialName(标准名): Building
2332

2433
Creature(生物): EntityType
2534
properties:
2635
desc(描述): Text
2736
index: TextAndVector
28-
semanticType(语义类型): Text
29-
index: Text
37+
semanticType(语义类型): SemanticConcept
38+
synonyms(同义词): Creature
39+
officialName(标准名): Creature
3040

3141
Concept(概念): EntityType
3242
properties:
3343
desc(描述): Text
3444
index: TextAndVector
35-
semanticType(语义类型): Text
36-
index: Text
45+
semanticType(语义类型): SemanticConcept
46+
synonyms(同义词): Concept
47+
officialName(标准名): Concept
3748

3849
Date(日期): EntityType
3950
properties:
4051
desc(描述): Text
4152
index: TextAndVector
42-
semanticType(语义类型): Text
43-
index: Text
53+
semanticType(语义类型): SemanticConcept
54+
synonyms(同义词): Date
55+
officialName(标准名): Date
4456

4557
GeographicLocation(地理位置): EntityType
4658
properties:
4759
desc(描述): Text
4860
index: TextAndVector
49-
semanticType(语义类型): Text
50-
index: Text
61+
semanticType(语义类型): SemanticConcept
62+
synonyms(同义词): GeographicLocation
63+
officialName(标准名): GeographicLocation
5164

5265
Keyword(关键词): EntityType
5366
properties:
5467
desc(描述): Text
5568
index: TextAndVector
56-
semanticType(语义类型): Text
57-
index: Text
69+
semanticType(语义类型): SemanticConcept
70+
synonyms(同义词): Keyword
71+
officialName(标准名): Keyword
5872

5973
Medicine(药物): EntityType
6074
properties:
6175
desc(描述): Text
6276
index: TextAndVector
63-
semanticType(语义类型): Text
64-
index: Text
65-
77+
semanticType(语义类型): SemanticConcept
78+
synonyms(同义词): Medicine
79+
officialName(标准名): Medicine
6680

6781
NaturalScience(自然科学): EntityType
6882
properties:
6983
desc(描述): Text
7084
index: TextAndVector
71-
semanticType(语义类型): Text
72-
index: Text
85+
semanticType(语义类型): SemanticConcept
86+
synonyms(同义词): NaturalScience
87+
officialName(标准名): NaturalScience
7388

7489
Organization(组织机构): EntityType
7590
properties:
7691
desc(描述): Text
7792
index: TextAndVector
78-
semanticType(语义类型): Text
79-
index: Text
93+
semanticType(语义类型): SemanticConcept
94+
synonyms(同义词): Organization
95+
officialName(标准名): Organization
8096

8197
Person(人物): EntityType
8298
properties:
8399
desc(描述): Text
84100
index: TextAndVector
85-
semanticType(语义类型): Text
86-
index: Text
101+
semanticType(语义类型): SemanticConcept
102+
synonyms(同义词): Person
103+
officialName(标准名): Person
87104

88105
Transport(运输): EntityType
89106
properties:
90107
desc(描述): Text
91108
index: TextAndVector
92-
semanticType(语义类型): Text
93-
index: Text
109+
semanticType(语义类型): SemanticConcept
110+
synonyms(同义词): Transport
111+
officialName(标准名): Transport
94112

95113
Works(作品): EntityType
96114
properties:
97115
desc(描述): Text
98116
index: TextAndVector
99-
semanticType(语义类型): Text
100-
index: Text
101-
102-
Others(其他): EntityType
103-
properties:
104-
desc(描述): Text
105-
index: TextAndVector
106-
semanticType(语义类型): Text
107-
index: Text
117+
semanticType(语义类型): SemanticConcept
118+
synonyms(同义词): Works
119+
officialName(标准名): Works
108120

109121
Event(事件): EventType
110122
properties:
@@ -118,8 +130,10 @@ Event(事件): EventType
118130
type(事件类型): Text
119131
index: Text
120132

121-
122-
SemanticConcept(语义概念): EntityType
133+
Others(其他): EntityType
123134
properties:
124-
desc(内容): Text
125-
index: Text
135+
desc(描述): Text
136+
index: TextAndVector
137+
semanticType(语义类型): SemanticConcept
138+
synonyms(同义词): Others
139+
officialName(标准名): Others

kag/open_benchmark/2wiki/src/eval.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ def eval(qa_file_path, thread_num=10, upper_limit=1000, collect_file="benchmark.
9393

9494
if __name__ == "__main__":
9595
# benchmark common component
96-
common_component = os.path.join(
97-
os.path.abspath(os.path.dirname(__file__)), "../../common_component"
98-
)
99-
import_modules_from_path(common_component)
96+
import kag.open_benchmark.common_component # noqa: F401
10097
delay_run(hours=0)
10198
# 解析命令行参数
10299
parser = running_paras()

kag/open_benchmark/hotpotqa/src/eval.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ def eval(qa_file_path, thread_num=10, upper_limit=1000, collect_file="benchmark.
7878

7979
if __name__ == "__main__":
8080
# benchmark common component
81-
common_component = os.path.join(
82-
os.path.abspath(os.path.dirname(__file__)), "../../common_component"
83-
)
84-
import_modules_from_path(common_component)
81+
import kag.open_benchmark.common_component # noqa: F401
8582
delay_run(hours=0)
8683
# 解析命令行参数
8784
parser = running_paras()
Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,122 @@
11
namespace {{namespace}}
22

3+
SemanticConcept(语义概念): EntityType
4+
properties:
5+
desc(内容): Text
6+
index: Text
7+
isA(上位): SemanticConcept
8+
39
ArtificialObject(人造物体): EntityType
410
properties:
511
desc(描述): Text
612
index: TextAndVector
7-
semanticType(语义类型): Text
8-
index: Text
13+
semanticType(语义类型): SemanticConcept
14+
synonyms(同义词): ArtificialObject
15+
officialName(标准名): ArtificialObject
916

1017
Astronomy(天文学): EntityType
1118
properties:
1219
desc(描述): Text
1320
index: TextAndVector
14-
semanticType(语义类型): Text
15-
index: Text
21+
semanticType(语义类型): SemanticConcept
22+
synonyms(同义词): Astronomy
23+
officialName(标准名): Astronomy
1624

1725
Building(建筑): EntityType
1826
properties:
1927
desc(描述): Text
2028
index: TextAndVector
21-
semanticType(语义类型): Text
22-
index: Text
29+
semanticType(语义类型): SemanticConcept
30+
synonyms(同义词): Building
31+
officialName(标准名): Building
2332

2433
Creature(生物): EntityType
2534
properties:
2635
desc(描述): Text
2736
index: TextAndVector
28-
semanticType(语义类型): Text
29-
index: Text
37+
semanticType(语义类型): SemanticConcept
38+
synonyms(同义词): Creature
39+
officialName(标准名): Creature
3040

3141
Concept(概念): EntityType
3242
properties:
3343
desc(描述): Text
3444
index: TextAndVector
35-
semanticType(语义类型): Text
36-
index: Text
45+
semanticType(语义类型): SemanticConcept
46+
synonyms(同义词): Concept
47+
officialName(标准名): Concept
3748

3849
Date(日期): EntityType
3950
properties:
4051
desc(描述): Text
4152
index: TextAndVector
42-
semanticType(语义类型): Text
43-
index: Text
53+
semanticType(语义类型): SemanticConcept
54+
synonyms(同义词): Date
55+
officialName(标准名): Date
4456

4557
GeographicLocation(地理位置): EntityType
4658
properties:
4759
desc(描述): Text
4860
index: TextAndVector
49-
semanticType(语义类型): Text
50-
index: Text
61+
semanticType(语义类型): SemanticConcept
62+
synonyms(同义词): GeographicLocation
63+
officialName(标准名): GeographicLocation
5164

5265
Keyword(关键词): EntityType
5366
properties:
5467
desc(描述): Text
5568
index: TextAndVector
56-
semanticType(语义类型): Text
57-
index: Text
69+
semanticType(语义类型): SemanticConcept
70+
synonyms(同义词): Keyword
71+
officialName(标准名): Keyword
5872

5973
Medicine(药物): EntityType
6074
properties:
6175
desc(描述): Text
6276
index: TextAndVector
63-
semanticType(语义类型): Text
64-
index: Text
65-
77+
semanticType(语义类型): SemanticConcept
78+
synonyms(同义词): Medicine
79+
officialName(标准名): Medicine
6680

6781
NaturalScience(自然科学): EntityType
6882
properties:
6983
desc(描述): Text
7084
index: TextAndVector
71-
semanticType(语义类型): Text
72-
index: Text
85+
semanticType(语义类型): SemanticConcept
86+
synonyms(同义词): NaturalScience
87+
officialName(标准名): NaturalScience
7388

7489
Organization(组织机构): EntityType
7590
properties:
7691
desc(描述): Text
7792
index: TextAndVector
78-
semanticType(语义类型): Text
79-
index: Text
93+
semanticType(语义类型): SemanticConcept
94+
synonyms(同义词): Organization
95+
officialName(标准名): Organization
8096

8197
Person(人物): EntityType
8298
properties:
8399
desc(描述): Text
84100
index: TextAndVector
85-
semanticType(语义类型): Text
86-
index: Text
101+
semanticType(语义类型): SemanticConcept
102+
synonyms(同义词): Person
103+
officialName(标准名): Person
87104

88105
Transport(运输): EntityType
89106
properties:
90107
desc(描述): Text
91108
index: TextAndVector
92-
semanticType(语义类型): Text
93-
index: Text
109+
semanticType(语义类型): SemanticConcept
110+
synonyms(同义词): Transport
111+
officialName(标准名): Transport
94112

95113
Works(作品): EntityType
96114
properties:
97115
desc(描述): Text
98116
index: TextAndVector
99-
semanticType(语义类型): Text
100-
index: Text
101-
102-
Others(其他): EntityType
103-
properties:
104-
desc(描述): Text
105-
index: TextAndVector
106-
semanticType(语义类型): Text
107-
index: Text
117+
semanticType(语义类型): SemanticConcept
118+
synonyms(同义词): Works
119+
officialName(标准名): Works
108120

109121
Event(事件): EventType
110122
properties:
@@ -118,8 +130,10 @@ Event(事件): EventType
118130
type(事件类型): Text
119131
index: Text
120132

121-
122-
SemanticConcept(语义概念): EntityType
133+
Others(其他): EntityType
123134
properties:
124-
desc(内容): Text
125-
index: Text
135+
desc(描述): Text
136+
index: TextAndVector
137+
semanticType(语义类型): SemanticConcept
138+
synonyms(同义词): Others
139+
officialName(标准名): Others

0 commit comments

Comments
 (0)