<!DOCTYPE html>
    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
    <head>
<title>Hướng dẫn kỹ thuật lời nhắc. Kỹ thuật viết lời nhắc. Lời nhắc theo chuỗi tư duy</title>
<meta name="description" content="Hướng dẫn kỹ thuật lời nhắc. Kỹ thuật viết lời nhắc. Lời nhắc theo chuỗi tư duy - Savefile - Blogs -...">
<meta name="author" content="Blog FOSS by Lê Trung Nghĩa">
<meta name="copyright" content="Blog FOSS by Lê Trung Nghĩa [webmaster@vinades.vn]">
<meta name="generator" content="NukeViet v4.5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Hướng dẫn kỹ thuật lời nhắc. Kỹ thuật viết lời nhắc. Lời nhắc theo chuỗi tư duy">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Blogs - https&#x3A;&#x002F;&#x002F;letrungnghia.mangvn.org&#x002F;savefile&#x002F;Education&#x002F;huong-dan-ky-thuat-loi-nhac-ky-thuat-viet-loi-nhac-loi-nhac-theo-chuoi-tu-duy-7793.html">
<meta property="og:site_name" content="Blog FOSS by Lê Trung Nghĩa">
<meta property="og:url" content="https://letrungnghia.mangvn.org/savefile/Education/huong-dan-ky-thuat-loi-nhac-ky-thuat-viet-loi-nhac-loi-nhac-theo-chuoi-tu-duy-7793.html">
<link rel="shortcut icon" href="https://letrungnghia.mangvn.org/favicon.ico">
<link rel="canonical" href="https://letrungnghia.mangvn.org/savefile/Education/huong-dan-ky-thuat-loi-nhac-ky-thuat-viet-loi-nhac-loi-nhac-theo-chuoi-tu-duy-7793.html">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/" title="Blogs" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Government/" title="Blogs - Government" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Policy/" title="Blogs - Policy" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Philosophy/" title="Blogs - Philosophy" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Security/" title="Blogs - Security" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Legal/" title="Blogs - Legal" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Education/" title="Blogs - Education" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Business/" title="Blogs - Business" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Community/" title="Blogs - Community" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Interoperability/" title="Blogs - Interoperability" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Standards/" title="Blogs - Standards" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Author/" title="Blogs - Author" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Opinions/" title="Blogs - Opinions" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/CC/" title="Blogs - CC" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Cloud/" title="Blogs - Cloud" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Hardware/" title="Blogs - Hardware" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Software/" title="Blogs - Software" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Statistics/" title="Blogs - Statistics" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Trends/" title="Blogs - Trends" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/China/" title="Blogs - China" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/OSs/" title="Blogs - OSs" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Blogs/" title="Blogs - Blogs" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/Outsourcing/" title="Blogs - Outsourcing" type="application/rss+xml">
<link rel="alternate" href="https://letrungnghia.mangvn.org/rss/elearning/" title="Blogs - Elearning" type="application/rss+xml">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/assets/css/font-awesome.min.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/bootstrap.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/style.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/style.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/news.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/themes/default/css/custom.css" type="text/css">
<link rel="preload" as="style" href="https://letrungnghia.mangvn.org/assets/css/default.vi.1106.css" type="text/css">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/jquery/jquery.min.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/language/vi.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/DOMPurify/purify3.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/global.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/assets/js/site.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/news.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/main.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/custom.js" type="text/javascript">
<link rel="preload" as="script" href="https://letrungnghia.mangvn.org/themes/default/js/bootstrap.min.js" type="text/javascript">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/bootstrap.non-responsive.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/style.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://letrungnghia.mangvn.org/themes/default/css/news.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/themes/default/css/custom.css">
<link rel="stylesheet" href="https://letrungnghia.mangvn.org/assets/css/default.vi.1106.css">
<style type="text/css">
	body{background: #fff;}
</style>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-70254229-3', '');
ga('send', 'pageview');
</script>
</head>
    <body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">Blog FOSS by Lê Trung Nghĩa</h2>
		<p class="pull-right"><a title="Blog FOSS by Lê Trung Nghĩa" href="https://letrungnghia.mangvn.org/">https://letrungnghia.mangvn.org</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Hướng dẫn kỹ thuật lời nhắc. Kỹ thuật viết lời nhắc. Lời nhắc theo chuỗi tư duy</h1>
		<ul class="list-inline">
			<li>Thứ bảy - 01/11/2025 06:21</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
		</div>
				<div class="imghome">
			<img alt="Hướng dẫn kỹ thuật lời nhắc. Kỹ thuật viết lời nhắc. Lời nhắc theo chuỗi tư duy" src="https://letrungnghia.mangvn.org/uploads/letrungnghia/news/2025/0_prompt-engineering.png" width="460" class="img-thumbnail" />
		</div>
		<div class="clear"></div>
		<div id="bodytext" class="clearfix">
			<p align="justify"><b><span style="background: rgb(255, 255, 0);">Chain-of-Thought Prompting</span></b></p>

<p align="justify">Theo: <a href="https://www.promptingguide.ai/techniques/cot">https://www.promptingguide.ai/techniques/cot</a></p>

<div class="image-center"><img alt="" height="386" src="https://giaoducmo.avnuc.vn/uploads/news/2025_11/2.3-chain-of-thought-prompting_1.png" width="766" /></div>

<p align="center" style="line-height: 100%; margin-bottom: 0cm">Image Source: <a href="https://arxiv.org/abs/2201.11903" target="_blank">Wei et al. (2022)</a></p>

<p align="justify">Được giới thiệu trong <a href="https://arxiv.org/abs/2201.11903" target="_blank">Wei et al. (2022)</a>, lời nhắc theo chuỗi tư duy - CoT (Chain-of-Thought) cho phép khả năng suy luận phức tạp thông qua các bước suy luận trung gian. Bạn có thể kết hợp nó với lời nhắc với vài ví dụ/minh họa (Few-shot Prompting) để đạt kết quả tốt hơn cho các nhiệm vụ phức tạp hơn đòi hỏi phải suy luận trước khi phản hồi.</p>

<p align="justify"><em>Prompt:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western hljs ">Các số lẻ trong nhóm này cộng lại thành một số chẵn: 4, 8, 9, 15, 12, 2, 1.</code>
<code class="western hljs ">Đáp án: Cộng tất cả các số lẻ (9, 15, 1) được 25. Đáp án là Sai.</code>

<code class="western hljs ">Các số lẻ trong nhóm này cộng lại thành một số chẵn: 17, 10, 19, 4, 8, 12, 24.</code>
<code class="western hljs ">Đáp án: Cộng tất cả các số lẻ (17, 19) được 36. Đáp án là Đúng.</code>

<code class="western hljs ">Các số lẻ trong nhóm này cộng lại thành một số chẵn: 16, 11, 14, 4, 8, 13, 24.</code>
<code class="western hljs ">Đáp án: Cộng tất cả các số lẻ (11, 13) được 24. Đáp án là Đúng.</code>

<code class="western hljs ">Các số lẻ trong nhóm này cộng lại thành một số chẵn: 17, 9, 10, 12, 13, 4, 2.</code>
<code class="western hljs ">Đáp án: Cộng tất cả các số lẻ (17, 9, 13) được 39. Đáp án sai.</code>

<code class="western hljs ">Các số lẻ trong nhóm này cộng lại thành một số chẵn: 15, 32, 5, 13, 82, 7, 1.</code>
<code class="western hljs ">Đáp án:</code></pre>

<p align="justify"><em>Output:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western">Cộng tất cả các số lẻ (15, 5, 13, 7, 1) được 41. Đáp án là Sai.</code></pre>

<p align="justify">Wow! Chúng ta có thể thấy một kết quả hoàn hảo khi đưa ra bước lập luận. Thực tế, chúng ta có thể giải quyết bài toán này bằng cách cung cấp ít ví dụ hơn nữa, tức là chỉ cần một ví dụ là đủ:</p>

<p align="justify"><em>Prompt:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western hljs ">Các số lẻ trong nhóm này cộng lại thành một số chẵn: 4, 8, 9, 15, 12, 2, 1.</code>
<code class="western hljs ">Đáp án: Cộng tất cả các số lẻ (9, 15, 1) được 25. Đáp án là Sai.</code>

<code class="western hljs ">Các số lẻ trong nhóm này cộng lại thành một số chẵn: 15, 32, 5, 13, 82, 7, 1.</code>
<code class="western hljs ">Đáp án:</code></pre>

<p align="justify"><em>Output:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western">Cộng tất cả các số lẻ (15, 5, 13, 7, 1) được 41. Đáp án là Sai.</code></pre>

<p align="justify">Lưu ý rằng các tác giả cho rằng đây là một khả năng mới nổi xuất hiện với các mô hình ngôn ngữ đủ lớn.</p>

<p align="justify"><b>Lời nhắc không có ví dụ/minh họa (COT Zero-shot)</b></p>

<div class="image-center"><img alt="" height="412" src="https://giaoducmo.avnuc.vn/uploads/news/2025_11/2.3-chain-of-thought-prompting_2.png" width="766" /></div>

<p align="center" style="line-height: 100%; margin-bottom: 0cm">Image Source: <a href="https://arxiv.org/abs/2205.11916" target="_blank">Kojima et al. (2022)</a></p>

<p align="justify">Một ý tưởng mới xuất hiện gần đây hơn là ý tưởng về chiến lược <a href="https://arxiv.org/abs/2205.11916">Zero-shot CoT</a> (Kojima và cộng sự, 2022), về cơ bản bao gồm việc thêm câu &quot;Hãy suy nghĩ từng bước&quot; vào lời nhắc ban đầu. Hãy thử một bài toán đơn giản và xem mô hình hoạt động như thế nào:</p>

<p align="justify"><em>Prompt:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western hljs ">Tôi ra chợ mua 10 quả táo. Tôi đưa 2 quả cho người hàng xóm và 2 quả cho thợ sửa chữa. Sau đó, tôi đi mua thêm 5 quả táo và ăn 1 quả. Hỏi tôi còn lại bao nhiêu quả táo?</code><code class="western hljs "> </code></pre>

<p align="justify"><em>Output:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western">11 quả táo</code></pre>

<p align="justify">Câu trả lời không đúng! Bây giờ chúng ta hãy thử với lời nhắc đặc biệt.</p>

<p align="justify"><em>Prompt:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western hljs ">Tôi ra chợ mua 10 quả táo. Tôi đưa 2 quả cho người hàng xóm và 2 quả cho thợ sửa chữa. Sau đó, tôi mua thêm 5 quả táo và ăn 1 quả. Vậy tôi còn lại bao nhiêu quả táo?</code>

<code class="western hljs ">Hãy suy nghĩ theo từng bước một.</code></pre>

<p align="justify"><em>Output:</em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western hljs ">Ban đầu, bạn có 10 quả táo.</code>
<code class="western hljs ">Bạn đã tặng 2 quả táo cho người hàng xóm và 2 quả cho thợ sửa chữa, vậy bạn còn lại 6 quả táo.</code>
<code class="western hljs ">Sau đó, bạn mua thêm 5 quả táo, vậy là bạn còn lại 11 quả táo.</code>
<code class="western hljs ">Cuối cùng, bạn ăn 1 quả táo, vậy là bạn còn lại 10 quả táo.</code></pre>

<p align="justify">Thật ấn tượng khi lời nhắc đơn giản này lại hiệu quả trong nhiệm vụ này. Điều này đặc biệt hữu ích khi bạn không có quá nhiều ví dụ để sử dụng trong lời nhắc.</p>

<p align="justify"><b>Chuỗi tư duy Tự động (Auto-CoT)</b></p>

<p align="justify">Khi áp dụng lời nhắc theo chuỗi tư duy với các bài minh họa, quá trình này bao gồm việc tự tay tạo ra các ví dụ hiệu quả và đa dạng. Nỗ lực thủ công này có thể dẫn đến các giải pháp không tối ưu. Zhang và cộng sự (2022) đề xuất một phương pháp để loại bỏ các nỗ lực thủ công bằng cách tận dụng các chương trình học thuật (LLM) với lời nhắc &quot;Hãy suy nghĩ từng bước&quot; để tạo ra các chuỗi suy luận cho từng bài minh họa. Quá trình tự động này vẫn có thể dẫn đến sai sót trong các chuỗi được tạo ra. Để giảm thiểu ảnh hưởng của sai sót, tính đa dạng của các bài minh họa là rất quan trọng. Nghiên cứu này đề xuất Auto-CoT, phương pháp này lấy mẫu các câu hỏi với tính đa dạng và tạo ra các chuỗi suy luận để xây dựng các bài minh họa.</p>

<p align="justify">Chuỗi tư duy tự động (Auto-CoT) bao gồm hai giai đoạn chính:</p>

<ul>
	<li>
	<p align="justify">Giai đoạn 1): <b>Phân cụm câu hỏi</b>: Phân chia các câu hỏi của một tập dữ liệu nhất định thành một vài cụm</p>
	</li>
	<li>
	<p align="justify">Giai đoạn 2): <b>Lấy mẫu trình diễn</b>: Chọn một câu hỏi đại diện từ mỗi cụm và tạo chuỗi suy luận của nó bằng Zero-Shot-CoT (Chuỗi tư duy không có ví dụ/minh họa) với các phương pháp suy luận đơn giản</p>
	</li>
