Tuesday, September 10, 2024

HW#2: QuickSort

如何繳交作業 How to turn in your homework exercise.


課堂練習 

Deadline: This Saturday at 23:59

Send all the links to  me chang212@gmail.com by email with subject HW#2 QuickSort [your id, your name].


練習: AI Historic Review


AI發展十年回顧 (2012-2023)

1. Press Remix Artifact and then explore one of the options Claude.ai suggests. Or explore as you like.





2. comprehension test: (your prompt to AI, just copy and paste it)

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 how many are correctly answered. 




練習: QuickSort




練習: 河內之塔

Tower of Hanoi





Saturday, September 07, 2024

HW#1 Whack-a-Mole

如何繳交作業 How to turn in your homework exercise.


課堂練習 

Deadline: This Saturday at 23:59

Send all the links to  me chang212@gmail.com by email with subject HW#1 Whack-a-Mole [your name]


練習: 十分鐘做一支打地鼠遊戲 (一小時也無妨)

Whack-a-Mole



Wednesday, September 04, 2024

AI 現在進行式



回顧十年

(繁體中文版)

2012 

Alexnet, big bang of AI

Toronto University

ImageNet with 14 m images

Error 25 down to 15 %

G4 GTX nvidia

CNN

Alex krizhevsky

Llya sutskever

Geoffrey Hinton


2013 

Alex, Geoffrey found DNN

Sold to Google

Used to power social media feed recommendations

YouTube

Instagram

Duopoly by Google and FB


2015 

openai

Elon musk

Llya (left Google)

Andrej karpathy …

Found OpenAI

Image supervised

Language embedded structure (word learned by joint attention while language by self teaching)


2017 

the transformer paper by Google

Attention is all you need.

Large amount of data needed

Computationally expensive n squared complexity

GPU came in

Parallel nature

OpenAI turned for profit


2018 

ChatGPT 1

Predicting the next word in a sentence


2019 

ChatGPT 2

$1 B from Microsoft


2020 ChatGPT 3


2021

Copilot

$2 B from Microsoft


2022 (FTX fell, triggering mass layoffs of big techs)

ChatGPT 3.5 (nov 30)

$10 B from Microsoft


2023 ChatGPT 4


Outlook

Data center, cloud computing

X86 Intel based CPU

80% of streaming video

GPU comes in, on chip RAM

Parallel computing, graphics, video

Data center as one computer


Questions

1. LLM = AI?

2. Do exams well, enough?

3. Infants, animals, nonverbal

Cognitive test


增強你的AI

語言智慧 LLM (Prompt, Chain of thought, & RAG)


 1. Prompt 提示

  • Clear
  • Specific

練習用圖庫


2. Chain of Thought, 思維鏈



3. Reinforced Augmented Generation (RAG)




Tuesday, September 03, 2024

助教自動批改作業

批改指令與上傳作業(可使用 pdf)




批改結果

ChatGPT



錯別字檢查

Ps: 
須事先與授課老師討論,獲得許可



需參照學校相關政策指引

Sunday, September 01, 2024

分析文章 with explainable retrieval ,提供分析的文本依據

explainable retrieval 是進階 RAG 技術

 1. 輸入文本 (資料來源)

下載原文PDF,上傳給 AI (這是 RAG 基本功)


2. 提出文本依據



3. 進一步要求AI 解釋它的分析方法論









Saturday, August 31, 2024

客戶訊息感受分析,內容摘要與應對行動

 角色設定,任務說明,行動指派(客服專員)



生成客戶來信內容

類別: 稱讚,投遞速度,定價過高,品質不好,...



依照客戶來信內容分析感受,摘要,行動




Friday, August 30, 2024

Writing Python in Jyputer with Access to OpenAI



1. 使用 AI 撰寫Python,以分解整數為例

你可以使用 Claude.ai 的 artifact (如下圖),或是使用 ChatGPT 產生程式碼再複製使用 




按下 複製 鍵,方便之後使用這段程式碼


2. 打開 Python 執行環境,這裡借用 DeepLearning AI 提供的 Jyputer 環境,這樣我可以隨時使用 OpenAI API


輸入 https://learn.deeplearning.ai/courses/chatgpt-prompt-eng/lesson/2/guidelines 即可進入 (需要先登入)




3. 在左側程式框裡下捲到底部空白處


4. 貼上你剛才的程式碼



5. 執行這段程式碼 (按下圖中程式碼左上的三角箭頭)


6. 執行結果

輸入 87,

The factors of 87 are: [1, 3, 29, 87]
Total number of factors: 4
87 is not a prime number.