Finetuning for writing emails in my style


I write an initial and always (relatively) the same first mail to potential customers.

I want to fine-tune the model to respond to the customers’ replies to this mail the way I would formulate a reply.

To do this, I would like to use reply mails that I have formulated by hand as training data.

What should the training material for fine-tuning look like?

Should I include my initial mail in the prompt? Or should the prompt only contain the customer mail and the completion my perfect answer?

Should I include or omit greetings, headers, etc.?

Best regards

Welcome to the community!

If the original email fits, I would put it as the PROMPT and your reply as the OUTPUT…

Personally, I would include everything.

Hope this helps. Let us know if you have further questions…

1 Like

Thanks for the welcome.

Just to be sure, do you mean it as follows?

{“prompt”:“<“initial email” + “customer response incl. Outlook header”>”, “completion”:“<“perfect response written by me”>”}

and in a second step, for the next reply of the customer

{“prompt”:“<“initial email” + “customer response incl. Outlook header” + “perfect response written by me incl. Outlook header” + “2nd customer response incl. Outlook header”>”, “completion”:“<“2 nd perfect response written by me”>”}

Hello Paul, I wanted to politely ask if you forgot about me.

It looks fine to me. Have you tested yourself?

The code works. The finetuning job itself has not been started yet, as I still need to prepare the content.

hey @JohnMichaels curious to hear how this turned out and learnings you can provide?

hey. sorry for the late reply.
I don’t think fine-tuning is a good idea. I also left the original path and made an office extension based on OpenAI GPT that helps creating answers or texts, even from your own and most importantly local database (without pinecone or weaviate, etc).
You can download it here:

offering an alternative (for future folks who read this):

Try using the gpt-3.5-16k model and do “few shot” prompting: meaning you place three related examples in with your prompt and ask the model to use the examples for context. It might be interesting to test the difference between this method and fine-tuning.

One of the benefits here is you could take it a step further by saving your emails to a vector database like Pinecone or even just a regular postgres database with pg_vector and do a cosine similarity search (super easy) with your prompt to get the 3 most-related emails to use as your “few shots.”

We have a SOLR upgrade project on our hands, and considering your expertise in the previous configuration in WK in the year of 2016, I believe your support would be invaluable.

I’d like to discuss the details further and get your insights on our upgrade proposal. Could we schedule a call at your earliest convenience? Please let me know your preferred time.

I would include only emails you want to replicate. Some may be related to very specific instances where you had to make unique replies that only apply to one individual email that you don’t want to accidentally introduce as a general behavior.