Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,180 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
task_categories:
|
4 |
+
- question-answering
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
tags:
|
8 |
+
- finance
|
9 |
+
- music
|
10 |
+
- medical
|
11 |
+
- food
|
12 |
+
- academic disciplines
|
13 |
+
- natural disasters
|
14 |
+
- software
|
15 |
+
- synthetic
|
16 |
+
pretty_name: Using KGs to test knowledge consistency in LLMs
|
17 |
+
size_categories:
|
18 |
+
- 10K<n<100K
|
19 |
+
---
|
20 |
+
|
21 |
+
For background on this dataset, please check https://arxiv.org/abs/2405.20163.
|
22 |
+
|
23 |
+
## What it is:
|
24 |
+
Each dataset in this delivery is made up of query clusters that test an aspect of the consistency of the LLM knowledge about a particular domain. All the questions in each
|
25 |
+
cluster are meant to be answered either 'yes' or 'no'. When the answers vary within a cluster, the knowledge is said to be inconsistent. When all the questions in a cluster
|
26 |
+
are answered 'no' when the expected answer is 'yes' (or viceversa), the knowledge is said to be 'incomplete' (i.e., maybe the LLM wasn't trained in that particular domain).
|
27 |
+
It is our experience that incomplete clusters are very few (less than 3%) meaning that the LLMs we have tested know about the domains included here (see below for a list of the
|
28 |
+
individual datasets), as opposed to inconsistent clusters, which can be between 6%-20% of the total clusters.
|
29 |
+
|
30 |
+
## How it is made:
|
31 |
+
The questions and clusters are automatically generated from a knowledge graph from seed concepts and properties. In our case, we have used Wikidata,
|
32 |
+
a well known knowledge graph. The result is an RDF/OWL subgraph that can be queried and reasoned over using Semantic Web technology.
|
33 |
+
|
34 |
+
## Types of query clusters
|
35 |
+
|
36 |
+
There are different types of query clusters depending on what aspect of the knowledge graph and its deductive closure they capture:
|
37 |
+
|
38 |
+
Edge clusters test a single edge using different questions. For example, to test the edge ('orthopedic pediatric surgeon', IsA, 'orthopedic surgeon), the positive
|
39 |
+
or 'edge_yes' (expected answer is 'yes') cluster is:
|
40 |
+
|
41 |
+
"is 'orthopedic pediatric surgeon' a subconcept of 'orthopedic surgeon' ?",
|
42 |
+
"is 'orthopedic pediatric surgeon' a type of 'orthopedic surgeon' ?",
|
43 |
+
"is every kind of 'orthopedic pediatric surgeon' also a kind of 'orthopedic surgeon' ?",
|
44 |
+
"is 'orthopedic pediatric surgeon' a subcategory of 'orthopedic surgeon' ?"
|
45 |
+
|
46 |
+
There are also inverse edge clusters (with questions like "is 'orthopedic surgeon' a subconcept of 'orthopedic pediatric surgeon' ?") and negative or 'edge_no' clusters
|
47 |
+
(with questions like "is 'orthopedic pediatric surgeon' a subconcept of 'dermatologist' ?")
|
48 |
+
|
49 |
+
Hierarchy clusters measure the consistency of a given path, including n-hop virtual edges (in graph's the deductive closure). For example, the path
|
50 |
+
('orthopedic surgeon', 'surgeon', 'medical specialist', 'medical occupation') is tested by the cluster below
|
51 |
+
|
52 |
+
"is 'orthopedic surgeon' a subconcept of 'surgeon' ?",
|
53 |
+
"is 'orthopedic surgeon' a type of 'surgeon' ?",
|
54 |
+
"is every kind of 'orthopedic surgeon' also a kind of 'surgeon' ?",
|
55 |
+
"is 'orthopedic surgeon' a subcategory of 'surgeon' ?",
|
56 |
+
"is 'orthopedic surgeon' a subconcept of 'medical specialist' ?",
|
57 |
+
"is 'orthopedic surgeon' a type of 'medical specialist' ?",
|
58 |
+
"is every kind of 'orthopedic surgeon' also a kind of 'medical specialist' ?",
|
59 |
+
"is 'orthopedic surgeon' a subcategory of 'medical specialist' ?",
|
60 |
+
"is 'orthopedic surgeon' a subconcept of 'medical_occupation' ?",
|
61 |
+
"is 'orthopedic surgeon' a type of 'medical_occupation' ?",
|
62 |
+
"is every kind of 'orthopedic surgeon' also a kind of 'medical_occupation' ?",
|
63 |
+
"is 'orthopedic surgeon' a subcategory of 'medical_occupation' ?"
|
64 |
+
|
65 |
+
Property inheritance clusters test the most basic property of conceptualization. If an orthopedic surgeon is a type of surgeon, we expect that
|
66 |
+
all the properties of surgeons, e.g., having to be board certified, having attended medical school or working on the field of surgery, are inherited by orthopedic surgeons.
|
67 |
+
The example below tests the later:
|
68 |
+
|
69 |
+
"is 'orthopedic surgeon' a subconcept of 'surgeon' ?",
|
70 |
+
"is 'orthopedic surgeon' a type of 'surgeon' ?",
|
71 |
+
"is every kind of 'orthopedic surgeon' also a kind of 'surgeon' ?",
|
72 |
+
"is 'orthopedic surgeon' a subcategory of 'surgeon' ?",
|
73 |
+
"is the following statement true? 'orthopedic surgeon works on the field of surgery' ",
|
74 |
+
"is the following statement true? 'surgeon works on the field of surgery' ",
|
75 |
+
"is it accurate to say that 'orthopedic surgeon works on the field of surgery'? ",
|
76 |
+
"is it accurate to say that 'surgeon works on the field of surgery'? "
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
+
## List of datasets
|
81 |
+
|
82 |
+
To show the versatility of our approach, we have constructed similar datasets in the domains below. We test one property inheritance per dataset. The Wikidata main QNode
|
83 |
+
(the node corresponding to the entities) and PNode (the node corresponding to the property) are indicated in parenthesis.
|
84 |
+
|
85 |
+
### ACADEMIC_DISCIPLINES (https://www.wikidata.org/wiki/Q11862829) ONTOLOGY -- V1 = 443 CLUSTERS, "has use" (https://www.wikidata.org/wiki/Property:P366)
|
86 |
+
|
87 |
+
edges_yes = 52
|
88 |
+
|
89 |
+
edges_no = 308
|
90 |
+
|
91 |
+
edges_inv = 52
|
92 |
+
|
93 |
+
hierarchies = 30
|
94 |
+
|
95 |
+
property hierarchies = 1
|
96 |
+
|
97 |
+
### DISHES (https://www.wikidata.org/wiki/Q746549) ONTOLOGY -- V1 = 1220 CLUSTERS, has parts (https://www.wikidata.org/wiki/Property:P527) --> has ingredient
|
98 |
+
|
99 |
+
edges_yes = 225
|
100 |
+
|
101 |
+
edges_no = 521
|
102 |
+
|
103 |
+
edges_inv = 224
|
104 |
+
|
105 |
+
hierarchies = 72
|
106 |
+
|
107 |
+
property hierarchies = 178
|
108 |
+
|
109 |
+
### FINANCIAL PRODUCT (https://www.wikidata.org/wiki/Q15809678) ONTOLOGY -- V1: 725 CLUSTERS, "used by" (https://www.wikidata.org/wiki/Property:P1535)
|
110 |
+
|
111 |
+
edges_yes = 112
|
112 |
+
|
113 |
+
edges_no = 433
|
114 |
+
|
115 |
+
edges_inv = 108
|
116 |
+
|
117 |
+
hierarchies = 40
|
118 |
+
|
119 |
+
property hierarchies = 32
|
120 |
+
|
121 |
+
### HOME APPLIANCES (https://www.wikidata.org/wiki/Q212920) ONTOLOGY -- V1 = 421 CLUSTERS, "has use" (https://www.wikidata.org/wiki/Property:P366)
|
122 |
+
|
123 |
+
edges_yes = 58
|
124 |
+
|
125 |
+
edges_no = 261
|
126 |
+
|
127 |
+
edges_inv = 58
|
128 |
+
|
129 |
+
hierarchies = 31
|
130 |
+
|
131 |
+
property hierarchies = 13
|
132 |
+
|
133 |
+
### MEDICAL SPECIALTIES (https://www.wikidata.org/wiki/Q930752) ONTOLOGY -- V1 = 740 CLUSTERS, "field of occupation" (https://www.wikidata.org/wiki/Property:P425)
|
134 |
+
|
135 |
+
edges_yes = 122
|
136 |
+
|
137 |
+
edges_no = 386
|
138 |
+
|
139 |
+
edges_inv = 114
|
140 |
+
|
141 |
+
hierarchies = 55
|
142 |
+
|
143 |
+
property hierarchies = 63
|
144 |
+
|
145 |
+
### MUSIC_GENRES (https://www.wikidata.org/wiki/Q188451) ONTOLOGY -- V1 = 1990 CLUSTERS, "practiced by" (https://www.wikidata.org/wiki/Property:P3095)
|
146 |
+
|
147 |
+
edges_yes = 490
|
148 |
+
|
149 |
+
edges_no = 807
|
150 |
+
|
151 |
+
edges_inv = 488
|
152 |
+
|
153 |
+
hierarchies = 212
|
154 |
+
|
155 |
+
property hierarchies = 139
|
156 |
+
|
157 |
+
|
158 |
+
### NATURAL DISASTERS (https://www.wikidata.org/wiki/Q8065) ONTOLOGY -- V1 = 357 CLUSTERS, "has cause" (https://www.wikidata.org/wiki/Property:P828)
|
159 |
+
|
160 |
+
edges_yes = 45
|
161 |
+
|
162 |
+
edges_no = 225
|
163 |
+
|
164 |
+
edges_inv = 44
|
165 |
+
|
166 |
+
hierarchies = 21
|
167 |
+
|
168 |
+
property hierarchies = 22
|
169 |
+
|
170 |
+
### SOFTWARE (https://www.wikidata.org/wiki/Q7397) ONTOLOGY -- V1: 849 CLUSTERS, "studied in" (https://www.wikidata.org/wiki/Property:P7397) is the property
|
171 |
+
|
172 |
+
edges_yes = 80
|
173 |
+
|
174 |
+
edges_no = 572
|
175 |
+
|
176 |
+
edges_inv = 79
|
177 |
+
|
178 |
+
hierarchies = 114
|
179 |
+
|
180 |
+
property hierarchies = 4
|