PROMPT HELP - Text generation for ecommerce, product descriptions

Hello!

We are a team working in an ecommerce company. We have developed a tool to generate product texts in our sites (~15 sites in 5+ countries) where we have maybe 800+ products on most sites. To give a bit more context the industry is quite regulated so we need to comply to legal guidelines for a text to be ok (think Pharma for comparison). We were hoping to get your expert helps on how to improve the actual prompt, I will explain the steps we take a bit more and then past the prompt. Any support would be great!

------ STEPS ------

  • We import the product information from our Product Information Management (PIM) system with an API
  • We have a visual interface where you can see all input data and press “generate product text”
  • We send the prompt to GPT
    a. First a text is generated in a set structure
    b. Secondly the text is cleaned for legal reasons
  • We get the generated text back and have dedicated resources to proof read the output
    a. They grade how well the text worked so that we can improve the prompt untill we are fully satisfied
  • They edit the output in the interface and press “save” to send it back to the PIM and up on site automatically

------ OUR MAIN CONCERNS ARE ------

  • Getting GPT to write in a tone that is in line with the legal constraints while still not only restating the information in a boring way. We are testing the Temperature as input but still not getting it to nail it yet.
  • Getting it to not write any of the words listed in the “sensitive words” list (we are flagging them in the tool so the people proof reading can easily see them but still). Especially in German this is true where there are many conjugates of the same word, the list of forbidden words therefore becomes very long when we add all the conjugates and it still doesn’t work very well.

------ PROMPT (note that the data has been masked but you get the point) ------

I want you to pretend that you are an E-commerce SEO expert who writes product
descriptions for users looking to buy online. You are famous for always wrapping your output in the correct HTML-elements and working around “NO_VALUE_FOUND”

THIS IS THE PRODUCT YOU ARE CREATING A PRODUCT DESCRIPTION FOR:

  • NAME_LONG: PRODNAME
  • BRAND: BRANDNAME
  • FORMAT: FORMAT
  • MANUFACTURER: MANUFACTURER
  • PRODUCT_TYPE: PROD_TYPE
    … (Masking a bit here, maybe 15 more attributes)

Output 6 paragraphs with creative, SEO-friendly text and unique headers.

  1. : About PRODNAME
    The header and paragraph should be returned as the function argument segment_1

  2. : Characteristics for usage:
    Strength: STRENGTH
    Total number of uses: NO_USES
    The header and paragraph should be returned as the function argument segment_2

  3. Flavour: FLAVOUR1, FLAVOUR2, FLAVOUR1
    The header and paragraph should be returned as the function argument segment_3

  4. PRODNAME

  • Category: CATEGORY_NAME
  • Flavour: FLAVOUR1, FLAVOUR2, FLAVOUR1
  • Strength: STRENGTH
  • Uses: NO_USES
  • Manufacturer: MANUFACTURER_NAME
  1. More about: BRAND
    The header and paragraph should be returned as the function argument segment_5

  2. Output one short paragraph with the header Short description BRAND_NAME
    The header and paragraph should be returned as the function argument segment_short.

LANGUAGE SPECIFIC RULES:
Always use British English.
Output should be toned down and fact based.
Do not use inflected forms of the forbidden words.
Do not use synonyms of the forbidden words.
When describing the brand, do not embellish, glorify or talk about it in any way that is not fact based.

GLOBAL RULES:
Output HTML-elements.
The header parameters must always be surrounded by the specified header HTML element, for example h3 or h4.
The paragraph parameters must always be an HTML p element or if specified, an ul.
When writing lists of flavors, filter out any duplicate values.
If you see the word “NO_VALUE_FOUND”, this means we couldn’t provide you with a value and you should remove “NO_VALUE_FOUND” and adjust the text so it makes sense.
Don’t surround what you write in quotes like " or ’ unless they are included in the original prompt.

ALIGN TO THESE RULES:

  1. Don’t mention health or health benefits.
  2. The language in the output should be formal, professional, and informative.
  3. The output should not contain value judgments.
  4. Only describe flavours in a neutral way.
  5. Do not use mild, organic, light, or low words.

EXCLUDE THESE WORDS FROM THE OUTPUT:
EXCELLENT, BETTER, SATIFY, SENSATIONAL, DELICIOUS, GREAT, CONVENIENT, EXQUISIT, FULFILLING, BOOST, ENJOY, NEEDS, UNIQUE, FRESHNESS, REFRESHING, LIGHT, COOL, REGRET, MOUTH-WATERING, PASSION, PLEASEANT, PERFECT, FRESH, QUALITY, PUNSCH, EPIC, CRAVING, SMOOTH, EXCITING, SAFE, MILD, AMAZING, SAFER, MAGIC, POPULAR, IMPACT, USERS, NATURAL, CLEAN, LOW, TRENDY, IDEAL, JUICY, FIX, SATISFY, NEWCOMER

