Hello everyone,
I am currently struggling with designing few-shot prompt using the chat completion API. I’ve tired searching for information everywhere I could, including the OpenAI developer forum, the OpenAI cookbook, and the OpenAI help center. Unfortunately, it seems like clear instructions or tutorails are scarce.
The only resource somewhat worth referring to is the few-shot prompting example from this tutorial how_to_format_inputs_to_chatgpt_models
Following this example, I constructed my own prompt as below:
{
‘model’: ‘gpt-3.5-turbo-0125’,
‘messages’: [
{
‘role’: ‘system’,
‘name’: ‘example_user’,
‘content’: ‘Google Maps and other highway and street GPS services have replaced what? Answer Choices: A. united states, B. mexico, C. countryside, D. atlas. The answer is D. Because’
},
{’
role’: ‘system’,
‘name’: ‘example_assistant’,
‘content’: ‘the answer must be something that used to do what Google Maps and GPS services do, which is to give directions. Of the above choices, only atlases are used to give directions.’
},
{’
role’: ‘system’,
‘name’: ‘example_user’,
‘content’: ‘The man laid on the soft moss and looked up at the trees, where was the man? Answer Choices: A. niagra falls, B. forest, C. waterfall, D. ground, E. tree. The answer is B. Because’
},
{
‘role’: ‘system’,
‘name’: ‘example_assistant’,
‘content’: ‘the answer must be a place where the man is laying down and looking up at trees. Of the above choices, only forest is a place where people lay down and look at trees.’
},
{
‘role’: ‘user’,
‘content’: ‘If you’re speaking to a lawyer about getting a divorce, what relationship status are you trying to end? Answer Choices: A. being married, B. sisters, C. marriage, D. two people, E. lawyer. The answer is A. Because’
}
],
‘max_tokens’: 300,
‘n’: 4,
‘temperature’: 0.7
}
Brefliy speaking, what I am seeking is for the model to return just an explanatin similar to what I provided in the few-shot examples. The output should follow the template in the answer, specifically continuing with “Because” in the content and providing “some reasonable explanation”.
However, the answer will be like “The correct answer is A. "being married" is the relationship status that someone is trying to end when speaking to a lawyer about getting a divorce.”
Have I missed something? Any feedback would be greatly appreciated.