# Chain of Thought (CoT) Pattern

<mark style="color:red;">**การผสมผสาน Persona Pattern กับ Chain of Thought (CoT)**</mark>\ <mark style="color:red;">Chain of Thought คือการกระตุ้นให้ AI คิดเป็นลำดับขั้นตอน เพื่อให้คำตอบมีโครงสร้างและมีเหตุผลมากขึ้น สามารถใช้คำสั่งใน Prompt เช่น "ช่วยอธิบายทีละขั้นตอน" หรือ "โปรดวิเคราะห์ปัญหานี้ทีละขั้นตอน"</mark>

**ตัวอย่าง Prompt ที่รวม Persona Pattern และ Chain of Thought:**\
✅ *"คุณคือนักวิทยาศาสตร์ด้าน AI ผู้มีประสบการณ์ 10 ปี โปรดช่วยอธิบายว่า Generative AI ทำงานอย่างไรทีละขั้นตอน โดยให้เริ่มจาก:*

1. *กลไกการทำงานพื้นฐาน เช่น การใช้โมเดล Neural Network*
2. *การฝึกโมเดล (Training) และการสร้างผลลัพธ์ (Generation)*
3. *กระบวนการเบื้องหลังที่ช่วยให้โมเดลสามารถ "สร้าง" เนื้อหาใหม่จากข้อมูลเดิม*
4. *ข้อจำกัดหรือปัญหาที่พบในปัจจุบัน*"

*โปรดใช้น้ำเสียงเชิงวิชาการ แต่เข้าใจง่าย และอธิบายเป็นขั้นตอนอย่างชัดเจน"*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tlic.cmu.ac.th/cmu-matthew-ai/prompt/techniques/chain-of-thought-pattern.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
