Digital Engine note · Saved from Facebook

uses Style Transfer, Few-Shot and LoRA for product description

A community post recording e-commerce product description experiments, from prompt words, example learning to LoRA fine-tuning, sorting out the cost and control of different methods.

Source note

This note preserves the original context of the Facebook post. Some tools, interfaces, and external links may have changed.

View the original posthttps://www.facebook.com/searchenginecommunity/posts/pfbid03b1Ti4fLervSLbAusz7JrTVQHchywTS74EZzRuzBftrh9veEwpRY2ZwbYaoZmcwml
Facebook post of product description experiment with image 1 Facebook post of product description experiment attached with picture 2 Facebook post of product description experiment attached with picture 3 Facebook post of product description experiment attached with image 4

This post records an experiment in e-commerce product description.

The goal is to input product images and produce product descriptions that match the tone of the brand.

Three different control methods

The most direct way is to describe the desired style and tone in the prompt words.

This method is the cheapest and easiest to start, but the abstract concept of “brand tone” is difficult to fully convey through words alone.

The second method is Few-Shot Prompting.

The method is to put multiple examples into the prompt words and let the model imitate the sentence patterns, word usage and narrative style from the examples.

Generally, the more examples there are, the easier it is for the model to capture the target style, but each execution must be accompanied by these examples, and the inference cost will also increase.

The third method is LoRA Fine-Tuning.

LoRA does not directly modify the entire base model, but instead trains an additional set of parameter layers to allow the model to produce stable changes in behavior on a specific task or style.

It requires a relatively tedious data preparation and training process, but after the training is completed, the Adapter Layers can be saved and reused later.

Experimental Observation

The original experiment used Everlane’s product information to fine-tune Llama 3.2 and compare the output before and after fine-tuning.

The prompt words in the post were fairly simple, but in the Zero-Shot scenario, there was a noticeable difference in the fine-tuned description.

The original post also attached a Google Colab example, allowing readers to load the fine-tuned LoRA model, read a product from the test data, and compare the responses before and after fine-tuning.

The value of this saved content is not just to show a certain model output, but to compare “prompt word control”, “example control” and “model fine-tuning” in the same experimental context.

In actual use, you should still recheck the correctness of the model version, training data, product information, and whether the brand allows the use of generative content.

Keep exploring

Related reading

Article

SEO e-Newsletter Issue 52 – 2022.03.01~2022.03.15

This e-newsletter has two specially recommended contents. The sixth demo video shows how to produce articles in a short time. It also comes with a Jin Yong content generator to give everyone a better understanding of the development of machine-produced content in the Chinese language. The other is the SEO winner website analysis video launched by Ahrefs, which analyzes how DoorDash’s website defeats its opponents and maintains victory in search.

Article

SEO e-Newsletter Issue 55 – 2022.04.16~2022.04.30

Happy Labor Day to everyone! There is nothing particularly novel in this issue, and several of them are related to AI-produced content. Although long-term readers of Digital Engine may find it repetitive, I hope you can take some time to read the sixth article about content SEO. It is suitable for reflection on what you are doing and the irreplaceability of these jobs in the next 3 to 5 years. Enjoy!

Article

SEO Newsletter Issues 70–71 – 2022.12.01–2022.12.31

Happy New Year, everyone! December brought more Google Search changes and announcements than I expected. With ChatGPT taking off, more people also realized that AI is not as far from maturity as we may have thought. The final two items—one exploring AI applications in SEO and another surveying what content marketers think about AI—are both fascinating.

Saved Facebook note

GPT Getting Started in SEO: An Early Application Checklist

organizes SEO use cases in the early days of ChatGPT’s popularization, from prompt words, technical SEO, content analysis to cross-language reading, retaining observations from the time when the tool ecology was just beginning to change.