</ul>

<p align="justify">Các phương pháp suy luận đơn giản có thể là độ dài của câu hỏi (ví dụ: 60 mã thông báo) và số bước trong quá trình suy luận (ví dụ: 5 bước suy luận). Điều này khuyến khích mô hình sử dụng các minh họa đơn giản và chính xác.</p>

<p align="justify">Quá trình này được minh họa dưới đây:</p>

<div class="image-center"><img alt="" height="417" src="https://giaoducmo.avnuc.vn/uploads/news/2025_11/2.3-chain-of-thought-prompting_3.png" width="766" /></div>

<p align="center" style="line-height: 115%; margin-bottom: 0.25cm">Image Source: <a href="https://arxiv.org/abs/2210.03493" target="_blank">Zhang et al. (2022)</a></p>

<p align="justify" style="line-height: 115%; margin-bottom: 0.25cm">Mã cho chuỗi tư duy tự động (Auto-CoT) có sẵn <a href="https://github.com/amazon-science/auto-cot">ở đây</a>.</p>

<p align="justify" style="line-height: 115%; margin-bottom: 0.25cm"><span style="background: transparent"><em><span style="font-style: normal"><span style="font-weight: normal"><a href="https://giaoducmo.avnuc.vn/ai/huong-dan-ky-thuat-loi-nhac-ky-thuat-viet-loi-nhac-1577.html">Về ‘Kỹ thuật viết lời nhắc’</a> ………. <a href="https://giaoducmo.avnuc.vn/ai/huong-dan-ky-thuat-loi-nhac-ky-thuat-viet-loi-nhac-loi-nhac-voi-vai-vi-du-minh-hoa-few-shot-prompting-1579.html">Phần trước</a> ………. Phần tiếp theo</span></span></em></span></p>

