---
title: "Self-consistency prompting (TH)"
source: "https://systems-analysis.info/int/Self-consistency_prompting_(TH)"
wiki: "systems-analysis.info/int"
article: "Self-consistency_prompting_(TH)"
language: "th"
categories:
  - "Category:Large language models"
  - "Category:Machine learning"
  - "Category:Prompt engineering"
  - "Category:Thai"
revision_id: 6651
wiki_created_at: 2026-09-07T00:08:28Z
wiki_modified_at: 2026-09-07T00:08:28Z
downloaded_at: 2026-09-07T23:15:03Z
---

# Self-consistency prompting (TH)

**การถอดรหัสแบบสอดคล้องกันในตัวเอง** (อังกฤษ: *Self-Consistency Prompting, SC*) — คือวิธีการหรือกลยุทธ์การถอดรหัสใน prompt engineering ที่ออกแบบมาเพื่อเพิ่มความแม่นยำและความน่าเชื่อถือของ LLM ขนาดใหญ่ในการแก้ปัญหาที่ต้องการการให้เหตุผลหลายขั้นตอน เช่น ปัญหาคณิตศาสตร์และตรรกศาสตร์<sup>[\[1\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-wang2022-1)</sup> วิธีการนี้ถูกเสนอโดยนักวิจัยจาก Google Research ในปี 2022 ในฐานะการปรับปรุงเทคนิค Chain-of-Thought (CoT)

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

## บริบทและพื้นฐาน

วิธีการ Self-Consistency เป็นการพัฒนาต่อยอดโดยตรงจากเทคนิค **Chain-of-Thought (CoT)** เทคนิค CoT ที่เสนอโดย Wei และคณะ (2022) ช่วยเพิ่มความสามารถของ LLM ในการแก้ปัญหาที่ซับซ้อนได้อย่างมีนัยสำคัญ โดยกระตุ้นให้โมเดลเขียนขั้นตอนการแก้ปัญหาอย่างชัดเจน<sup>[\[2\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-wei2022-2)</sup> อย่างไรก็ตาม การใช้งาน CoT พื้นฐานใช้ "greedy decoding" ซึ่งจะเลือก token ถัดไปที่มีความน่าจะเป็นสูงสุดในแต่ละขั้นตอน สิ่งนี้สร้างข้อจำกัด คือหากโมเดลเกิดข้อผิดพลาดในช่วงแรก จะไม่สามารถเบี่ยงออกจากเส้นทางที่ผิดพลาดนั้นและแก้ไขได้ Self-Consistency ถูกเสนอขึ้นเพื่อแก้ไขปัญหานี้โดยเฉพาะ<sup>[\[1\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-wang2022-1)</sup>

## กลไกการทำงาน

อัลกอริทึม Self-Consistency แทนที่แนวทาง greedy แบบ deterministic ด้วยกระบวนการ "sampling ตามด้วยการรวมผล" และประกอบด้วยขั้นตอนดังต่อไปนี้<sup>[\[1\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-wang2022-1)</sup>

1.  **การสร้างเส้นทางการให้เหตุผลหลายเส้นทาง**: แทนที่จะให้คำตอบเดียว โมเดลจะสร้างคำตอบสำหรับคำถามเดียวกันหลายครั้ง (เช่น สูงสุด 40 ครั้ง) โดยใช้วิธีการ chain-of-thought เพื่อให้ได้เส้นทางการให้เหตุผลที่หลากหลาย จะใช้วิธีการถอดรหัสแบบ stochastic เช่น temperature sampling (โดยใช้ค่าพารามิเตอร์อุณหภูมิ \> 0)
2.  **การรวมผลและเลือกคำตอบ**: จากเส้นทางการให้เหตุผลทั้งหมดที่สร้างขึ้น จะดึงเฉพาะคำตอบสุดท้าย (เช่น ค่าตัวเลข) จากนั้นเลือกคำตอบที่ปรากฏบ่อยที่สุดจากคำตอบเหล่านี้ และนำเสนอคำตอบนั้นเป็นผลลัพธ์สุดท้าย

แนวทางนี้เลียนแบบหลักการ "self-ensembling" โดยใช้การอนุมานหลายครั้งจากโมเดลเดียวกันเพื่อเพิ่มความน่าเชื่อถือและลดข้อผิดพลาดแบบสุ่ม<sup>[\[3\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-portkey_summary-3)</sup>

## ประสิทธิภาพและผลลัพธ์

ในงานวิจัยต้นฉบับ Self-Consistency แสดงให้เห็นการเพิ่มขึ้นของความแม่นยำอย่างมีนัยสำคัญบน benchmark ยอดนิยมหลายตัว โดยเฉพาะในงานที่ต้องการการให้เหตุผลทางคณิตศาสตร์และตรรกศาสตร์

- บน benchmark ปัญหาคณิตศาสตร์ **GSM8K** ความแม่นยำของโมเดล PaLM-540B เพิ่มขึ้นจาก 56.6% (ด้วย CoT) เป็น **74.4%** (ด้วย Self-Consistency) ซึ่งคิดเป็นการเพิ่มขึ้น **17.8%**
- บน benchmark คณิตศาสตร์อื่น ๆ เช่น **SVAMP** และ **AQuA** การเพิ่มขึ้นอยู่ที่ **+11.0%** และ **+12.2%** ตามลำดับ
- บนงานที่ต้องการตรรกศาสตร์และสามัญสำนึก เช่น **StrategyQA** การปรับปรุงอยู่ที่ **+6.4%**<sup>[\[1\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-wang2022-1)</sup>

การใช้ Self-Consistency ช่วยสร้างสถิติประสิทธิภาพใหม่ (*state-of-the-art*) บน benchmark หลายตัวเมื่อใช้โมเดลขนาดใหญ่ เช่น GPT-3 175B และ PaLM 540B<sup>[\[1\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-wang2022-1)</sup>

## ข้อดีและข้อจำกัด

### ข้อดี

- **การเพิ่มความแม่นยำ**: ปรับปรุงผลลัพธ์ได้อย่างมีนัยสำคัญในงานที่ต้องการการให้เหตุผลหลายขั้นตอนที่ซับซ้อน
- **ความน่าเชื่อถือ**: วิธีการนี้มีความทนทานต่อข้อผิดพลาดที่อาจเกิดขึ้นในเส้นทางการให้เหตุผลเพียงเส้นทางเดียวมากกว่า
- **ความง่ายในการนำไปใช้**: ไม่ต้องการการฝึกเพิ่มเติมหรือการเปลี่ยนแปลงสถาปัตยกรรมของโมเดล สามารถนำวิธีการนี้ไปใช้เป็น "wrapper" ง่าย ๆ รอบโมเดลที่มีอยู่แล้วได้

### ข้อจำกัด

- **ต้นทุนการคำนวณสูง**: ข้อเสียหลักคือความจำเป็นในการสร้างคำตอบหลายครั้ง (เช่น 10, 20 หรือ 40 ครั้ง) สำหรับคำถามเดียว ซึ่งเพิ่มต้นทุนและเวลาในการอนุมานอย่างเป็นสัดส่วน
- **การนำไปใช้ที่จำกัด**: วิธีการมาตรฐานมีประสิทธิภาพสูงสุดสำหรับงานที่มีรูปแบบคำตอบที่กำหนดไว้ชัดเจน (เช่น ตัวเลข, "ใช่/ไม่ใช่", ตัวเลือกจากรายการ) ซึ่งสามารถลงคะแนนเสียงโดยเสียงข้างมากได้ง่าย วิธีนี้ใช้ได้ไม่ดีสำหรับงานที่มีการสร้างแบบเปิด (การเขียนเรียงความ, การสรุปความ) ซึ่งคำตอบมีรูปแบบที่เป็นเอกลักษณ์
- **ความเสี่ยงจากความผิดพลาดเชิงระบบ**: หากโมเดลสร้างการให้เหตุผลที่ผิดพลาดอย่างเป็นระบบและบังเอิญลงเอยที่คำตอบผิดเดียวกัน Self-Consistency จะไม่เพียงแต่ไม่แก้ไขข้อผิดพลาด แต่ยังเพิ่มความมั่นใจในคำตอบที่ผิดนั้นด้วย

## การพัฒนาวิธีการ: Universal Self-Consistency

ข้อจำกัดของวิธีการพื้นฐานในงานที่มีรูปแบบคำตอบแบบอิสระได้รับการแก้ไขในงานวิจัยต่อมา ในช่วงปลายปี 2023 กลุ่มนักวิจัยจาก Google DeepMind ได้เสนอแนวทาง **Universal Self-Consistency (USC)**<sup>[\[4\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-chen2023_usc-4)</sup>

ใน USC แทนที่จะใช้การลงคะแนนเสียงแบบง่ายตามคำตอบสุดท้าย จะใช้ตัว LLM เองเป็น "ผู้ตัดสิน" ในการรวมผล โมเดลจะสร้างตัวเลือกคำตอบที่สมบูรณ์หลายชุด จากนั้นได้รับ prompt ใหม่เพื่อขอให้เลือก "คำตอบที่สอดคล้องกันมากที่สุด" หรือ "มีคุณภาพสูงสุด" จากตัวเลือกเหล่านั้น แนวทางนี้ช่วยให้สามารถนำหลักการของ self-consistency ไปใช้กับงานที่มีรูปแบบคำตอบแบบเปิดและสร้างสรรค์ได้<sup>[\[5\]](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_note-deepmind_usc-5)</sup>

## ลิงก์

- Self-Consistency Improves Chain of Thought Reasoning in Language Models — บทความวิจัยต้นฉบับจาก Google Research
- Self-Consistency — คู่มือบน Prompt Engineering Guide

## เอกสารอ้างอิง

- Wang, X. et al. (2022). *Self-Consistency Improves Chain of Thought Reasoning in Language Models*. arXiv:2203.11171.
- Wei, J. et al. (2022). *Chain-of-Thought Prompting Elicits Reasoning in Large Language Models*. arXiv:2201.11903.
- Aggarwal, P. et al. (2023). *Let's Sample Step by Step: Adaptive-Consistency for Efficient Reasoning and Coding with LLMs*. arXiv:2305.11860.
- Chen, X. et al. (2023). *Universal Self-Consistency with Large Language Models*. arXiv:2311.17311.
- Knappe, T. et al. (2024). *Semantic Self-Consistency: Enhancing Language Model Reasoning via Semantic Weighting*. arXiv:2410.07839.
- Liang, X. et al. (2024). *Internal Consistency and Self-Feedback in Large Language Models: A Survey*. arXiv:2407.14507.
- Li, T. et al. (2024). *Improving Faithfulness of Large Language Models in Summarization via Sliding Generation and Self-Consistency*. arXiv:2407.21443.
- Byerly, A.; Khashabi, D. (2024). *How Effective Is Self-Consistency for Long-Context Problems?*. arXiv:2411.01101.
- Novikova, J. et al. (2025). *Consistency in Language Models: Current Landscape, Challenges, and Future Directions*. arXiv:2505.00268.
- Admoni, S. et al. (2025). *Towards Large Language Models with Self-Consistent Natural Language Explanations*. arXiv:2506.07523.

## หมายเหตุ

1.  <span id="cite_note-wang2022-1">↑ <sup>[1.0](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-wang2022_1-0)</sup> <sup>[1.1](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-wang2022_1-1)</sup> <sup>[1.2](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-wang2022_1-2)</sup> <sup>[1.3](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-wang2022_1-3)</sup> <sup>[1.4](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-wang2022_1-4)</sup> <sup>[1.5](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-wang2022_1-5)</sup> Wang, X., Wei, J., Schuurmans, D., et al. (2022). «Self-Consistency Improves Chain of Thought Reasoning in Language Models». *arXiv*. <a href="https://arxiv.org/abs/2203.11171" class="external autonumber" rel="nofollow">[1]</a></span>
2.  <span id="cite_note-wei2022-2">[↑](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-wei2022_2-0) Wei, J., Wang, X., Schuurmans, D., et al. (2022). «Chain-of-Thought Prompting Elicits Reasoning in Large Language Models». *NeurIPS 2022*.</span>
3.  <span id="cite_note-portkey_summary-3">[↑](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-portkey_summary_3-0) «Self-Consistency Improves Chain of Thought Reasoning in Language Models - Summary». *Portkey*. <a href="https://portkey.ai/blog/self-consistency-improves-chain-of-thought-reasoning-in-language-models-summary" class="external autonumber" rel="nofollow">[2]</a></span>
4.  <span id="cite_note-chen2023_usc-4">[↑](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-chen2023_usc_4-0) Chen, X., et al. (2023). «Universal Self-Consistency with Large Language Models». *arXiv*. <a href="https://arxiv.org/abs/2311.15180" class="external autonumber" rel="nofollow">[3]</a></span>
5.  <span id="cite_note-deepmind_usc-5">[↑](https://systems-analysis.info/int/Self-consistency_prompting_(TH)#cite_ref-deepmind_usc_5-0) «Universal Self-Consistency with Large Language Models». *Google DeepMind Publications*. <a href="https://deepmind.google/research/publications/50879/" class="external autonumber" rel="nofollow">[4]</a></span>
