How can I tune my model or fine-tune the dataset used?

This is the data format I used when training the davinci model. However, after fine-tuning, ingredients and directions will appear repeatedly until the maximum length is reached. There will also be data such as nutrients and cooking time that I did not put in the data set. How can I solve these problems?

Prompt:
fresh peaches, white sugar, brown sugar, ground cinnamon, ground nutmeg, fresh lemon juice, cornstarch, all-purpose flour, baking powder, salt, unsalted butter, boiling water

Completion:
Fresh Southern Peach Cobbler

Ingredients:
8 fresh peaches - peeled, pitted and sliced into thin wedges
¼ cup white sugar
¼ cup brown sugar
¼ teaspoon ground cinnamon
⅛ teaspoon ground nutmeg
1 teaspoon fresh lemon juice
2 teaspoons cornstarch
1 cup all-purpose flour
¼ cup white sugar
¼ cup brown sugar
1 teaspoon baking powder
½ teaspoon salt
6 tablespoons unsalted butter, chilled and cut into small pieces
¼ cup boiling water

Directions

  1. Preheat oven to 425 degrees F (220 degrees C).
  2. In a large bowl, combine peaches, 1/4 cup white sugar, 1/4 cup brown sugar, 1/4 teaspoon cinnamon, nutmeg, lemon juice, and cornstarch. Toss to coat evenly, and pour into a 2 quart baking dish. Bake in preheated oven for 10 minutes.
  3. Meanwhile, in a large bowl, combine flour, 1/4 cup white sugar, 1/4 cup brown sugar, baking powder, and salt. Blend in butter with your fingertips, or a pastry blender, until mixture resembles coarse meal. Stir in water until just combined.
  4. Remove peaches from oven, and drop spoonfuls of topping over them. Sprinkle entire cobbler with the sugar and cinnamon mixture. Bake until topping is golden, about 30 minutes.

You can stop it repeating (or continuing in your case) by including the Stop setting when you call GPT

You will need to include a unique piece of text at the end of each completion in your training file
You could use the uppercase word END or you could use \n\n###\n\n (or similar)

Then your stop value with be “END” or “\n\n###\n\n”

The end text will not be returned and the AI will stop when it sees it

Regarding the ingredients changing and recipes in general: I would not use GPT for recipes. It makes things up and embellishes by using its predictive text algorithm. You could easily create something that tastes bad or (possibly) makes you sick.

You could try changing the temperature to a really low value (0 to 0.1). You could also try setting top_p to a high value (0.8+). This would stop it being creative. But if the question is not a direct match for the prompt you used in training, it may still make things up

Hope that helps