2023年12月26日 星期二

大型語言模型整合到工作流程 1/2/2024

學習單元 AI Workshop: Transforming

學習單元 AI  Workshop: Expanding


對於大型語言模型(例如ChatGPT),它具有執行多種任務的能力,包括翻譯、語氣轉換、格式轉換、拼寫檢查和語法校對。這種方法展示了這些模型在不同應用領域的多樣性和實用性。

以下是所涵蓋的任務的摘要:

翻譯:

  • 展示了模型將一種語言的文本翻譯成另一種語言的能力,包括同時進行多種翻譯。
  • 展示了模型如何處理西班牙語等語言中的正式和非正式翻譯。

通用翻譯器:

  • 通過識別用戶消息中的語言並將其翻譯成英語和韓語,開發了一個通用翻譯器。

語氣轉換:

  • 展示了模型將非正式語言/俚語轉換為正式商業交流的能力。

拼寫檢查和語法校對:

  • 利用模型的能力,校對和修正了存在語法和拼寫錯誤的句子,提高了文本品質。


總的來說,這展示了大型語言模型如何能夠整合到各種工作流程中,以提高多種語言相關任務的效率和準確性。

您詳盡的探索為我們清晰地展示了這些模型可以如何應用於各種工作流程中,以提高效率和準確性,從翻譯服務到內容格式化,再到提升書面溝通的品質,這些模型都能發揮重要作用。

2023年12月19日 星期二

運用AI探索「推論」的技巧 12/26

讓我們一同運用AI探索「推論」的世界!在接下來的12/26課程中,我們將探索從課程例題中得出結論的藝術,以及將調查報告翻譯成繁體中文。通過評估回饋感受、分析情感色彩和辨識任務中的關鍵要素,深入理解推論的精髓。加入我們,體驗引人入勝的推論技巧,將語言能力與批判性思維融合,開啟一場充滿探索與驚艷的旅程!

學習單元 AI Workshop: Inferring 1

學習單元 AI  Workshop: Inferring 2

 請攜帶你的手機,平板,或是筆電。(螢幕大會比較好用,不過手機也可以)

2023年12月14日 星期四

引領科技探索就在 12/19

踏入探索與發現的世界!加入我們的課堂,與AI一同探索,幫助你摘要、推論和發掘新觀點。激發你的好奇心,拓寬你的視野,讓我們一起投入豐富的討論與學習體驗。準備好發掘資訊與洞察力的無限力量。別錯過-成為我們課堂中精彩旅程的一部分!

學習單元 AI Workshop: Summarizing

學習單元 AI  Workshop: Inferring

 請攜帶你的手機,平板,或是筆電。(螢幕大會比較好用,不過手機也可以)


2023年12月11日 星期一

提示撰寫實用指南

 

原則一:撰寫清晰具體的指示

  • 使用定界符標示不同部分:

    • 使用三個反引號等定界符清楚地標示出要求模型總結、解析或執行任務的特定文本部分。
    • 可使用各種標點符號或標記(如引號、XML 標記、章節標題等),使模型明確辨識不同部分。
    • 問題: 如果先輸入一段長文,產生一篇摘要,再要求翻譯為繁體中文。
  • 可要求結構化輸出:

    • 請求以結構化格式(如 HTML 或 JSON)提供輸出,便於解析模型的輸出結果。例如訂單格式
  • 驗證條件是否符合:

    • 當任務存在假設但可能未滿足時,讓模型首先驗證這些假設。(例如使用 IF 來檢測條件)
    • 考慮邊際案例及模型應如何處理,以避免意外錯誤或結果。
  • 少量示範:

    • 在要求模型執行特定任務之前,先提供該任務成功執行的少量範例,讓模型獲得參考。
    • 問題: 例如描述月亮之美時,如何生成你要的文字風格。
    • 答案: 你可以給予一小段"村上春樹"文字或是"李白"文字作為提示。

