Fine tuning gpt4 mini, am I on the right track

Hi, I’m using fine tuning, and it is working, but it feels like I’m doing it wrong, essentially I have a list of hobbies (100’s), like cycling, running, mountain climbing, attached to each of these is a identifier code.

When the user submits a summary of there hobbies like.

“I like to go jogging, and I ride mountain bikes and go hiking in the mountains in summer. Please list my hobbies”

the response should be something like

“running (5548), cycling (5655), mountain climbing (5569) as an example response”

This actually works if I create a fine tuning model jsonl like this.

I’m looking to learn if I’m on the right track with this, or I have produced rubbish and its not the right way.

{"messages":[{"role":"system","content":"The person indicates they like cycling"},{"role":"user","content":"Identify hobbies in this applicant summary, specifically cycling"},{"role":"assistant","content":"The identifier for cycling is 5655"}]}
{"messages":[{"role":"system","content":"The person indicates they like mountain climbing"},{"role":"user","content":"Identify hobbies in this applicant summary, specifically rock climbing"},{"role":"assistant","content":"The identifier for mountain climbing is 5569"}]}
{"messages":[{"role":"system","content":"The person indicates they like running"},{"role":"user","content":"Identify hobbies in this applicant summary, specifically running"},{"role":"assistant","content":"The identifier for running is 5548"}]}

1 Like

I would say it depends :slight_smile:

If you are including both the hobbies and the identifier code always as part of the system message (not only for training but also when consuming the fine-tuned model), then the model should be able to reliably complete the task. However, bear in mind that the fine-tuned model does not actually learn facts. So the moment you leave out the identifier code for example, it will not be able to recall this information and will most likely just hallucinate a number.

If I was in your shoes, I’d probably split the the steps. Use the fine-tuned model for the hobby identification and then programmatically add the identifier code based on the list of identified hobbies.

Finally, given the nature of the task, you may not actually need to fine-tuned model for the hobby identification as it is not too complex of a task. A well-phrased prompt might do the trick here.

Yeah it feels like I’m doing an advanced vlookup really, and I guess that’s what it is,

I was using the file_search and providing a JSON of hobbies, but found I had to do 2 steps for it to be reliable, firstly asking for a list of hobbies, THEN in a 2nd new thread asking for it to match these to the assistant file and provide the identifiers.

If I did it all in one thread, it hallucinated, but its reasonably reliable in 2 threads. Then I saw they launched fine tuning for gpt4 mini, so having a play with that and does seem a lot better.

We do have a pretty comprehensive source list, and do know if we get back an invalid or bad identifier, and indicate that as “dont know”

1 Like