I’m generating short product descriptions in bulk (one at a time using the API) .
They are pulled through into search results on category pages on my ecomm website, much like google’s results.
The problem I have is that GPT will often use similar words or phrases in the descriptions that are very noticeable when they are displayed on the same results page together. Repetitive.
I’ve tried playing with the temperature setting and changing the prompt.
How do you get the API to vary it’s language in this situation, when it doesn’t ‘know’ what it generated in the previous responses?
I’ve tried a temperature from 0.2 up to 0.7. I’ve also tried adding:
“Use creativity and a thesaurus.”
Here’s the settings I use for the API and the prompt:
$messages = [
[
“role” => “system”,
“content” => “You are an expert in $category and a professional in this space.”
],
[
“role” => “user”,
“content” => $query
]
];
And here’s the prompt that is generating the repetitive text:
(I give it the product description page to work from).
$category is the product category eg. treadmills
$queryText is the product page
=========================
From information below ‘Here is the text’, and what you already know about $category, extract the requested values into the tags shown.
You are a professional an expert in $category, provide detailed information and expertly written text.
Ensure that no field is left blank.
Remember that the webpage is about $category and the text should relate to that.
Strictly don’t say For added convenience, or individuals.
Strictly refer to users as something appropriate to this niche eg users, runners or just people.
Strictly UK spelling.
15-20 words covering the best things about this product. Use creativity and a thesaurus.
Temp that low (even .7) will tend to repeat a lot. Try bumping it to 1.0… Anything above 1 gets too wishy-washy usually, but 1.0 should give you more variety.
I’d add a lot more details here. Ask ChatGPT to flesh it out, after explaining you want a better message to explain to an LLM…
Ah ok thanks. I thought this was just a brief message stating the ‘persona’ you want GPT to adopt. Is there a resource I can read more about how to improve this bit?
You need to diversify the descriptions so they don’t appear to be generated by the same AI? Don’t have them generated by the same AI!
Use different AI models that are capable of performing the task. They will write differently
Have a random selection or subset rewritten by another API AI.
mix up the instructive or rewriting prompt randomly
rewrite in batches so that the AI can diversify within a set of outputs
more imagination goes here
You can also have less predictive but yet controlled output when combining a higher temperature with a reduced top-p. Something like temperature:1.6, top_p: 0.9.
My reply rewritten at temp 1.6, top_p 0.9 by gpt-3.5-turbo
Want to make your descriptions more diverse? Here are some suggestions:
Use different AI models: Switch up the AI models you use for generating descriptions. Each model has its own writing style, so this will help add variety.
Get a second opinion: After selecting a random description, have it rewritten by another API AI. This will further enhance the diversity of your content.
Mix it up: Randomly vary the instructive or rewriting prompts you provide to the AI. This will encourage different approaches and styles in the generated descriptions.
Batch rewriting: Rewrite descriptions in batches to allow the AI to diversify its outputs within each set. This can help avoid repetitiveness and foster creativity.
Let your imagination run wild: Don’t be afraid to explore other creative techniques to inject more diversity into your descriptions.
For a balance between predictability and controlled output, try combining a higher temperature (e.g., 1.6) with a reduced top-p (e.g., 0.9). This can help achieve more controlled yet less predictable results.
I got this error too. Even when increasing top_1 and temp back up to 1 it was still generating same message 10 times in a row. Was so weird. I decided to create a new assistant with same settings and the problem dissapeared.