I just want to be sure if I write the prompt correctly. In a text which includes a journal's title, abstract and keyword information, I want to extract only the names of the ML/AI methods used/proposed for the problem. You can see the code snippet below where test_text is the text which I read from a txt file. I used ### as mentioned in best practices (https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api).
response2 = openai.Completion.create(
model=“text-davinci-003”,
prompt=“Extract the specific names of used artificial intelligence methods or machine learning methods by using commas from the following text. Text:###{” + str(test_text) + “}### \nA:”,
temperature=0,
max_tokens=100,
top_p=1,
frequency_penalty=0.0,
presence_penalty=0.0,
stop=[“\n”]
)
The sample result I got is as follows: Bounding box algorithm, Faster R-CNN, Artificial intelligence, Machine learning, Python.
I tried changing the structure of the prompt (for example instead of "...names of used...", I tried "...names of proposed...") so that the meaning of the sentence remains the same, but the results are almost the same. As you can see, irrelevant results also return.
- Do you think is the above prompt correct to extract AI/ML methods used in the journal?
- How can I update the prompt to get more accurate and robust results?
- In addition, do you think that are “###” and “+” usages, etc. correct?
Thank you so much.