---
title: "Role Prompting (TH)"
source: "https://systems-analysis.info/int/Role_Prompting_(TH)"
wiki: "systems-analysis.info/int"
article: "Role_Prompting_(TH)"
language: "th"
categories:
  - "Category:Large language models"
  - "Category:Machine learning"
  - "Category:Prompt engineering"
  - "Category:Thai"
revision_id: 6487
wiki_created_at: 2026-09-07T00:05:10Z
wiki_modified_at: 2026-09-07T00:05:10Z
downloaded_at: 2026-09-07T23:14:08Z
---

# Role Prompting (TH)

**การกำหนดบทบาทในการสร้างคำสั่ง** (อังกฤษ: *role prompting*) หรือที่รู้จักในชื่อ **การกำหนดตัวตนในการสร้างคำสั่ง** (อังกฤษ: *persona prompting*) คือเทคนิคในสาขา prompt engineering สำหรับโมเดลภาษาขนาดใหญ่ (LLM) ซึ่งกำหนดบทบาท ตัวตน หรืออัตลักษณ์ความเชี่ยวชาญเฉพาะให้แก่โมเดลอย่างชัดเจนก่อนที่จะมอบหมายงาน<sup>[\[1\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-ibm_watsonx_guide-1)</sup> กล่าวคือ ในข้อความคำสั่งหรือคำแนะนำของระบบจะระบุว่าโมเดลคือ เช่น «ครู» «นักประวัติศาสตร์» หรือ «โจรสลัด» เพื่อกำหนดสไตล์ น้ำเสียง และพฤติกรรมของคำตอบที่สร้างขึ้น<sup>[\[2\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-learnprompting_guide-2)</sup>

แนวทางนี้ถูกนำไปใช้อย่างแพร่หลายในระบบสนทนา ตัวอย่างเช่น คำแนะนำระบบมาตรฐานของ ChatGPT ที่ว่า «You are a helpful assistant» («คุณคือผู้ช่วยที่มีประโยชน์») ในทางปฏิบัติคือการกำหนดบทบาทพื้นฐานของโมเดลในการสื่อสาร<sup>[\[3\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-helpful_assistant_study-3)</sup>

## การกำหนดวัตถุประสงค์และการประยุกต์ใช้

เป้าหมายของการกำหนดบทบาทในการสร้างคำสั่งคือการชี้นำโมเดลไปสู่สไตล์และจุดสนใจของคำตอบที่กำหนด เพื่อให้คำตอบมีความเหมาะสมและสอดคล้องกับบริบทของงานมากยิ่งขึ้น การกำหนดบทบาทช่วยให้โมเดลมีน้ำเสียงและคลังคำศัพท์ที่เหมาะสม ซึ่งมีประโยชน์อย่างยิ่งในงานสร้างสรรค์และงานปลายเปิด ที่บทบาทช่วยทำให้ข้อความมีความมีชีวิตชีวาและความหลากหลายทางสไตล์มากขึ้น<sup>[\[4\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-learnprompting_effective-4)</sup>

เทคนิคนี้ยังถูกนำไปใช้ในบริบทวิชาชีพด้วย ตัวอย่างเช่น แชทบอตสำหรับฝ่ายสนับสนุนด้านเทคนิคอาจได้รับการกำหนดให้เป็นตัวแทนบริการที่สุภาพ และในระบบหลายตัวแทน แต่ละตัวแทนจะได้รับตัวตนเฉพาะของตน (เช่น «ผู้จัดการ» «นักพัฒนา») เพื่อให้ทำงานร่วมกันได้อย่างมีประสิทธิภาพ<sup>[\[1\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-ibm_watsonx_guide-1)</sup> ความยืดหยุ่นของ LLM สมัยใหม่ช่วยให้สามารถรับบทบาทได้แทบทุกอย่าง ตั้งแต่ตัวละครในนิยายไปจนถึงผู้เชี่ยวชาญเฉพาะทาง และสร้างคำตอบที่สอดคล้องกับภาพลักษณ์ที่กำหนดให้มากที่สุด<sup>[\[1\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-ibm_watsonx_guide-1)</sup>

## ผลกระทบต่อคุณภาพและความถูกต้อง

คำถามเกี่ยวกับประสิทธิผลของการกำหนดบทบาทในการสร้างคำสั่งเพื่อปรับปรุงความถูกต้องเชิงวัตถุวิสัยของคำตอบยังคงเป็นหัวข้อของการวิจัยที่ดำเนินอยู่ และผลลัพธ์มักขัดแย้งกัน

### ผลลัพธ์ที่ขัดแย้งกัน

ในแง่หนึ่ง มีงานวิจัยที่แสดงให้เห็นถึงการปรับปรุงผลลัพธ์ ตัวอย่างเช่น งานของ Zheng และคณะ (2023) พบว่าหากบทบาทของโมเดลสอดคล้องกับหัวข้อของงาน ประสิทธิภาพอาจเพิ่มขึ้นได้<sup>[\[5\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-persona_double_edged-5)</sup> งานของ Kong และคณะ (2024) อ้างว่าการกำหนดบทบาทในการสร้างคำสั่งสามารถปรับปรุงการใช้เหตุผลแบบ *zero-shot* ของโมเดลได้เมื่อเลือกตัวตนได้เหมาะสม<sup>[\[5\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-persona_double_edged-5)</sup>

ในอีกแง่หนึ่ง การศึกษาขนาดใหญ่แสดงให้เห็นภาพที่ซับซ้อนกว่านั้น การทดลองอย่างเป็นระบบกับบทบาท 162 บทบาทที่แตกต่างกันไม่พบการปรับปรุงความถูกต้องที่มีนัยสำคัญเมื่อเปรียบเทียบกับสถานการณ์ที่เป็นกลาง<sup>[\[3\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-helpful_assistant_study-3)</sup> ยิ่งไปกว่านั้น โดยเฉลี่ยแล้ว role prompt ยัง**ลดความถูกต้องของคำตอบลงเล็กน้อย**อีกด้วย<sup>[\[3\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-helpful_assistant_study-3)</sup>

งานของ Kim และคณะ (2024) อธิบายการแทรกแซงด้วยบทบาทว่าเป็น «ดาบสองคม»: การทดลองแสดงให้เห็นว่าเมื่อใช้คำสั่งบทบาทกับโมเดล GPT-4 คำถามบางส่วนได้รับคำตอบที่ถูกต้องซึ่งเดิมตอบผิด (**≈15.8%** ของการปรับปรุง) แต่ในขณะเดียวกัน งานจำนวนใกล้เคียงกันกลับ «ถูกทำลาย» โดยบทบาทนั้น (**≈13.8%** ของการลดลง)<sup>[\[5\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-persona_double_edged-5)</sup> สิ่งนี้เน้นย้ำว่าการเพิ่มบทบาทเข้าไปเองนั้นไม่ได้รับประกันคุณภาพที่ดีขึ้น และอาจส่งผลต่อพฤติกรรมของโมเดลอย่างคาดเดาไม่ได้

ข้อดีที่ชัดเจนของการกำหนดบทบาทในการสร้างคำสั่งคือ**การควบคุมสไตล์และรูปแบบของคำตอบ** แม้ว่าบทบาทจะไม่ได้เพิ่มความถูกต้องของข้อเท็จจริง แต่ก็ช่วยให้ได้คำตอบที่มีน้ำเสียงตามที่กำหนด (เป็นมิตร เป็นทางการ เป็นผู้แนะนำ) ทำให้คำตอบมีความสอดคล้องและน่าสนใจสำหรับผู้ใช้มากขึ้น<sup>[\[4\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-learnprompting_effective-4)</sup>

## คำแนะนำในการสร้างบทบาท

งานวิจัยให้คำแนะนำเชิงปฏิบัติหลายประการสำหรับการใช้การกำหนดบทบาทในการสร้างคำสั่งอย่างมีประสิทธิภาพ:

- **การเลือกบทบาท**: แนะนำให้เลือกบทบาททางสังคมที่เป็นกลาง (เช่น «เพื่อนร่วมงาน» «ที่ปรึกษา») โดยหลีกเลี่ยงบทบาทที่สนิทสนมเกินไปหรือเฉพาะทางเกินไป<sup>[\[6\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-role_prompting_guide-6)</sup>
- **การกำหนดสูตร**: ควรกำหนดบทบาทโดยตรงในมุมของโมเดล («คุณคือ X») แทนที่จะใช้สถานการณ์จินตนาการที่ซับซ้อน («ลองจินตนาการว่าคุณคือ...») การกำหนดตัวละครโดยตรงพิสูจน์แล้วว่ามีประสิทธิภาพมากกว่า<sup>[\[6\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-role_prompting_guide-6)</sup>
- **แนวทางสองขั้นตอน**: สำหรับคำถามที่ซับซ้อน แนะนำให้แบ่งงานออกเป็นสองขั้นตอน: ก่อนอื่นให้กำหนดบทบาทและบริบทของโมเดล จากนั้นจึงถามคำถามหลัก วิธีนี้ช่วยให้โมเดล «รับบทบาท» ก่อนและเพิ่มความเสถียรของผลลัพธ์<sup>[\[6\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-role_prompting_guide-6)</sup>

## ข้อจำกัดและความเสี่ยง

การใช้การกำหนดบทบาทในการสร้างคำสั่งมาพร้อมกับความเสี่ยงเชิงระบบหลายประการ

### การเสริมสร้างอคติและภาพจำ

LLM มักรับเอาภาพจำที่ฝังลึกในข้อมูลการเรียนรู้โดยไม่ตั้งใจ การกำหนดบทบาทที่เชื่อมโยงกับอาชีพ เพศ หรือสัญชาติเฉพาะอาจกระตุ้นและเสริมสร้างภาพจำเหล่านี้ในคำตอบ<sup>[\[6\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-role_prompting_guide-6)</sup> การศึกษาของ Gupta และคณะ (2023) แสดงให้เห็นว่าการเพิ่มคุณลักษณะทางสังคม (อายุ เชื้อชาติ) เข้าในบทบาทอาจทำให้ผลลัพธ์ของโมเดลเบี่ยงเบนและลดความถูกต้องของการใช้เหตุผลลงอย่างมีนัยสำคัญ<sup>[\[5\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-persona_double_edged-5)</sup> การวิเคราะห์อีกชิ้นหนึ่ง (Deshpande et al., 2023) พบว่าตัวตนบางอย่างนำไปสู่ความเป็นพิษที่เพิ่มขึ้นในคำตอบที่สร้างขึ้น<sup>[\[5\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-persona_double_edged-5)</sup>

### ช่องโหว่ด้านความปลอดภัย

ผู้ไม่ประสงค์ดีอาจใช้การกำหนดบทบาทในการสร้างคำสั่งเพื่อหลีกเลี่ยงข้อจำกัดของการกลั่นกรอง (เทคนิคที่รู้จักกันในชื่อ jailbreak) งานวิจัยแสดงให้เห็นว่าการกำหนดตัวตนพิเศษ (เช่น ตัวละครที่ไม่มีข้อจำกัดทางจริยธรรม) ทำให้การผลักดัน LLM ไปสู่การกระทำที่ต้องห้ามทำได้ง่ายขึ้น Shah et al. (2023) ใช้ความร่วมมือของตัวแทน «ที่มีบทบาท» หลายตัวได้สำเร็จเพื่อหลีกเลี่ยงข้อจำกัดของโมเดล ซึ่งแสดงให้เห็นถึงช่องโหว่เชิงระบบ<sup>[\[7\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-shah2023_findings-7)</sup>

ดังนั้น เมื่อกำหนดบทบาทให้แก่โมเดล จึงมีความสำคัญที่จะต้องคำนึงถึงอคติที่อาจมีและผลกระทบที่ไม่พึงประสงค์ที่ฝังอยู่ในบทบาทนั้น และใช้วิธีการนี้ด้วยความรอบคอบ<sup>[\[6\]](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_note-role_prompting_guide-6)</sup>

## ลิงก์ภายนอก

- Role Prompting: Guide LLMs with Persona-Based Tasks — คู่มือการกำหนดบทบาทในการสร้างคำสั่งบน Learn Prompting
- Use role prompting with Watsonx and Granite — คู่มือปฏิบัติจาก IBM

## บรรณานุกรม

- Kim, J.; Yang, N.; Jung, K. (2024). *Persona is a Double-edged Sword: Mitigating the Negative Impact of Role-playing Prompts in Zero-shot Reasoning Tasks*. arXiv:2408.08631.
- Kong, A. et al. (2023). *Better Zero-Shot Reasoning with Role-Play Prompting*. arXiv:2308.07702.
- Zheng, M. et al. (2023). *When "A Helpful Assistant" Is Not Really Helpful: Personas in System Prompts Do Not Improve Performances of Large Language Models*. arXiv:2311.10054.
- Shah, R. et al. (2023). *Scalable and Transferable Black-Box Jailbreaks for Language Models via Persona Modulation*. arXiv:2311.03348.
- Deshpande, P. et al. (2024). *Evaluating Persona-Prompted LLM Responses in Power-Disparate Health Communication*. arXiv:2503.01532.
- Xiong, F. et al. (2025). *The Influence of Persona Assignment on Stereotypes and Safeguards in Chinese Large Language Models*. arXiv:2506.04975.
- Li, Y. et al. (2025). *System Prompts as a Mechanism of Bias in Large Language Models*. arXiv:2505.21091.
- Wang, L. et al. (2025). *Persona-Assigned Large Language Models Exhibit Human-Like Bias and Toxicity*. arXiv:2506.20020.
- Grover, K. et al. (2023). *In-Context Impersonation Reveals Large Language Models' Ability to Simulate Human Personas*. PDF.
- Verma, V. et al. (2024). *Systematic Survey of Prompt Engineering in Large Language Models*. arXiv:2402.07927.
- Gupta, S. et al. (2024). *Exploring the Impact of Personality Traits on LLM Bias and Toxicity*. arXiv:2502.12566.
- Safdari, M. et al. (2024). *LLMs are Vulnerable to Malicious Prompts Disguised as Scientific Language*. arXiv:2501.14073.

## หมายเหตุ

1.  <span id="cite_note-ibm_watsonx_guide-1">↑ <sup>[1.0](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-ibm_watsonx_guide_1-0)</sup> <sup>[1.1](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-ibm_watsonx_guide_1-1)</sup> <sup>[1.2](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-ibm_watsonx_guide_1-2)</sup> «Use role prompting with Watsonx and Granite». *IBM*.</span>
2.  <span id="cite_note-learnprompting_guide-2">[↑](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-learnprompting_guide_2-0) «Role Prompting: Guide LLMs with Persona-Based Tasks». *Learn Prompting*. <a href="https://learnprompting.org/docs/advanced/zero_shot/role_prompting" class="external autonumber" rel="nofollow">[1]</a></span>
3.  <span id="cite_note-helpful_assistant_study-3">↑ <sup>[3.0](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-helpful_assistant_study_3-0)</sup> <sup>[3.1](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-helpful_assistant_study_3-1)</sup> <sup>[3.2](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-helpful_assistant_study_3-2)</sup> «When "A Helpful Assistant" Is Not Really Helpful: Personas in System Prompts Do Not Improve Performances of Large Language Models». *arXiv*. <a href="https://arxiv.org/html/2311.10054v3" class="external autonumber" rel="nofollow">[2]</a></span>
4.  <span id="cite_note-learnprompting_effective-4">↑ <sup>[4.0](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-learnprompting_effective_4-0)</sup> <sup>[4.1](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-learnprompting_effective_4-1)</sup> «Is Role Prompting Effective?». *Learn Prompting*. <a href="https://learnprompting.org/blog/role_prompting" class="external autonumber" rel="nofollow">[3]</a></span>
5.  <span id="cite_note-persona_double_edged-5">↑ <sup>[5.0](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-persona_double_edged_5-0)</sup> <sup>[5.1](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-persona_double_edged_5-1)</sup> <sup>[5.2](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-persona_double_edged_5-2)</sup> <sup>[5.3](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-persona_double_edged_5-3)</sup> <sup>[5.4](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-persona_double_edged_5-4)</sup> «Persona is a Double-edged Sword: Enhancing the Zero-shot Reasoning by Ensembling the Role-playing and Neutral Prompts». *arXiv*. <a href="https://arxiv.org/html/2408.08631v1" class="external autonumber" rel="nofollow">[4]</a></span>
6.  <span id="cite_note-role_prompting_guide-6">↑ <sup>[6.0](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-role_prompting_guide_6-0)</sup> <sup>[6.1](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-role_prompting_guide_6-1)</sup> <sup>[6.2](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-role_prompting_guide_6-2)</sup> <sup>[6.3](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-role_prompting_guide_6-3)</sup> <sup>[6.4](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-role_prompting_guide_6-4)</sup> «Role Prompting: Guide LLMs with Persona-Based Tasks». *Learn Prompting*. <a href="https://learnprompting.org/docs/advanced/zero_shot/role_prompting" class="external autonumber" rel="nofollow">[5]</a></span>
7.  <span id="cite_note-shah2023_findings-7">[↑](https://systems-analysis.info/int/Role_Prompting_(TH)#cite_ref-shah2023_findings_7-0) Shah, S., et al. (2023). «Scalable and Transferable Black-Box Jailbreaks for Language Models via Persona Modulation». *ACL Anthology*. <a href="https://aclanthology.org/2024.findings-emnlp.969.pdf" class="external autonumber" rel="nofollow">[6]</a></span>
