Hey all,
What would be the best way to train a gpt model to converse in my tone, “talking” style, etc? I assume I would need to go down the fine tuned route. Would I train a model by having a small convo with GPT? Anything to be mindful when building my prompts? My ultimate goal would be to train a chatbot that talks in my tone/voice with knowledge my of domain. TIA
1 Like
You could probably get away with sending ChatGPT a huge list of your messages, or even have a natural conversation with it, and ask to extract any personality from your messages.
Then you could use these personality traits in your system message.
“You are a fun, but slightly sarcastic assistant that for some reason always thinks dinosaurs are the root cause of life’s problems.”
1 Like
Essentially you need to generate hundreds of examples of conversations where the user asks the AI questions and then the AI answers in your tone. Make a spreadsheet.
Then you fine-tune using that spreadsheet.
Caveats:
- There are a lot of details to get right about the spreadsheet. Link above.
- Hard to predict how many examples are needed or what the result will be.
1 Like
What do you mean by extract personality from it?
Thanks to refer clarify I’m a small business owner to I want to be to have conversations like me and my business.
For example, I asked ChatGPT to read this conversation and assume some things about me based on the limited information that it has:
What kind of personality can be found in RonaldGRuckus’ message?
It is difficult to infer specific personality traits based on a single message. However, based on the message provided by RonaldGRuckus, it seems that they are suggesting a practical solution to the problem of training a chatbot to converse in a specific user’s tone and style. They also provide an example of how this could be done, which could suggest a willingness to help and provide concrete solutions.
What kind of tone do they have?
Based on the message provided by RonaldGRuckus, it is difficult to infer their tone with certainty as the message is short and without any emotional cues. However, their message seems to be written in a matter-of-fact and helpful tone, which suggests a willingness to provide practical assistance to the user.
It may be less reliable than fine tuning, although I don’t think it would be. You would be able to use GPT3.5-turbo which would be roughly 20x cheaper than a fine-tuned Davinci model.
I’d say it’s always a good idea to try few-shot prompts first before diving into fine-tuning.
1 Like
ah I see @RonaldGRuckus thanks for the help
Please help me understand what a “system” message is. I have not yet delved deeply into the GPT4/Chat APIs - maybe it’s a new thing?
thanks @bill.french can you give me an example of what you mean by
" create a corpus of content that reflects your tone, your expertise, and the knowledge you hope to convey in such conversations."
Sure - have you written any white papers? Or documents about your domain of knowledge? I suspect there are vast numbers of emails and other content sources that you’ve written. These could be bound into a collection of “training” artifacts (PDFs, texts, etc) and pushed into CustomGPT just to see what happens. I suspect you’ll be excited to see how you sound when asking the chatbot about your knowledge.
ok, I see what you your saying. Thanks!
For any model that uses the ChatCompletion endpoint with ChatML format, there are 3 options for roles as of now: user, assistant, and system.
The system role is usually used as start-up instructions to set the environment. I also use it for context delivery & as a reminder of instructions such as “Don’t acknowledge this message”.
3 Likes
Excellent. It’s like script-level environment variables for chat apps. Very cool. Thx.
2 Likes
Hi, I would approach this by
- converting as much as possible of your text snippets into a neutral (information only) tone, sort of stripping your language style. This would give you the “common style denominator” format.
- Train a model to convert text from this “common style denominator” back to your style language.
Then when you need to “translate” style from one person to yours, you do it in two steps:
- You convert their text to neutral style first to keep the information only.
- You use your model to convert the neutral text into your tone.
Why? This way you avoid all the issues of the original tone messing up with your tone during the translation. And also it is easier to train a general model to strip style from any narrator to a common neutral style and then convert it to a specific tone, than training models to do conversion between many possible pairs of styles…
Let me know how it goes, interested in results.
As for the chat bot - make sure you understand the concept of fact embedding / retrieval (check my previous posts for details).
1 Like
Thanks @sergeliatko for the insight. This is a lot of unpack, mind providing an example of these setups? TIA
Give me an average sample (better 3 of those) of text in “your tone”.
“Hey Jone Doe, hope all is well, you helped us few years ago with a few electrical jobs… reaching out again as we are looking to get a setup for one of those portable generators. Wondering if you do that type of work?”
“Hey Victoria. We are actually going to cancel our services with you. Honestly, the cleaning that was done last time was not good quality… even without the good vacuum a lot was missed…thank you for you time”
“Hey Jone, I was doing laundry last night. I opened the washer mid cycle to add a shirt and sparks shot out of the side. Smelled burnt but no markings. Can we have it looked at just to verify it’s safe? Also, thought process led me to look and couldn’t find a fire extinguisher. If I’m missing it let me know, if not I’ll get one so one is in the apartment. Feel free to call if you want any further details or have questions”
These are random message from my iMessage. Let me know if helps
Check this in the playground, paste any text of yours and hit the “submit” button. It will rewrite your text in “neutral style”.
Then the fine tune .jsonl file for you would be formatted like this:
{“prompt”:“<|startoftext|>HERE_GOES_THE_NO_STYLE_TEXT<|endoftext|><|startbrandedtext|>”,“completion”:" HERE_GOES_YOUR_ORIGINAL_TEXT<|endoftext|>"}
So it will be:
{“prompt”:“<|startoftext|>I understand. Thank you for the assistance, @RonaldGRuckus.<|endoftext|><|startbrandedtext|>”,“completion”:" ah I see @RonaldGRuckus thanks for the help<|endoftext|>“}
{“prompt”:”<|startoftext|>thanks @bill.french can you give me an example of what you mean by\n" create a corpus of content that reflects your tone, your expertise, and the knowledge you hope to convey in such conversations."<|endoftext|><|startbrandedtext|>“,“completion”:” Thank you, @bill.french. Could you provide an example of what you mean by "create a corpus of content that reflects your tone, your expertise, and the knowledge you hope to convey in such conversations."<|endoftext|>"}
And so on separating each pair by a new line
3 Likes
Here follow the no style sample from the playground:
Hello Jone Doe, I hope you are doing well. You provided assistance with some electrical jobs a few years ago and I am reaching out again regarding a setup for one of those portable generators. Do you offer this type of service?
Hello Victoria. We have decided to cancel our services. Unfortunately, the cleaning that was done last time did not meet our expectations. Even without the use of a good vacuum, there were still areas that were missed. Thank you for your time.
Hello Jone, I was doing laundry last night and sparks shot out of the side of the washer when I opened it mid-cycle to add a shirt. It smelled burnt but there were no markings. Could we have it inspected to ensure it is safe? Additionally, I could not locate a fire extinguisher. If I am missing one, please let me know. Otherwise, I will purchase one for the apartment. Please do not hesitate to call if you need more information or have any questions.
Basically your goal is to use the playground link I gave you or API to generate as many samples as you can (at least 400). Then use the no style text paired with original text to generate the jsonl file for fine tuning a model to rewrite no style texts into your voice.
If you do not feel comfortable with API, it’s better/faster/cheaper to hire someone.
The bot is a whole different story… Need more details on what you need it do and how you’ll be using it to say anything meaningful on the subject.
BTW I’m the tech guy here: https://www.techspokes.com
This is very cool. Had never considered the complexities of building a multi tone bot.
I recommended a straight line from the stated requirement to something that probably works. I like to start simple.