I’m creating a tutorial on the OpenAI API/gpt-4. Back when the model of choice for text creation was text-davinci-003, it was common to use a “few shot” approach to improve results. This would involve adding one or more examples to the prompt.
Is “few shot” still considered good practice with gpt-4? And if so, should the examples go in the system object of messages array:
const messages = [{
role: 'system',
content: 'This is my instruction, and here are some examples of what I want.
###
Example 1,
###
example 2'
}]
Personally I keep the system prompt for persona definitions and global preferences, use Celsius, you are a helpful assistant, etc. I put my shots in the user prompt, you could try experimenting with the system prompt and see how that works for you though.
Thanks Foxabilo!
Just to clarify, when you say you put your shots in the user prompt do you mean you hard-code the start of the conversation and in the system prompt instruct the model to continue the conversation in the same style?
Or is your user prompt something like
{ role: 'user',
content: 'Write me a covering letter for a job with these criteria ${job_criteria} and make the letter similar in style to these examples:
###
example 1: ${example1}
###
example 2: ${example2}'
}