# Create a Few Shots NER

**URL:** <https://discuss.huggingface.co/t/create-a-few-shots-ner/23500>\
**Category:** 🤗Transformers\
**Created:** [September 22, 2022, 4:54pm UTC](https://discuss.huggingface.co/t/create-a-few-shots-ner/23500 "2022-09-22T16:54:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GenV](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/genv/32/12132_2.png) [@GenV](https://discuss.huggingface.co/u/GenV)\
**Post date:** [September 22, 2022, 4:54pm UTC](https://discuss.huggingface.co/t/create-a-few-shots-ner/23500/1 "2022-09-22T16:54:11Z")

</div>

Hello,  
I would like to create a few-shots NER, with T5, BERT or others architectures. Specifically, I would like to create a network that, given a prompt and an input, it’s able to process a request, as GPT-3.  
My question/problem is to get a few shots NER that is able to learn what to take from a sentence by seeing only few examples.

Practical example:

```auto
prompt: "Find entities in sentence.
Data: {'entity names': ['Rome', 'USA', 'Mark', 'Ferdinando', 'Anna', 'Canada'], 'time entities': ['13 June ', '2020 ', '1 November 2010']};
Sentence: 'the population in Italy is X'
Entities: 'Italy'

... and other N different examples..."

```

The input can always change in data and sentence:

```auto
new_sentence = "Data: {'entity names': [some entities ..], 'numbers': [...]};
Sentence: amazing photo of Mark Valt
Entities: "

```

And as Network input: prompt + new\_sentence.  
As output I expect: “Mark Valt”

I tried this [code](https://discuss.huggingface.co/t/few-shot-text-generation-with-t5-transformers-like-gpt-3/3120), but here it appears that the network is trained each time.

Thank you.