原則二:給予模型思考時間

  • 明確步驟要求完成任務:

    • 提供明確步驟,引導模型完成複雜任務,並確保其有足夠時間進行推理。
  • 引導模型推理:

    • 指示模型在得出結論前進行推理,避免倉促或錯誤的結論。
  • 限制模型幻覺:

    • 降低模型幻覺的風險,例如要求模型找出相關引文並據此回答問題,以追溯答案來源。

2023年12月10日 星期日

Prompting as a process

提示(Prompt)撰寫其實是一個逐步修正的過程,不要期待第一次就上手

  1. 迭代式提示開發: 創建有效的提示通常需要多次迭代。初始提示可能無法完全符合預期的結果。因此,根據初始輸出對提示進行精煉至關重要。


  2. 清晰和具體: 在提示的指令中清晰和具體很重要。無論是字數、句子結構還是特定所需的詳細資訊,都提供清晰的指導對於模型獲得更準確的結果至關重要。


  3. 調整提示: 如果初始輸出不符合期望(例如,長度過長或缺少特定資訊),則需要修改指令。這可能涉及調整字數、添加或更改特定細節,或改變輸出的焦點。


  4. 複雜的提示: 隨著時間的推移,隨著迭代的進行,提示可能變得更加詳細和複雜。這種複雜性可能包括格式要求(如HTML輸出)或要求特定的數據安排(如表格)。


  5. 應用軟體的成熟度: 隨著應用的成熟,對提示進行評估,應對較大量的示例進行評估變得至關重要,以確保在不同的輸入下具有一致且準確的性能。


  6. 整體而言,透過迭代方法開發提示,從單一示例開始,逐步根據輸出精煉指令,有助於為利用LLM的各種應用程式打造有效的提示。


Example: Test of comprehension 

Version 1: Generate the problems

Prepare 10 multiple choice problems from the paste text above to test comprehension.

  1. Shani Dhanda's activism primarily focuses on:
    A) Raising awareness for mental health issues
    B) Advocating for environmental sustainability
    C) Promoting cultural diversity
    D) Advocating for the rights of people with disabilities
    What year did Shani Dhanda organize the first event supporting disabled individuals and South Asian women?
    A) 2018
    B) 2019
    C) 2020
    D) 2021
    What medical condition does Shani Dhanda have?
    A) Rare genetic disorder
    B) Brittle Bone Disease
    C) Chronic fatigue syndrome
    D) Muscular dystrophy
    The "Diversability Card" app created by Shani Dhanda aims to provide:
    A) Social media networking for disabled individuals
    B) Travel guidance for people with disabilities
    C) Restaurant ratings and food delivery services
    D) Discounts for people with disabilities
    Shani Dhanda's vision for the future primarily revolves around:
    A) Global entrepreneurship programs
    B) Financial independence for disabled individuals
    C) Reducing carbon emissions
    D) Increasing government funding for disability services


Version 2: Making it more interactive

Prepare 10 multiple choice problems from the paste text above to test comprehension. Generate one problem at a time. Then you request an answer. Then generate next problem.

Version 3 Adding the grading 

Prepare 10 multiple choice problems from the paste text above to test comprehension. Generate one problem at a time. Then you request an answer. After you receive one, grade it. Then generate next problem. 

Version 4 Calculating the total score

Prepare 10 multiple choice problems from the paste text above to test comprehension. Generate one problem at a time. Then you request an answer. After you receive one, grade it. Then generate next problem. In the end, tell me out of the 10 questions above, how many questions are correctly answered?


Example: Test of vocabulary

Version 1 Generate the problems

Based on the vocabulary: (Exoskeleton, Myoelectric, Sensors, Hydraulic, Cylinder, Prosthesis, Rehabilitation, Paralysis, Spinal cord, Neural),  prepare 5 fill the blank quiz questions. 

  1. The ___________ system in robotics uses electrical signals generated by muscle contractions to control artificial limbs or devices.
  2. Sensors integrated into exoskeletons enable the detection of motion and force, allowing for precise ___________ control in assisting movements.
  3. A ___________ cylinder is a mechanical device that uses fluid power to perform various tasks, often employed in advanced prosthetic designs for enhanced functionality.
  4. ___________ is a process that aims to restore functions to the body after an injury, commonly employed after amputation to adapt to a new prosthesis.
  5. Damage to the ___________ cord can result in loss of sensation or motor function below the injury site, leading to conditions such as paralysis.

