Note 5— Prompt Engineering for Developer
Analyzing Input Content
For the content, this could be extraction of labels or name, understanding of the sentiment of the text.
The Method we used to understand the content
We need to train each model separately to approach the function under Machine Learning Methodology:
Collecting label dataset → Traning model → Deploying model on cloud
=> Cons: It takes abundant of time to train models and to collect dataset.
However, one of the advantage of LLM is to utilize a prompt and go with it right away!
Let get into an example to show what we’re talking about:
Example 1 — sentiment of the text
There is a review of a lamp. We are the sellers of the product, and we would like to know and simplify client’s review.
- Sentiment:
- Emotions:
- Whether the user shows the negative emotion in the review?
Example 2 — Information Extraction:
We use the same review in Example 1, and need it to be extracted important information, so that merchant can know their products. Lastly, the output should be formatted for applying analysis.
Example 3 — Inferring a Story
In Example 3, it may list all the categories we need, and categorize the story. Finally, we use Python to collect dataset:
In the above example, it calls “Zero-Shot Learning.” In other words, Zero-shot learning won’t have any sample for the model. We will discuss this topic in future post. Stay in tune.
GitHub: MarsWangyang (Mars Wang) (github.com)
LinkedIn: Meng-Yang (Mars) Wang | LinkedIn