<p align="justify" style="line-height: 115%; margin-bottom: 0.25cm">&nbsp;</p>

<p align="justify"><span style="background: rgb(255, 255, 0);">Introduced in <a href="https://arxiv.org/abs/2201.11903" target="_blank">Wei et al. (2022)</a>, chain-of-thought (CoT) prompting enables complex reasoning capabilities through intermediate reasoning steps. You can combine it with few-shot prompting to get better results on more complex tasks that require reasoning before responding.</span></p>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Prompt:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western"><span style="background: rgb(255, 255, 0);">The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">A: Adding all the odd numbers (9, 15, 1) gives 25. The answer is False.</span></code>

<code class="western"><span style="background: rgb(255, 255, 0);">The odd numbers in this group add up to an even number: 17,  10, 19, 4, 8, 12, 24.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">A: Adding all the odd numbers (17, 19) gives 36. The answer is True.</span></code>

<code class="western"><span style="background: rgb(255, 255, 0);">The odd numbers in this group add up to an even number: 16,  11, 14, 4, 8, 13, 24.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">A: Adding all the odd numbers (11, 13) gives 24. The answer is True.</span></code>

<code class="western"><span style="background: rgb(255, 255, 0);">The odd numbers in this group add up to an even number: 17,  9, 10, 12, 13, 4, 2.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">A: Adding all the odd numbers (17, 9, 13) gives 39. The answer is False.</span></code>

