Search code examples
nlpopenai-apigpt-3

GPT-3 question answering based on keywords


I am currently getting accustomed to GPT3, and I am trying to generate questions from a text by also inputting some keywords from that text. Ideally, they would be the answers to that question.

What I tried was to input the text, and simply write Keywords: dog, cat, mouse etc., so just enumerating the words, and then input some question examples. But obviously, it is not used to this structure and I was wondering if it was even possible to do it like that.


Solution

  • I am currently working on something similar (but I'm using GPT-J). One thing I find helpful is describing in the input what you want GPT to do.

    e.g.: I want to generate a sentence containing all given key-words:

    input:

    Generate a sentence which contains all of the keywords.
    Keywords: dog, cat, mouse
    Sentence: 
    

    output:

    Generate a sentence which contains all of the keywords.
    Keywords: dog, cat, mouse
    Sentence: I have a dog, a cat and a mouse.
    

    Let me know if this helps you, or if you find any other solutions which might help me as well!