Version 2 One at a time

Based on the vocabulary: (Exoskeleton, Myoelectric, Sensors, Hydraulic, Cylinder, Prosthesis, Rehabilitation, Paralysis, Spinal cord, Neural),  prepare 5 fill the blank quiz questions.  Generate one problem at a time. Then you request an answer.  Then generate next problem. 

Version 3 Grading answer interactively

Based on the vocabulary: (Exoskeleton, Myoelectric, Sensors, Hydraulic, Cylinder, Prosthesis, Rehabilitation, Paralysis, Spinal cord, Neural),  prepare 5 fill the blank quiz questions.  Generate one problem at a time. Then you request an answer. After you receive one, grade it. Then generate next problem. 

Version 4 Total score

Based on the vocabulary: (Exoskeleton, Myoelectric, Sensors, Hydraulic, Cylinder, Prosthesis, Rehabilitation, Paralysis, Spinal cord, Neural), prepare 5 fill the blank quiz questions. Each question has only one missing word. Generate one problem at a time. Then you request an answer. After you receive one, grade it. Then generate next problem. In the end tell me how many are correctly answered.

Version 5 Randomize

Based on the vocabulary: (Exoskeleton, Myoelectric, Sensors, Hydraulic, Cylinder, Prosthesis, Rehabilitation, Paralysis, Spinal cord, Neural)randomize the order of these words and then prepare 5 fill the blank quiz questions.  Generate one problem at a time. Then you request an answer. After you receive one, grade it. Then generate next problem. In the end tell me how many are correctly answered.

Version 6 Limiting the # of blanks to one

Based on the vocabulary: (Exoskeleton, Myoelectric, Sensors, Hydraulic, Cylinder, Prosthesis, Rehabilitation, Paralysis, Spinal cord, Neural), randomize the order of these words and then prepare 5 fill the blank quiz questions. Each question has only one missing word. Generate one problem at a time. Then you request an answer. After you receive one, grade it. Then generate next problem. In the end tell me how many are correctly answered.


based on ChatGPT and the course in https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/3/iterative



AI Workshop 來寫寫Python程式吧 (12/12)

方便的話,可以攜帶筆電或是平板等螢幕比較大的設備,不過只有手機也是沒問題的。

AI工作坊主要內容請參看 https://nptechsl.blogspot.com/2023/12/ai-workshop.html

裡面有七個程式實作單元,12/12第一次工作坊預計進行單元一(Iteration) 與單元二(Summarize)

有任何問題都可以隨時聯絡我

2023年12月9日 星期六

Sessions 11-14 AI Workshop

 請攜帶你的手機,平板,或是筆電。(螢幕大會比較好用,不過手機也可以)

https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/3/iterative

申請帳號一般隱私安全注意事項

1. 避免使用公用電腦登入或註冊帳號,以免隱私資料被可能潛在的惡意軟體盜取

2. 避免使用重複的帳號密碼,建議避免一組帳號走天下,尤其是不應與金融財務相關帳戶或是職務相關登入帳號密碼相同,以免帳號被外洩時遭到連帶連鎖影響


Prompting as a process

 Guidelines for Prompting


請使用上述課程的人工智慧程式回答以下問題,請用螢幕拍照,同時附上程式與結果

Iterative (逐步修正)12/12

1. 將產品規格翻譯成繁體中文(Traditional Chinese)

2. 依據辦公椅的技術規格,為行銷團隊產生一個350個中文字的產品文字,看看文字長度是否合宜,如果太長,試著縮短文字長度,是否變得比較專業簡潔有力

