Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named Entity Recognition example #60

Open
quansun opened this issue Sep 13, 2020 · 1 comment
Open

Named Entity Recognition example #60

quansun opened this issue Sep 13, 2020 · 1 comment

Comments

@quansun
Copy link

quansun commented Sep 13, 2020

Hi, thanks for developing such a great tool.

Just wondering if you could add an example for training GPT-3 for Named Entity Recognition (NER) tasks?

I'm not sure how I can use the add_example function to specify the answer to a question for NER tasks:

...
gpt.add_example(Example('Tom was born in 1942', '[(Tom, Name), (1942, Year)]'))
...

Thanks!

@juliensalinas
Copy link

juliensalinas commented Apr 23, 2022

In case it helps, I made this article that explains how to use GPT-3 for NER.

Here is a full prompt example:

Extract job titles from the following sentences.

Sentence: John Doe has been working for Microsoft for 20 years as a Linux Engineer.
Job title: Linux Engineer
###
Sentence: John Doe has been working for Microsoft for 20 years and he loved it.
Job title: none
###
Sentence: Marc Simoncini | Director | Meetic
Job title: Director
###
Sentence: Franck Riboud was born on 7 November 1955 in Lyon. He is the son of Antoine Riboud, who transformed the former European glassmaker BSN Group into a leading player in the food industry. He is the CEO at Danone.
Job title: CEO
###
Sentence: Damien is the CTO of Platform.sh, he was previously the CTO of Commerce Guys, a leading ecommerce provider.
Job title:

Basically with GPT-3 sandbox, you could create examples like this:

gpt.add_example(Example("""Sentence: John Doe has been working for Microsoft for 20 years as a Linux Engineer.
Job title:""", 
"Linux Engineer"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants