HamedBabaei / LLMs4OL

LLMs4OL:‌ Large Language Models for Ontology Learning
MIT License
87 stars 8 forks source link

create well-structured prompts for datasets #8

Closed HamedBabaei closed 1 year ago

HamedBabaei commented 1 year ago

Creating prompts for:

HamedBabaei commented 1 year ago

I used the generation capabilities of ChatGPT in the following manner:

I add this in prompt:

1. [A] has a subclass of [B].
2. [B] is a subclass of [A].

and It generated the following for me (starting the numbering from 3)

3. [A] is the parent class of [B].
4. [B] is a child class of [A].
5. [B] inherits from [A].
6. [A] is the base class for [B].
7. [B] is a derived class of [A].
8. [A] is a more general class than [B].
9. [B] is a more specific class than [A].
10. [A] is a supertype of [B].
11. [B] is a subtype of [A].
12. [A] is the superclass of [B].
13. [B] is a subclass of [A].
14. [A] is an ancestor class of [B].
15. [B] is a descendant class of [A].

Some of these could be a good template for us to extend our dataset for prompt engineering (if we want to do few-shot learning)

HamedBabaei commented 1 year ago

designed prompts for Task B:

{"placeholder": "text_a"} is the superclass of {"placeholder": "text_b"}. It is a {"mask"} statement.
{"placeholder": "text_b"} is a subclass of {"placeholder": "text_a"}. It is a {"mask"} statement.
{"placeholder": "text_a"} is the parent class of {"placeholder": "text_b"}. It is a {"mask"} statement.
{"placeholder": "text_b"} is a child class of {"placeholder": "text_a"}. It is a {"mask"} statement.
{"placeholder": "text_a"} is a supertype of {"placeholder": "text_b"}. It is a {"mask"} statement.
{"placeholder": "text_b"} is a subtype of {"placeholder": "text_a"}. It is a {"mask"} statement.
{"placeholder": "text_a"} is an ancestor class of {"placeholder": "text_b"}. It is a {"mask"} statement.
{"placeholder": "text_b"} is a descendant class of {"placeholder": "text_a"}. It is a {"mask"} statement.

This is the use of a prompt for a classification task!