hamedbabaei / llms4ol Goto Github PK
View Code? Open in Web Editor NEWLLMs4OL: Large Language Models for Ontology Learning
LLMs4OL: Large Language Models for Ontology Learning
Creating prompts for:
[ ] https://github.com/openai/openai-cookbook (zero-shot text classification)
Models to report results:
on T1, T2, .... to T8!
The goal is to generate sentences for entities from the following datasets:
Models to report results:
on T1, T2, .... to T8!
download the following models and put them on the server as well as in my local directory!
models to consider:
Prompt Engineering for Left-to-Right LMs
Initial tasks:
We are about to test templates for datasets to come up with the best template for datasets. Templates are:
Wordnet templates:
UMLS templates: For all three datasets: [MEDICIN, USMODE, SNOMEDCT_US]
Geonames templates
For Geonames [sentence] we can use the more generic template that we designed. [NAME] is a place in [COUNTRY].
We are interested in this kind of template because of the following reasons:
[A] is a [MASK]
is a kind of general template that anyone can query from a search engine like google and here we want to use it as a query for knowledge graph to see whatsoever they have [A] knowledge or not.Tasks are categorized into the following categories:
the current size of GeoNames is too large and the inference time is almost 3 days for a single template so I am reducing the size from 1.7M to 700K
Formulations and Task Definitions section
fixRun Model for WN18RR
Run Model for GeoNames
Run Model for NCI
Run Model for MEDCIN
Run Model for SNOMED
It's a great honor to see your masterpiece, but now I'm facing difficulties. Can you provide nci_entities.json data file, thank you very much
It seems that they have made an alignment with Wikipedia texts to obtain a sentence with that specific subject or object entity. Then to make a prediction over an object entity they used MASKs. For concept net, they have considered their own base dataset sentences. Then they created these query templates for relations (in our task I should create it for entity types as well) to query LMs.
According to their work, for us, the input should consist of the alignment text and the query template. For example for word net, we can obtain examples for any synset, for example for an entity cover we can get this sentence: "cover the child with a blanket" and adding the template at the end it would be: "cover the child with a blanket. cover word type is a [MASK]" (or any other template look like this -- this is just example) where the MASK is 'verb'
(this is only an idea, but First step is to test this paper idea)
Most of the datasets which didn't have sentences from their own sources relied on Wikipedia! And I had a little look at their code and I understood that they only used embedding and vocabulary which they obtained from each LMs, to calculate a probability for tokens, and then they picked up the top ones and used search engine metrics to evaluate the results.
Now the task is for entity type detection lets:
Models to report results:
on T1, T2, .... to T8!
RQ1: Can LLMs identify term/entity types? Task A
RQ2: Do LLMs comprehend relations?
is a
relations -- tree structures) Task B
is a
relations -- graph structures) Task C
Task A: The goal is to find out which LLMs are capable of finding terms/entities type without giving prior knowledge about types. Because we don't want to give any knowledge to LLMs about types, this task is a Generation task. Design considerations during solving this task are as follows:
Task B: The aim of this task and the next task (Task C) is to understand whatever LLMs could find relations without naming those relations. This relationship could be an undirected or directed relationship. These tasks are classification tasks.
For example:
Acquired Abnormality
is alocation of
aVirus
.
The location_of
is a relation between mentioned two types. Our goal is to find that Acquired Abnormality
and Virus
have relations. Not find the name of the relation (which in this case is location of
). Because naming relations refers to clustering similar relations and asking experts to name them. So in this task, we are interested to know what is the is a
relation in terms/entities types.
In Task B, we want to only find types of relationships that form a hierarchy (a structure that struct types tree format from top to down where the top is a root
-- it could be multiple roots -- and down is a leaf
) and this type of relationships called is a
relations. As an example:
C is a subclass of B.
B is a subclass of A.
D is a subclass of B.
E is a subclass of A.
Task C: However, in types, it is possible to find relations outside of the tree structure, and it is similar to relations between types in graph format. For example (considering Task B example):
E somehow has a relationship with C.
C somehow has another direct relation with A.
So, in this task, the goal is to analyze LLMs from this perspective.
Our Target is for ISWC 2023: https://iswc2023.semanticweb.org/call-for-research-track-papers/
Abstract submission due | May 2nd, 2023 |
---|---|
Full paper submission due | May 9th, 2023 |
Objection and Response | June 13th – 16th, 2023 |
Notifications | July 12th, 2023 |
Camera ready papers due | July 31st, 2023 |
useful articles:
Model-1 is GPT2-Large
, and Model-2 is GPT2-XL
Models to report results:
on a single template!
Prompt Engineering: #19
Inferencing
Model-1 is BLOOM-1b7
, and Model-2 is BLOOM-3b
Models to report results:
on T1, T2, .... to T8!
Models to report results:
on T1, T2, .... to T8!
Model-1 is BLOOM-1b7
, and Model-2 is BLOOM-3b
, and Model-3 is BLOOM-7b1
Models to report results:
on T1, T2, .... to T8!
I just use pycharm virtual environment, can't find the .env file. installed requirements.txt, I ran test.py, and the program showed me the error is KeyError: 'OPENAI_API_KEY'. Can you give me some guidance?
Sincerely yours!
https://github.com/openai/openai-cookbook (zero-shot text classification)
WN18RR
We check out the dataset and its diagrams and we decided on a few things and tasks for this dataset.
NN
, JJ
, VB
, RB
)also_see
and consider _hypernym
. What about others?FB15K-237
We conclude that the hierarchy that I extended for this dataset is kind of our contribution and we stick to this hierarchy for moving forward with this dataset.
01-analysis of datasets.ipynb
for this datasetLevel-3-person-doctor 213
Level-2-body_of_water 43
Level-3-body_of_water-sea 2
Again we need to rethink this after getting clear visions (I mean completing my diagrams)
Geonames
We talk about how level 2 is being generated regarding notebook 02-Geoname-levels-creation.ipynb
with a frequency matrix regarding the start string for level 2. and also we concluded the following tasks:
After these tasks, we should see what's so ever the new version of dataset stats is fine for us in terms of the frequency of classes in each level or not.
UMLS
We have a lot of samples with entity types and relations that we don't know which to consider. However, to continue we need the following information (we decided only consider the English language):
any of these two tasks will allow us to proceed with cutting samples into lower sizes.
Models to report results:
on T1, T2, .... to T8!
create a dataset of ontologies (classes and subclasses of types) for the following datasets:
Models to report results:
on T1, T2, .... to T8!
Prompt Engineering: #19
Inferencing
Model-1 is GPT2-Large
, and Model-2 is GPT2-XL
Model-1 is BLOOM-1b7
, and Model-2 is BLOOM-3b
, and Model-3 is BLOOM-7b1
Model-1 is GPT2-Large
, and Model-2 is GPT2-XL
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.