Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Adding pre-amble when Fine Tuning Classification Model using Gemini API

While reading Gemini-API fine tuning (https://ai.google.dev/gemini-api/docs/model-tuning), there is this part that mention:

Adding a prompt or preamble to each example in your dataset can also help improve the performance of the tuned model. Note, if a prompt or preamble is included in your dataset, it should also be included in the prompt to the tuned model at inference time.

But the training data format is only a json array of objects consisting of text_input and output, e.g.:

training_data = [
{"text_input": "1", "output": "2"},
{"text_input": "3", "output": "4"},
{"text_input": "-3", "output": "-2"},
...
]
  1. In this case how do I enter the pre-amble? Any example is appreciated.
  2. This statement: 'if a prompt or preamble is included in your dataset, it should also be included in the prompt to the tuned model at inference time' does it means i have to provide this during every prompting? Will this cause the model trained to not be able to answer if there are items are not in my training data?

Thanks

0 1 149
1 REPLY 1