Skip to content

[Product AI] Might generate the AI product in the wrong language by caching a failed identifyLanguage result #15398

@iamgabrielma

Description

@iamgabrielma

Describe the bug
When generating an AI product, if the first call to identifyLanguage fails but the merchant taps on "Retry", the system will not call identifyLanguage again, as it would have succeeded (this is by design on the happy path), which seems to create language hallucination when creating the AI product.

Since is not a deterministic output, the issue might not happen, but I saw almost a 100% change on my end when I was very lacking on product name/description details.

To Reproduce
Steps to reproduce the behavior:

  1. With an AI-product creation supported store (atomic WPCOM or JP AI), go to Products, attempt to create one
  2. Before submitting for product generation, force an error on the identifyLanguage call
  3. On failure, tap retry and allow the system to generate the AI product
  4. Observe that (most?) of the time, the language doesn't seem to be correct.

Screenshots

Image

Expected behavior
To use the merchant's intended language. Perhaps the easier path is to add a selectable here as primary source/fallback, and not rely on the AI to identify it?

Mobile Environment
Please include:

  • Device:
  • iOS version:
  • WooCommerce iOS version:

WordPress Environment

``` Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin. ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions