I’m trying to fine-tune GPT 4.o with a 400+ row dataset of my social media posts. The idea is to train it on my ton of voice for future posts.
I read in the documentation that for each row I would need to add content for the system, which is ok because it’s always the same context for all posts.
However, I also need to add content for the user for each post, which in my understanding means writing what would have been a prompt to output the corresponding post for each post, which is not very convenient/feasible.
Why is it not feasible? Because of the associated workload?
One way to approach it would be to reverse engineer the input, i.e. the content for the user message. That is, you could create a few examples of what your prompt would normally look like. You then use few shot prompting to create similar prompts/user messages for your all your other social media posts that you intend to include in your fine-tuning data set.
For the latter you can ask the model to write you a Python script so the process is fully automated if you don’t have coding skills yourself or don’t have someone who can assist you with it.
Yes I’v thought of this : asking GPT to write the prompt based on the output, that’s what you mean correct?
As I’m not an engineer, I would do that with no code tools and API calls. However, it seems quite costly in terms of API calls, especially with a large database, right?
So I’m wondering if that input is mandatory so the fine-tuning works well. I have read in another post that leaving this field blank is also a good option. But again I’m not an expert, so wanted to understand the pros and cons of this.
For your case, you may not necessarily need that many training examples. You can fine-tune for language and get decent results back with as little as 50-100 good examples. I would use that as a starting point and then see how the model performs.
I have not tried this technique myself so can’t directly comment on it. What type of instructions / context do you currently have in your system message? Somewhere you need to provide instructions on what the blog post is about etc. Where is that currently included in your content?
For the system, in each database row I have “You are a world-class Linkedin content writer and your role is to write Linkedin posts for me. All your posts need to be punchy and straight-to-the-point.”
I’m having trouble understanding what should go in the user content and the system content to be honest. For example the sentence “all your posts…”
Well, assuming that every post should address a different topic, you need to include somewhere what that topic should be and, ideally, provide some contextual information that the model should use in writing the post.
Normally, you would include this information in the user message.
Your system message is basically fine as is (you can exclude the part “for me”). However, you definitely need to include the info on what the model should write the post about