<code class="western"><span style="background: rgb(255, 255, 0);">The odd numbers in this group add up to an even number: 15, 32, 5, 13, 82, 7, 1. </span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">A:</span></code></pre>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Output:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western"><span style="background: rgb(255, 255, 0);">Adding all the odd numbers (15, 5, 13, 7, 1) gives 41. The answer is False.</span></code></pre>

<p align="justify"><span style="background: rgb(255, 255, 0);">Wow! We can see a perfect result when we provided the reasoning step. In fact, we can solve this task by providing even fewer examples, i.e., just one example seems enough:</span></p>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Prompt:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western"><span style="background: rgb(255, 255, 0);">The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">A: Adding all the odd numbers (9, 15, 1) gives 25. The answer is False.</span></code>

<code class="western"><span style="background: rgb(255, 255, 0);">The odd numbers in this group add up to an even number: 15, 32, 5, 13, 82, 7, 1. </span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">A:</span></code></pre>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Output:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western"><span style="background: rgb(255, 255, 0);">Adding all the odd numbers (15, 5, 13, 7, 1) gives 41. The answer is False.</span></code></pre>

<p align="justify"><span style="background: rgb(255, 255, 0);">Keep in mind that the authors claim that this is an emergent ability that arises with sufficiently large language models.</span></p>

