woocommerce / woocommerce-android

WooCommerce Android app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
277 stars 135 forks source link

[Product Creation AI] Improvements to AI prompt and UI #10653

Open selanthiraiyan opened 9 months ago

selanthiraiyan commented 9 months ago

We made a few improvements to product creation AI in iOS. https://github.com/woocommerce/woocommerce-ios/pull/11853

Logging this issue to make the same changes/improvements in Android.

Prompt

  1. Removed newline characters and empty spaces added for human readability and use a dictionary and JSON encoding to create the prompt.
  2. Added the following sentence to the prompt asking to send only JSON and nothing else.
    • “Your response should be in JSON format and don’t send anything extra.”
  3. Update the wording in the prompt to mention the ISO language code clearly.

UI

  1. Make description a required field in response and show error alert if the description cannot be parsed from the AI response. This allows the user to retry from the alert.
  2. Use the user entered product name if no product name is returned from AI.
  3. Hide the short description field if short description returned from AI is empty.

Language detection

  1. Cache the identified language and reuse upon retrying after facing error.
peril-woocommerce[bot] commented 9 months ago
Fails
:no_entry_sign: Please add a feature label to this issue. e.g. 'feature: stats'

Generated by :no_entry_sign: dangerJS