The primary purpose of these instructions is for you to develop new and unique keyword-rich,
informative product summaries/descriptions with a formal and professional tone.

------ END OF PROMPT ------

1 Like

** Getting it to not write any of the words listed in the “sensitive words” list (we are flagging them in the tool so the people proof reading can easily see them but still). Especially in German this is true where there are many conjugates of the same word, the list of forbidden words therefore becomes very long when we add all the conjugates and it still doesn’t work very well.*

I was able to achieve this by moving the word information from the user prompt to the system prompt:
"You play the role of a copywriter writing product descriptions for a certain company. The company has commissioned you to write a description without using the following words in any grammatical form:
EXCELLENT, BETTER, SATIFY, SENSATIONAL, DELICIOUS, GREAT, CONVENIENT, EXQUISIT, FULFILLING, BOOST, ENJOY, NEEDS, UNIQUE, FRESHNESS, REFRESHING, LIGHT, COOL, REGRET, MOUTH-WATERING, PASSION, PLEASEANT, PERFECT, FRESH, QUALITY, PUNSCH, EPIC, CRAVING, SMOOTH, EXCITING, SAFE, MILD, AMAZING, SAFER, MAGIC, POPULAR, IMPACT, USERS, NATURAL, CLEAN, LOW, TRENDY, IDEAL, JUICY, FIX, SATISFY, NEWCOMER

IF YOU USE ANY OF THE ABOVE WORDS YOU MAY EVEN LOSE YOUR JOB."

I tested in Polish. This can always be a clue for you :slight_smile:

Temperature: 0.5, Top P: 1, Frequency penalty: 0.5, Presence penalty: 0.75

1 Like

You can also try in the system prompt: “Communicate in the tone and style of [service name].” or “write in the tone and style used in the following example: [your example].”

1 Like

Because of the length and complexity of what you want done - it may be smarter to put this in 2 - 3 separate GPT calls for more consistent results.

Might iterate on the “you are famous for”

What are the correct html-elements? If you want it to wrap in a div with an h1 and p tag say that specifically.

Maybe use 3-6 GPT calls for each

Okay I see this is where you’re defining the HTML

I would refactor the prompt to something like this:


Objective: Create SEO-optimised, informative product descriptions for e-commerce.

Product Details:
(assuming you’re getting this from your front end)

  • Name: PRODNAME
  • Brand: BRANDNAME
  • Format: FORMAT
  • Manufacturer: MANUFACTURER
  • Product Type: PROD_TYPE
  • … (Additional attributes)

Content Breakdown:

  1. Segment_1
  • Header: About PRODNAME
  • Content: One paragraph.
  1. Segment_2
  • Header: Characteristics for usage
  • Content:
    • Strength: STRENGTH
    • Total number of uses: NO_USES
  1. Segment_3
  • Header: Flavour Profile
  • Content: FLAVOUR1, FLAVOUR2 (Note: Filter duplicates)
  1. Segment_5
  • Header: PRODNAME Overview
  • Content:
    • Category: CATEGORY_NAME
    • Flavour: FLAVOUR1, FLAVOUR2
    • Strength: STRENGTH
    • Uses: NO_USES
    • Manufacturer: MANUFACTURER_NAME
    • More about: BRAND
  1. Segment_short
  • Header: Short description BRANDNAME
  • Content: One short paragraph.

Language & Formatting Guidelines:

  • Use British English.
  • Neutral, factual tone.
  • Use headers (e.g., h3, h4) and paragraphs (e.g., p, ul) HTML tags.
  • Remove and adjust any instances of “NO_VALUE_FOUND”.
  • Avoid quotes unless provided in the original prompt.

Prohibited Content & Words:

  • Avoid discussing health or health benefits.
  • Avoid embellishing or glorifying brands.
  • Avoid the words listed in the ‘EXCLUDE’ list.
  • Maintain a formal, professional, and informative style.

Like I said - you can also try breaking up this call into several calls and see if it yields better results. But ultimately what works works, if it ain’t broke don’t fix it.

Edit: Another thing you can do is request that it respond in a JSON format, and then you can stringify it on the request from the front end and display it how you see fit, gives more flexibility.

1 Like

Json will be messed up, once I tried to generate a schema in Json on the API it was a problem with deserializing the response (bad syntax)

Menciona detalladamente al menos 3 dimensiones de la afectividad, y de qué manera estas se relacionan con la sexualidad
humana.

You can do it if you set the temperature to 0-0.1 on the JSON calls. If you put the temperature too high it won’t do it.

Something like: Always respond in the following JSON format: and then define the json with 0 temp parameter and it should work.

1 Like

Thank you everyone for your input! We will try it out tomorrow and see what works - will report back.

Just what about the rest of the solution, which we don’t necessarily want it to be “rigid” because a temperature of 0.1 is unlikely to work for most tasks

You’d have to get creative. I would maybe put the responses that make sense to be JSON as JSON and then have a GPT call where you need it to be more creative seperately.

1 Like