1
1
{
2
2
"cells" : [
3
+ {
4
+ "cell_type" : " markdown" ,
5
+ "metadata" : {
6
+ "toc" : true
7
+ },
8
+ "source" : [
9
+ " <h1>Table of Contents<span class=\" tocSkip\" ></span></h1>\n " ,
10
+ "<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#ChatGPT使用指南——推理Reasoning\" data-toc-modified-id=\"ChatGPT使用指南——推理Reasoning-1\">ChatGPT使用指南——推理Reasoning</a></span><ul class=\"toc-item\"><li><span><a href=\"#1.-什么是推理(Reasoning)?\" data-toc-modified-id=\"1.-什么是推理(Reasoning)?-1.1\">1. 什么是推理(Reasoning)?</a></span></li><li><span><a href=\"#2.-导入ChatGPT\" data-toc-modified-id=\"2.-导入ChatGPT-1.2\">2. 导入ChatGPT</a></span></li><li><span><a href=\"#3.-测试ChatGPT的推理能力\" data-toc-modified-id=\"3.-测试ChatGPT的推理能力-1.3\">3. 测试ChatGPT的推理能力</a></span><ul class=\"toc-item\"><li><span><a href=\"#3.1-演绎推理(Deductive-Reasoning)\" data-toc-modified-id=\"3.1-演绎推理(Deductive-Reasoning)-1.3.1\">3.1 演绎推理(Deductive Reasoning)</a></span></li><li><span><a href=\"#3.2-归纳推理(Inductive-Reasoning)\" data-toc-modified-id=\"3.2-归纳推理(Inductive-Reasoning)-1.3.2\">3.2 归纳推理(Inductive Reasoning)</a></span></li><li><span><a href=\"#3.3-溯因推理(Abductive-reasoning)\" data-toc-modified-id=\"3.3-溯因推理(Abductive-reasoning)-1.3.3\">3.3 溯因推理(Abductive reasoning)</a></span></li><li><span><a href=\"#3.4-三者之间的关系\" data-toc-modified-id=\"3.4-三者之间的关系-1.3.4\">3.4 三者之间的关系</a></span></li></ul></li><li><span><a href=\"#4.-调用ChatPT的推理能力\" data-toc-modified-id=\"4.-调用ChatPT的推理能力-1.4\">4. 调用ChatPT的推理能力</a></span><ul class=\"toc-item\"><li><span><a href=\"#4.1-LLM推理求鼓励,请告诉ChatGPT去思考——Let's-think-step-by-step(Zero-shot-COT)\" data-toc-modified-id=\"4.1-LLM推理求鼓励,请告诉ChatGPT去思考——Let's-think-step-by-step(Zero-shot-COT)-1.4.1\">4.1 LLM推理求鼓励,请告诉ChatGPT去思考——Let's think step by step(Zero-shot-COT)</a></span></li><li><span><a href=\"#4.2-给几个例子,告诉ChatGPT应该这么思考——Chain-of-Thought-Prompting\" data-toc-modified-id=\"4.2-给几个例子,告诉ChatGPT应该这么思考——Chain-of-Thought-Prompting-1.4.2\">4.2 给几个例子,告诉ChatGPT应该这么思考——Chain of Thought Prompting</a></span></li><li><span><a href=\"#4.3-任务太难,拆分一下,找个简单的去突破——Least-to-Most-prompting\" data-toc-modified-id=\"4.3-任务太难,拆分一下,找个简单的去突破——Least-to-Most-prompting-1.4.3\">4.3 任务太难,拆分一下,找个简单的去突破——Least to Most prompting</a></span></li><li><span><a href=\"#4.4-并非所有问题都需要拆解,不如先问问LLM(比如:ChatGPT)的意见——Self-Ask\" data-toc-modified-id=\"4.4-并非所有问题都需要拆解,不如先问问LLM(比如:ChatGPT)的意见——Self-Ask-1.4.4\">4.4 并非所有问题都需要拆解,不如先问问LLM(比如:ChatGPT)的意见——Self-Ask</a></span></li><li><span><a href=\"#4.5-集思广益——Self-Consistency\" data-toc-modified-id=\"4.5-集思广益——Self-Consistency-1.4.5\">4.5 集思广益——Self Consistency</a></span></li></ul></li><li><span><a href=\"#5.-ChatGPT以及GPT-4的推理能力\" data-toc-modified-id=\"5.-ChatGPT以及GPT-4的推理能力-1.5\">5. ChatGPT以及GPT-4的推理能力</a></span></li><li><span><a href=\"#6.-本章总结\" data-toc-modified-id=\"6.-本章总结-1.6\">6. 本章总结</a></span></li><li><span><a href=\"#相关文献\" data-toc-modified-id=\"相关文献-1.7\">相关文献</a></span></li></ul></li></ul></div>"
11
+ ]
12
+ },
3
13
{
4
14
"cell_type" : " markdown" ,
5
15
"metadata" : {},
1537
1547
" response = openai.ChatCompletion.create(\n " ,
1538
1548
" model=MODEL,\n " ,
1539
1549
" messages=[\n " ,
1540
- " {\" role\" : \" user\" , \" content\" : \" 你现在是 MultisatgeGPT :你与 ChatGPT 一样,但对于每一个问题,\\ n \\\n " ,
1550
+ " {\" role\" : \" user\" , \" content\" : \" 你现在是 MultistageGPT :你与 ChatGPT 一样,但对于每一个问题,\\ n \\\n " ,
1541
1551
" 你会将问题分解为子问题,然后将它们结合起来,输出最佳的措辞、最全面和最准确的答案。输出应该看起来像这样:\\ n \\\n " ,
1542
- " ChatGPT:{ChatGPT 通常会说什么}; MultisatgeGPT :{更好、更全面的答案} 让我们从简单的问题开始:5*10 - 3*10 = ?\" },\n " ,
1552
+ " ChatGPT:{ChatGPT 通常会说什么}; MultistageGPT :{更好、更全面的答案} 让我们从简单的问题开始:5*10 - 3*10 = ?\" },\n " ,
1543
1553
" ],\n " ,
1544
1554
" temperature=0,\n " ,
1545
1555
" )\n " ,
1566
1576
" response = openai.ChatCompletion.create(\n " ,
1567
1577
" model=MODEL,\n " ,
1568
1578
" messages=[\n " ,
1569
- " {\" role\" : \" user\" , \" content\" : \" 你现在是 MultisatgeGPT :你与 ChatGPT 一样,但对于每一个问题,\\ n \\\n " ,
1579
+ " {\" role\" : \" user\" , \" content\" : \" 你现在是 MultistageGPT :你与 ChatGPT 一样,但对于每一个问题,\\ n \\\n " ,
1570
1580
" 你会将问题分解为子问题,然后将它们结合起来,输出最佳的措辞、最全面和最准确的答案。输出应该看起来像这样:\\ n \\\n " ,
1571
- " ChatGPT:{ChatGPT 通常会说什么};MultisatgeGPT :{更好、更全面的答案} 让我们从简单的问题开始:[32, 21,90]中最大的数,与[19,233, 90]中最小的数,相差多少?\" },\n " ,
1581
+ " ChatGPT:{ChatGPT 通常会说什么};MultistageGPT :{更好、更全面的答案} 让我们从简单的问题开始:[32, 21,90]中最大的数,与[19,233, 90]中最小的数,相差多少?\" },\n " ,
1572
1582
" ],\n " ,
1573
1583
" temperature=0,\n " ,
1574
1584
" )\n " ,
1905
1915
],
1906
1916
"metadata" : {
1907
1917
"kernelspec" : {
1908
- "display_name" : " Python 3 (ipykernel) " ,
1918
+ "display_name" : " Python 3" ,
1909
1919
"language" : " python" ,
1910
1920
"name" : " python3"
1911
1921
},
1947
1957
"skip_h1_title" : false ,
1948
1958
"title_cell" : " Table of Contents" ,
1949
1959
"title_sidebar" : " Contents" ,
1950
- "toc_cell" : false ,
1960
+ "toc_cell" : true ,
1951
1961
"toc_position" : {
1952
1962
"height" : " calc(100% - 180px)" ,
1953
1963
"left" : " 10px" ,
1960
1970
},
1961
1971
"nbformat" : 4 ,
1962
1972
"nbformat_minor" : 2
1963
- }
1973
+ }
0 commit comments