生成資料
前言
現在的 AI(例如 ChatGPT)不但能聊天,而且根據我們給的指令,自動產生有用的資料。
本篇目標
教 AI 寫句子:我只要下指令,它就幫我做好
大型語言模型(像 ChatGPT 這樣的 AI)很擅長產生有條理、通順的文字。只要我們給它正確的指令(這稱為「提示詞」或「提示設計」),它就能寫出更準確、更有邏輯的內容。這類 AI 還能幫我們產生一些資料,像是測試用的範例,讓我們可以用來做實驗或訓練其他系統。舉例來說,我們可以叫它幫忙寫幾句有情緒的句子,像這樣來訓練一個判斷情緒的程式,接下來會有例子、說明或內容,依照下方的內容來看。
Prompt:
Produce 10 exemplars for sentiment analysis. Examples are categorized as either positive or negative. Produce 2 negative examples and 8 positive examples. Use this format for the examples:
Q: <sentence>
A: <sentiment>
以下是藉由
-
Chatgpt 4o 模型
-
Gemini 2.5 Flash 模型進行回答問題、
回答問題
Q: I absolutely loved the movie—it was inspiring and beautifully filmed.
A: positive
Q: The staff at the hotel were incredibly helpful and kind during my stay.
A: positive
Q: This new phone is fast, sleek, and has an amazing camera.
A: positive
Q: The concert exceeded all my expectations—it was an unforgettable night!
A: positive
Q: I had a wonderful time with my family on our weekend getaway.
A: positive
Q: The book was well-written and kept me hooked from start to finish.
A: positive
Q: The customer service representative solved my issue quickly and politely.
A: positive
Q: Their presentation was engaging, informative, and very well organized.
A: positive
Q: The food was cold, bland, and definitely not worth the price.
A: negative
Q: I waited over an hour and still didn’t get the help I needed.
A: negative
Q: This movie was an absolute waste of time.
A: Negative
Q: I’m so disappointed with the customer service I received.
A: Negative
Q: The food at that restaurant was absolutely delicious!
A: Positive
Q: I had such a wonderful experience on my vacation.
A: Positive
Q: This new software is incredibly user-friendly and efficient.
A: Positive
Q: What a fantastic performance by the band!
A: Positive
Q: I really appreciate all your help with this project.
A: Positive
Q: The weather today is just perfect for a walk.
A: Positive
Q: I’m so happy with my purchase, it exceeded my expectations.
A: Positive
Q: This book was truly inspiring and thought-provoking.
A: Positive
這非常有用。實際上,我們在指南的另一部分將此示例用於不同的測試。
References
目錄 : Applications - 大型語言模型應用和指南
上一篇 : Applications - 大型語言模型的上下文快取
下一篇 : Applications - 為RAG生成合成資料集