You are on page 1of 15

112-1

計算語言學專題
week2
Shu-Kai Hsieh
LOPE, National Taiwan
University

1
In-context learning

2
LLMs are (still)
black boxes
但 LLM 引發語言哲學思考

3
How LLMs learn new knowledge
weight updates (e.g., pre-training or fine-tuning)
prompting (e.g., retrieval augmented generation, RAG).

模型的權重就像長期記憶,而提示就像短期記憶。當你微調一個模型
時,就像為一周後的考試做準備。當你將知識插入到提示中(例如,通
過檢索)時,就像帶著筆記參加考試。
4
Limitations
lack the extensive ( grounded ) world knowledge and rich conceptual
representations that humans acquire through education and
experience.

5
reasoning process is implicit and opaque, making it difficult to
understand or critique the rationale behind inferences. This black
box nature reduces trust and reliability.
They cannot reason about their own reasoning process and
identify potential flaws. Meta-cognition is limited.

6
Prompting LLM
Prompt Design is the process of coming up with the optimal
prompt given an LLM and a clearly stated goal.
Prompt Engineering is prompt design plus a few other important
processes, such as prompt tuning and prompt debugging.
Prompting techniques:Chain of thought (CoT); Reason and Act
(React); ...

7
LLM orchestration
LLM orchestration is the process of designing and implementing a
pipeline of LLMs to achieve a specific goal.
langchain and LangChain Expression Language
LlamaIndex

介紹LangChain這個架構,用以快速建立基於大語言模型(LLM)的應
用程式,從基本的提示詞結構化,記憶資料,到建構客服問答機器人等
等。
8
Fine-tuning LLM
Fine-tuning a large language model involves adjusting and adapting
a pre-trained model to perform specific tasks or to cater to a
particular domain more effectively.
Fine-tune Llama 2

9
Neuro-symbolic integration
Knowledge Graph/ Ontology / Structured Knowledge Injection
LLM + KG in Legal and Finance domains
Grounded Multimodal NLP

10
本學期的專題規劃
大方向
表徵 Language/Knowledge Resources and (customized) LLMs
(chaining, fine-tuning, interpretability)
應用 (language learning, cognitive modeling, other NLP tasks, etc)
評測 ethical LLM : language ineuqality and bias

11
開源 LLM: Llama 2
https://www.youtube.com/watch?v=iLBekSpVFq4

12
具體時程
Syllabus

13
期末專案投稿規劃
有志於科學研究或挑戰的同學
LREC + COLING 2024
ACL 2024

14
本週作業
還沒上過 DeepLearning.AI short courses 請補上。(見課綱)
熟悉使用 :註冊與建立金鑰 (5 美金免費額度);利用
openAI API
熟悉如何使用 API
playground

Llama 2

15

You might also like