<p align="justify"><b><span style="background: rgb(255, 255, 0);">Zero-shot COT Prompting</span></b></p>

<p align="justify"><span style="background: rgb(255, 255, 0);">One recent idea that came out more recently is the idea of <a href="https://arxiv.org/abs/2205.11916" target="_blank">zero-shot CoT</a> (Kojima et al. 2022) that essentially involves adding &quot;Let&#039;s think step by step&quot; to the original prompt. Let&#039;s try a simple problem and see how the model performs:</span></p>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Prompt:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western"><span style="background: rgb(255, 255, 0);">I went to the market and bought 10 apples. I gave 2 apples to the neighbor and 2 to the repairman. I then went and bought 5 more apples and ate 1. How many apples did I remain with?</span></code></pre>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Output:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm; margin-bottom: 0.5cm">
<code class="western"><span style="background: rgb(255, 255, 0);">11 apples</span></code></pre>

<p align="justify"><span style="background: rgb(255, 255, 0);">The answer is incorrect! Now Let&#039;s try with the special prompt.</span></p>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Prompt:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western"><span style="background: rgb(255, 255, 0);">I went to the market and bought 10 apples. I gave 2 apples to the neighbor and 2 to the repairman. I then went and bought 5 more apples and ate 1. How many apples did I remain with?</span></code>

<code class="western"><span style="background: rgb(255, 255, 0);">Let&#039;s think step by step.</span></code></pre>

<p align="justify"><em><span style="background: rgb(255, 255, 0);">Output:</span></em></p>

<pre class="western" style="text-align: justify; margin-left: 1.25cm">
<code class="western"><span style="background: rgb(255, 255, 0);">First, you started with 10 apples.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">You gave away 2 apples to the neighbor and 2 to the repairman, so you had 6 apples left.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">Then you bought 5 more apples, so now you had 11 apples.</span></code>
<code class="western"><span style="background: rgb(255, 255, 0);">Finally, you ate 1 apple, so you would remain with 10 apples.</span></code></pre>

<p align="justify"><span style="background: rgb(255, 255, 0);">It&#039;s impressive that this simple prompt is effective at this task. This is particularly useful where you don&#039;t have too many examples to use in the prompt.</span></p>

<p><a name="automatic-chain-of-thought-auto-cot"></a><b><span style="background: rgb(255, 255, 0);">Automatic Chain-of-Thought (Auto-CoT)</span></b></p>

<p align="justify"><span style="background: rgb(255, 255, 0);">When applying chain-of-thought prompting with demonstrations, the process involves hand-crafting effective and diverse examples. This manual effort could lead to suboptimal solutions. <a href="https://arxiv.org/abs/2210.03493" target="_blank">Zhang et al. (2022)</a> propose an approach to eliminate manual efforts by leveraging LLMs with &quot;Let&#039;s think step by step&quot; prompt to generate reasoning chains for demonstrations one by one. This automatic process can still end up with mistakes in generated chains. To mitigate the effects of the mistakes, the diversity of demonstrations matter. This work proposes Auto-CoT, which samples questions with diversity and generates reasoning chains to construct the demonstrations.</span></p>

