|
--- |
|
license: apache-2.0 |
|
task_categories: |
|
- question-answering |
|
language: |
|
- en |
|
tags: |
|
- finance |
|
- music |
|
- medical |
|
- food |
|
- academic disciplines |
|
- natural disasters |
|
- software |
|
- synthetic |
|
pretty_name: Using KGs to test knowledge consistency in LLMs |
|
size_categories: |
|
- 10K<n<100K |
|
--- |
|
|
|
For background on this dataset, please check https://arxiv.org/abs/2405.20163. |
|
|
|
## What it is: |
|
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 |
|
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 |
|
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). |
|
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 |
|
individual datasets), as opposed to inconsistent clusters, which can be between 6%-20% of the total clusters. |
|
|
|
## How it is made: |
|
The questions and clusters are automatically generated from a knowledge graph from seed concepts and properties. In our case, we have used Wikidata, |
|
a well known knowledge graph. The result is an RDF/OWL subgraph that can be queried and reasoned over using Semantic Web technology. |
|
|
|
## Types of query clusters |
|
|
|
There are different types of query clusters depending on what aspect of the knowledge graph and its deductive closure they capture: |
|
|
|
Edge clusters test a single edge using different questions. For example, to test the edge ('orthopedic pediatric surgeon', IsA, 'orthopedic surgeon), the positive |
|
or 'edge_yes' (expected answer is 'yes') cluster is: |
|
|
|
"is 'orthopedic pediatric surgeon' a subconcept of 'orthopedic surgeon' ?", |
|
"is 'orthopedic pediatric surgeon' a type of 'orthopedic surgeon' ?", |
|
"is every kind of 'orthopedic pediatric surgeon' also a kind of 'orthopedic surgeon' ?", |
|
"is 'orthopedic pediatric surgeon' a subcategory of 'orthopedic surgeon' ?" |
|
|
|
There are also inverse edge clusters (with questions like "is 'orthopedic surgeon' a subconcept of 'orthopedic pediatric surgeon' ?") and negative or 'edge_no' clusters |
|
(with questions like "is 'orthopedic pediatric surgeon' a subconcept of 'dermatologist' ?") |
|
|
|
Hierarchy clusters measure the consistency of a given path, including n-hop virtual edges (in graph's the deductive closure). For example, the path |
|
('orthopedic surgeon', 'surgeon', 'medical specialist', 'medical occupation') is tested by the cluster below |
|
|
|
"is 'orthopedic surgeon' a subconcept of 'surgeon' ?", |
|
"is 'orthopedic surgeon' a type of 'surgeon' ?", |
|
"is every kind of 'orthopedic surgeon' also a kind of 'surgeon' ?", |
|
"is 'orthopedic surgeon' a subcategory of 'surgeon' ?", |
|
"is 'orthopedic surgeon' a subconcept of 'medical specialist' ?", |
|
"is 'orthopedic surgeon' a type of 'medical specialist' ?", |
|
"is every kind of 'orthopedic surgeon' also a kind of 'medical specialist' ?", |
|
"is 'orthopedic surgeon' a subcategory of 'medical specialist' ?", |
|
"is 'orthopedic surgeon' a subconcept of 'medical_occupation' ?", |
|
"is 'orthopedic surgeon' a type of 'medical_occupation' ?", |
|
"is every kind of 'orthopedic surgeon' also a kind of 'medical_occupation' ?", |
|
"is 'orthopedic surgeon' a subcategory of 'medical_occupation' ?" |
|
|
|
Property inheritance clusters test the most basic property of conceptualization. If an orthopedic surgeon is a type of surgeon, we expect that |
|
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. |
|
The example below tests the later: |
|
|
|
"is 'orthopedic surgeon' a subconcept of 'surgeon' ?", |
|
"is 'orthopedic surgeon' a type of 'surgeon' ?", |
|
"is every kind of 'orthopedic surgeon' also a kind of 'surgeon' ?", |
|
"is 'orthopedic surgeon' a subcategory of 'surgeon' ?", |
|
"is the following statement true? 'orthopedic surgeon works on the field of surgery' ", |
|
"is the following statement true? 'surgeon works on the field of surgery' ", |
|
"is it accurate to say that 'orthopedic surgeon works on the field of surgery'? ", |
|
"is it accurate to say that 'surgeon works on the field of surgery'? " |
|
|
|
|
|
|
|
## List of datasets |
|
|
|
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 |
|
(the node corresponding to the entities) and PNode (the node corresponding to the property) are indicated in parenthesis. |
|
|
|
### ACADEMIC_DISCIPLINES (https://www.wikidata.org/wiki/Q11862829) ONTOLOGY -- V1 = 443 CLUSTERS, "has use" (https://www.wikidata.org/wiki/Property:P366) |
|
|
|
edges_yes = 52 |
|
|
|
edges_no = 308 |
|
|
|
edges_inv = 52 |
|
|
|
hierarchies = 30 |
|
|
|
property hierarchies = 1 |
|
|
|
### DISHES (https://www.wikidata.org/wiki/Q746549) ONTOLOGY -- V1 = 1220 CLUSTERS, has parts (https://www.wikidata.org/wiki/Property:P527) --> has ingredient |
|
|
|
edges_yes = 225 |
|
|
|
edges_no = 521 |
|
|
|
edges_inv = 224 |
|
|
|
hierarchies = 72 |
|
|
|
property hierarchies = 178 |
|
|
|
### FINANCIAL PRODUCT (https://www.wikidata.org/wiki/Q15809678) ONTOLOGY -- V1: 725 CLUSTERS, "used by" (https://www.wikidata.org/wiki/Property:P1535) |
|
|
|
edges_yes = 112 |
|
|
|
edges_no = 433 |
|
|
|
edges_inv = 108 |
|
|
|
hierarchies = 40 |
|
|
|
property hierarchies = 32 |
|
|
|
### HOME APPLIANCES (https://www.wikidata.org/wiki/Q212920) ONTOLOGY -- V1 = 421 CLUSTERS, "has use" (https://www.wikidata.org/wiki/Property:P366) |
|
|
|
edges_yes = 58 |
|
|
|
edges_no = 261 |
|
|
|
edges_inv = 58 |
|
|
|
hierarchies = 31 |
|
|
|
property hierarchies = 13 |
|
|
|
### MEDICAL SPECIALTIES (https://www.wikidata.org/wiki/Q930752) ONTOLOGY -- V1 = 740 CLUSTERS, "field of occupation" (https://www.wikidata.org/wiki/Property:P425) |
|
|
|
edges_yes = 122 |
|
|
|
edges_no = 386 |
|
|
|
edges_inv = 114 |
|
|
|
hierarchies = 55 |
|
|
|
property hierarchies = 63 |
|
|
|
### MUSIC_GENRES (https://www.wikidata.org/wiki/Q188451) ONTOLOGY -- V1 = 1990 CLUSTERS, "practiced by" (https://www.wikidata.org/wiki/Property:P3095) |
|
|
|
edges_yes = 490 |
|
|
|
edges_no = 807 |
|
|
|
edges_inv = 488 |
|
|
|
hierarchies = 212 |
|
|
|
property hierarchies = 139 |
|
|
|
|
|
### NATURAL DISASTERS (https://www.wikidata.org/wiki/Q8065) ONTOLOGY -- V1 = 357 CLUSTERS, "has cause" (https://www.wikidata.org/wiki/Property:P828) |
|
|
|
edges_yes = 45 |
|
|
|
edges_no = 225 |
|
|
|
edges_inv = 44 |
|
|
|
hierarchies = 21 |
|
|
|
property hierarchies = 22 |
|
|
|
### SOFTWARE (https://www.wikidata.org/wiki/Q7397) ONTOLOGY -- V1: 849 CLUSTERS, "studied in" (https://www.wikidata.org/wiki/Property:P7397) is the property |
|
|
|
edges_yes = 80 |
|
|
|
edges_no = 572 |
|
|
|
edges_inv = 79 |
|
|
|
hierarchies = 114 |
|
|
|
property hierarchies = 4 |