3. 檢查所產生的行銷文字,是否註明產地,如果沒有請重新產生 


Summarize (摘要)12/19

1. 完成英文課程裡的例題。

2. 將四個客戶回饋(玩具,落地燈,電動牙刷,果汁機)翻譯成繁體中文

3. 將四個客戶回饋摘要為50個字,如果字數不足,請適度調整長度。需要翻譯成繁體中文


Inferring (推論)12/19, 12/26

1. 完成英文課程裡的例題。

2. 為前一題每個回饋內容產生二到五個感受,留下你認為最接近事實的感受,刪除多餘

3. 判斷每篇評論內容情緒為正面(快樂,滿意,激勵)或負面(憤怒,沮喪,失望)或中性(平和,平靜,事實陳述)

    4. 不可使用ChatGPT,根據你的獨立思考為每個評論的翻譯,感受與情緒判斷進行綜合評分,0分(完全不能接受)到10分(出奇地好)


    Inferring (推論)Part 2, 12/26

    1. 將問卷調查報導翻譯成繁體中文

    2. 為報導內容產生二到五個關鍵詞,留下最貼近事實的關鍵詞,刪除多餘

    3. 這篇報導是否有關農業,地方政府,歷史,公部門,請逐一檢查


    Transforming (轉換)

    1. An old dude who invented AI says it is unsafe.  翻譯為中文與日文

    2. 請將上述俚語改寫為正式英文商業書信。


    Expanding (擴展)

    1. 線上課程中客戶來信內容是正面還是負面?(sentiment 變數是多餘的,應刪除)

    2. 改用另一封客戶來信,測試回信功能是否正常

    3. 依據所提供的個人資料,撰寫一封求職信



    以下練習需要用到ChatGPT, 進入點如下。第一次使用者需要先註冊一個帳號。


    Expanding (擴展)Part 2

    使用 ChatGPT

    Based on the following CV of an undergraduate student, write a statement of purpose for applying for computer science department of Princeton University. You may generate several versions and pick the one you like.

    I have written 3 prestigious papers on assistive technology. I won the best paper award in Supercomputing 2013. I received the best service learning award that recognized my field service in supported employment institutions.


    Inferring (推論)Part 3

    1. 使用ChatGPT以繁體中文回答Step 1中的五個簡答題

    2. 使用ChatGPT為每個答題內容產生至多四個關鍵詞(Keywords)

    3. 使用ChatGPT判斷每篇答題內容情緒為正面(快樂,滿意,激勵)或負面(憤怒,沮喪,失望)或中性(平和,平靜,事實陳述)

    4. 不使用ChatGPT,為每題的簡答內容,關鍵詞與情緒判斷進行綜合評分,0分(完全不能接受)到10分(出奇地好)

    Step 1. Copy and paste the following into ChatGPT
    1. Write a 100-word review of the latest superhero movie, including a brief plot summary and your opinion on the acting, special effects, and overall entertainment value.
    2. Create a list of the top 5 programming languages to learn in 2023, with a brief explanation of each language's strengths and recommended resources for learning.
    3. Provide a 50-word description of the main features of the latest iPhone model, including the screen size, camera specifications, and any new software updates.
    4. Write a 150-word persuasive essay on why renewable energy is crucial for the future of the planet, including specific examples of the environmental benefits and economic advantages.
    5. Create a list of 10 tips for effective time management, with practical advice on how to prioritize tasks, avoid procrastination, and balance work and personal life.
    Step 2

    Get through each request until all the requests are completed.

    Step 3

    To summarize the questions,
    enter "how many requests have you answered?"

    Step 4

    將每個回答翻譯成繁體中文

    Step 5

    將每個回答產生至多四個關鍵詞(Keywords)

    Step 6

    判斷每篇答題內容情緒為正面(快樂,滿意,激勵)或負面(憤怒,沮喪,失望)或中性(平和,平靜,事實陳述)



    Hints:

    Step 4. For each answer your provided, translate it into Chinese.