<p align="justify"><span style="background: rgb(255, 255, 0);">Auto-CoT consists of two main stages:</span></p>

<ul>
	<li>
	<p align="justify" style="margin-bottom: 0cm"><span style="background: rgb(255, 255, 0);">Stage 1): </span><strong><span style="background: rgb(255, 255, 0);">question clustering</span></strong><span style="background: rgb(255, 255, 0);">: partition questions of a given dataset into a few clusters </span></p>
	</li>
	<li>
	<p align="justify"><span style="background: rgb(255, 255, 0);">Stage 2): </span><strong><span style="background: rgb(255, 255, 0);">demonstration sampling</span></strong><span style="background: rgb(255, 255, 0);">: select a representative question from each cluster and generate its reasoning chain using Zero-Shot-CoT with simple heuristics </span></p>
	</li>
</ul>

<p align="justify"><span style="background: rgb(255, 255, 0);">The simple heuristics could be length of questions (e.g., 60 tokens) and number of steps in rationale (e.g., 5 reasoning steps). This encourages the model to use simple and accurate demonstrations.</span></p>

<p align="justify"><span style="background: rgb(255, 255, 0);">The process is illustrated below:</span></p>

<p align="justify"><span style="background: rgb(255, 255, 0);">Code for Auto-CoT is available <a href="https://github.com/amazon-science/auto-cot" target="_blank">here</a>.</span></p>

<p align="justify">Dịch: Lê Trung Nghĩa</p>

<p align="justify">letrungnghia.foss@gmail.com</p>
		</div>
				<div id="author">
						<p>
				<strong>Tác giả:</strong>
				<a href="https://letrungnghia.mangvn.org/author/Nghia-Le-Trung/">Nghĩa Lê Trung</a>
			</p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://letrungnghia.mangvn.org/savefile/Education/huong-dan-ky-thuat-loi-nhac-ky-thuat-viet-loi-nhac-loi-nhac-theo-chuoi-tu-duy-7793.html" title="Hướng dẫn kỹ thuật lời nhắc. Kỹ thuật viết lời nhắc. Lời nhắc theo chuỗi tư duy">https://letrungnghia.mangvn.org/savefile/Education/huong-dan-ky-thuat-loi-nhac-ky-thuat-viet-loi-nhac-loi-nhac-theo-chuoi-tu-duy-7793.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; Blog FOSS by Lê Trung Nghĩa
		</div>
		<div id="contact">
			<a href="mailto:webmaster@vinades.vn">webmaster@vinades.vn</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://letrungnghia.mangvn.org/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
<div id="run_cronjobs" style="visibility:hidden;display:none;"><img alt="cron" src="/index.php?second=cronjobs&amp;p=g818dA3E" width="1" height="1" /></div>
<script src="https://letrungnghia.mangvn.org/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=7,nv_my_abbr="+07",nv_cookie_prefix="nv4c_Cgoz2",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_recaptcha_ver=2,nv_recaptcha_sitekey="6LcNwC8UAAAAAMm8ZTYNygweLUQtOU0IapbDRk69",nv_recaptcha_type="image",XSSsanitize=1;</script>
<script src="https://letrungnghia.mangvn.org/assets/js/language/vi.js"></script>
<script src="https://letrungnghia.mangvn.org/assets/js/DOMPurify/purify3.js"></script>
<script src="https://letrungnghia.mangvn.org/assets/js/global.js"></script>
<script src="https://letrungnghia.mangvn.org/assets/js/site.js"></script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/news.js"></script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/main.js"></script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/custom.js"></script>
<script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Organization",
            "url": "https://letrungnghia.mangvn.org",
            "logo": "https://letrungnghia.mangvn.org/uploads/letrungnghia/le-trung-nghia.png"
        }
        </script>
<script src="https://letrungnghia.mangvn.org/themes/default/js/bootstrap.min.js"></script>
</body>
</html>