Tuesday, October 15, 2024

思路 (Chain of Thought)

Chain of Thought 





[Example]

A clothing store is having a tiered sale. They're offering 30% off on purchases over $200, 20% off on purchases between $100 and $200, and 10% off on purchases under $100. Additionally, they're giving an extra 5% off for loyalty card holders.

詳細解釋這個分層銷售活動的規則:


1. 購買金額超過 $200:30% 折扣

2. 購買金額介於 $100 至 $200 之間:20% 折扣

3. 購買金額低於 $100:10% 折扣

4. 持有忠誠卡的顧客可額外獲得 5% 折扣


這是一個很常見的銷售策略,旨在鼓勵顧客多消費以獲得更高的折扣。



Claude 































注意: 內建 Chain of thought 的 LLM 例如 ChatGPT o1 或是 Claude sonnet 3.5

ChatGPT 4o  questions from OpenAI official site

Sonnet 3.5 questions adapted from the above





Sunday, October 13, 2024

HW#4 Enhance Your AI (RAG)

如何繳交作業 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#4 Enhance AI [your id, your name].


練習: 生成筆記重點,筆記翻譯,簡報,旁白,理解測驗 (建議使用你所選擇的論文)

使用ChatGPT  重做上述題目



以下兩題至少做一題


練習: 筆記重點有憑有據,分析文章 with explainable retrieval ,提供分析的文本依據(可使用文本Download the PDF)


練習: 將一篇英文論文做成中文podcast,由一位主持人訪問論文研究的發現與貢獻(可使用文本Download the PDF)

Tuesday, October 08, 2024

存取擴增生成(Retrieval Augmented Generation, RAG)

Tip and example (code example for each tip)

(code example integrated)



Illustration of RAG

Source


檢索機制(Effective Retrieval)




微調成專業模型(微調流程) Fine-tuning of model



實際運用






Prompt for LLM

  Prompt (提示)

  • Clear - 明確清晰地表達你的需求。你的要求越精確,就能提供越貼合的回應。 例子:
    • 不佳:「告訴我關於貓的事。」
    • 更好:「請列舉五種最受歡迎的家貓品種,並簡述每種貓的主要特徵。」
  • Specific - 提供相關具體資訊。這有助於更好地理解你的需求。 例子:
    • 不佳:「如何準備演講?」
    • 更好:「我是一名大學生,需要在200人的班級上做一個15分鐘關於氣候變化的演講。你能給我一些準備建議嗎?」
Is short prompt or long prompt better?



Animate the submarine


Yellow submarine  (animate it and 水平移動)







非洲草原







醫院預約掛號




使用台灣文字正式用語




總結: Good prompts for LLM

注意:內建 Chain of thought 的 LLM 例如 ChatGPT o1 或是 Claude sonnet 3.5



ChatGPT 4o  questions from OpenAI official site

Sonnet 3.5 questions adapted from the above



ChatGPT o1