นี่เป็นโครงการทดลอง/การวิจัยมากกว่า มันใช้งานท่อส่งพร้อมกับ wrapper สำหรับขั้นตอนการประกาศอัตโนมัติและค้นหาผ่าน "พื้นที่ขั้นตอน" (เช่นโดยการค้นหาลำแสง, MCTs, ฯลฯ ) ได้รับคำแนะนำจากการประเมินตนเอง
รหัสการสกัด/ตอบคำถามบางส่วน ( utils.py
และ answer_extraction.py
) ได้รับการดัดแปลงจาก: https://github.com/agi-edgerunners/plan-and-solve-Prompting
ชุดข้อมูลอ้างอิง:
@misc{cobbe2021training,
title={Training Verifiers to Solve Math Word Problems},
author={Karl Cobbe and Vineet Kosaraju and Mohammad Bavarian and Mark Chen and Heewoo Jun and Lukasz Kaiser and Matthias Plappert and Jerry Tworek and Jacob Hilton and Reiichiro Nakano and Christopher Hesse and John Schulman},
year={2021},
eprint={2110.14168},
archivePrefix={arXiv},
primaryClass={cs.LG}}
@inproceedings{patel-etal-2021-nlp,
title = "Are {NLP} Models really able to Solve Simple Math Word Problems?",
author = "Patel, Arkil and
Bhattamishra, Satwik and
Goyal, Navin",
booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
month = jun,
year = "2021",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2021.naacl-main.168",
doi = "10.18653/v1/2021.naacl-main.168",
pages = "2080--2094",
abstract = "The problem of designing NLP solvers for math word problems (MWP) has seen sustained research activity and steady gains in the test accuracy. Since existing solvers achieve high performance on the benchmark datasets for elementary level MWPs containing one-unknown arithmetic word problems, such problems are often considered {``}solved{''} with the bulk of research attention moving to more complex MWPs. In this paper, we restrict our attention to English MWPs taught in grades four and lower. We provide strong evidence that the existing MWP solvers rely on shallow heuristics to achieve high performance on the benchmark datasets. To this end, we show that MWP solvers that do not have access to the question asked in the MWP can still solve a large fraction of MWPs. Similarly, models that treat MWPs as bag-of-words can also achieve surprisingly high accuracy. Further, we introduce a challenge dataset, SVAMP, created by applying carefully chosen variations over examples sampled from existing datasets. The best accuracy achieved by state-of-the-art models is substantially lower on SVAMP, thus showing that much remains to be done even for the simplest of the MWPs.",
}
@inproceedings{ling-etal-2017-program,
title = "Program Induction by Rationale Generation: Learning to Solve and Explain Algebraic Word Problems",
author = "Ling, Wang and
Yogatama, Dani and
Dyer, Chris and
Blunsom, Phil",
booktitle = "Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = jul,
year = "2017",
address = "Vancouver, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/P17-1015",
doi = "10.18653/v1/P17-1015",
pages = "158--167",
abstract = "Solving algebraic word problems requires executing a series of arithmetic operations{---}a program{---}to obtain a final answer. However, since programs can be arbitrarily complicated, inducing them directly from question-answer pairs is a formidable challenge. To make this task more feasible, we solve these problems by generating answer rationales, sequences of natural language and human-readable mathematical expressions that derive the final answer through a series of small steps. Although rationales do not explicitly specify programs, they provide a scaffolding for their structure via intermediate milestones. To evaluate our approach, we have created a new 100,000-sample dataset of questions, answers and rationales. Experimental results show that indirect supervision of program learning via answer rationales is a promising strategy for inducing arithmetic programs.",}
@inproceedings{talmor-etal-2019-commonsenseqa,
title = "{C}ommonsense{QA}: A Question Answering Challenge Targeting Commonsense Knowledge",
author = "Talmor, Alon and
Herzig, Jonathan and
Lourie, Nicholas and
Berant, Jonathan",
booktitle = "Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)",
month = jun,
year = "2019",
address = "Minneapolis, Minnesota",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/N19-1421",
doi = "10.18653/v1/N19-1421",
pages = "4149--4158",
abstract = "When answering a question, people often draw upon their rich world knowledge in addition to the particular context. Recent work has focused primarily on answering questions given some relevant document or context, and required very little general background. To investigate question answering with prior knowledge, we present CommonsenseQA: a challenging new dataset for commonsense question answering. To capture common sense beyond associations, we extract from ConceptNet (Speer et al., 2017) multiple target concepts that have the same semantic relation to a single source concept. Crowd-workers are asked to author multiple-choice questions that mention the source concept and discriminate in turn between each of the target concepts. This encourages workers to create questions with complex semantics that often require prior knowledge. We create 12,247 questions through this procedure and demonstrate the difficulty of our task with a large number of strong baselines. Our best baseline is based on BERT-large (Devlin et al., 2018) and obtains 56{%} accuracy, well below human performance, which is 89{%}.",
}
@article{geva-etal-2021-aristotle,
title = "Did Aristotle Use a Laptop? A Question Answering Benchmark with Implicit Reasoning Strategies",
author = "Geva, Mor and
Khashabi, Daniel and
Segal, Elad and
Khot, Tushar and
Roth, Dan and
Berant, Jonathan",
journal = "Transactions of the Association for Computational Linguistics",
volume = "9",
year = "2021",
address = "Cambridge, MA",
publisher = "MIT Press",
url = "https://aclanthology.org/2021.tacl-1.21",
doi = "10.1162/tacl_a_00370",
pages = "346--361",
abstract = "A key limitation in current datasets for multi-hop reasoning is that the required steps for answering the question are mentioned in it explicitly. In this work, we introduce StrategyQA, a question answering (QA) benchmark where the required reasoning steps are implicit in the question, and should be inferred using a strategy. A fundamental challenge in this setup is how to elicit such creative questions from crowdsourcing workers, while covering a broad range of potential strategies. We propose a data collection procedure that combines term-based priming to inspire annotators, careful control over the annotator population, and adversarial filtering for eliminating reasoning shortcuts. Moreover, we annotate each question with (1) a decomposition into reasoning steps for answering it, and (2) Wikipedia paragraphs that contain the answers to each step. Overall, StrategyQA includes 2,780 examples, each consisting of a strategy question, its decomposition, and evidence paragraphs. Analysis shows that questions in StrategyQA are short, topic-diverse, and cover a wide range of strategies. Empirically, we show that humans perform well (87{%}) on this task, while our best baseline reaches an accuracy of ∼ 66{%}.",
}
requirements.txt
(ห้องสมุดหลัก 3 ขนาดใหญ่คือ HuggingFace Transformers, VLLM และ Pytorch - ส่วนที่เหลือส่วนใหญ่เป็นพึ่งพา)ฐานรหัสส่วนใหญ่ถูกตั้งค่าให้ทำงานกับรุ่นที่เข้ากันได้กับ VLLM
model.py
(ดูตัวสร้างของคลาส Generator) ฉันใช้เส้นทางจุดตรวจที่ดาวน์โหลดในเครื่องดังนั้นมันจะไม่ทำงานนอกกรอบเว้นแต่คุณจะดาวน์โหลดจุดตรวจในเส้นทางที่คล้ายกันหรือเปลี่ยนเส้นทางหากคุณต้องการเพิ่มรุ่นใหม่ (เข้ากันได้กับ VLLM) ทำสิ่งต่อไปนี้:
argparser.py
สำหรับตัวเลือก model
prompt.py
(ดูตัวอย่างในตอนท้ายของไฟล์รหัส) (ไม่บังคับ; มีพรอมต์เริ่มต้น แต่อาจจะไม่เหมาะสม)model.py
(ดูตัวสร้างของคลาส Generator ในไฟล์นั้นสำหรับตัวอย่าง)นี่เป็นเทมเพลตทั่วไปสำหรับการดำเนินการรหัส:
python main.py --search_style=MultiSearch --model=LLAMA30_instruct --gpu_ids="0,1" --prompt_style=cot --dataset=gsm8k --reward_types=confidence+correctness
สิ่งนี้จะเรียกใช้ Llama 30b สั่งโดยไม่ต้องใช้โซ่-ช็อต ( cot
) โดยใช้การวิจัย MultiSearch
(เพื่ออธิบายด้านล่าง) เป็นกลยุทธ์การค้นหาบน GSM8K
โดยใช้ฟังก์ชั่นรางวัล ( confidence+correctness
-เพื่ออธิบายด้านล่าง) สำหรับคำแนะนำการค้นหา . น้ำหนักแบบจำลองจะถูกแจกจ่ายไปยัง CUDA: 0 และ CUDA: 1 (กำหนด gpu_ids="0,1"
)
ข้อโต้แย้งที่สำคัญอื่น ๆ :
checkpoint
- ตั้งค่าเป็นจริงหากคุณกำลังโหลดจุดตรวจสอบที่บันทึกไว้ก่อนหน้านี้ (จุดตรวจจะถูกบันทึกโดยอัตโนมัติ)SC
- ตั้งค่าจริงเพื่อเปิดใช้งานความสอดคล้องของตนเอง [1] เกี่ยวข้องเฉพาะในกรณีที่ search_style=none
ตัวเลือกที่มีอยู่สำหรับแต่ละอาร์กิวเมนต์และค่าเริ่มต้นสามารถพบได้ใน argparser.py
คุณจะพบบันทึกการดำเนินการใน logs/
ในโครงการนี้เราใช้กลยุทธ์การค้นหาที่หลากหลายในระดับขั้นตอนการใช้เหตุผล (แต่ละขั้นตอนการใช้เหตุผลจะนับเป็น "การเคลื่อนไหวครั้งเดียวในเกม") สิ่งนี้ยังทำให้เกิดคำถามเกี่ยวกับวิธีการย่อยสลายรุ่นเป็นชุดของขั้นตอน วิธีหนึ่งในการทำเช่นนั้นคือการสร้างเทมเพลตพรอมต์โดยพลการใด ๆ ที่มีโครงสร้างที่ชัดเจน (ซึ่งสามารถใช้สำหรับขั้นตอนการแยกวิเคราะห์) จากนั้นใช้ตัวอย่างช็อตสองสามครั้งกับเทมเพลตเพื่อทำโมเดลเพื่อติดตามโครงสร้าง อย่างไรก็ตามที่นี่ฉันสนใจระบอบการปกครองแบบศูนย์ ฉันพยายามใช้คำแนะนำที่รวดเร็วเป็นศูนย์ในรูปแบบเฉพาะเพื่อกระตุ้นให้เกิดการกำหนดขั้นตอนอัตโนมัติในรูปแบบที่แตกต่างกัน ด้านล่างนี้ฉันพูดถึงรูปแบบที่รวดเร็วทั้งหมดที่ใช้ในโครงการนี้และวิธีการสลายตัวที่สอดคล้องกัน
Chain-of-Thoughts ( cot
)-สิ่งนี้ใช้พรอมต์ zero-shot cot มาตรฐาน Let's think step by step.
[2]. สำหรับการสลายตัวของขั้นตอน n
(บรรทัดใหม่) มีการตั้งค่าเพิ่มเติมบางอย่างสำหรับการละเว้นบรรทัดใหม่ที่ว่างเปล่าอย่างถูกต้องและอื่น ๆ ในที่สุดนี่ไม่ได้เป็นวิธีที่เหมาะอย่างยิ่งในการย่อยสลายขั้นตอนการให้เหตุผลไม่ใช่บรรทัดใหม่ทั้งหมดในผลลัพธ์ COT จะเป็นขั้นตอนการใช้เหตุผลอย่างสมบูรณ์ แต่เป็นจุดเริ่มต้นพื้นฐานที่สามารถทำได้ในลักษณะที่ไม่มีการยิง
chain-of-thoughts ขั้นตอน ( cot_step
)-นี่เป็นส่วนขยายที่เรียบง่ายของ COT Zero-shot: Let's think step by step. Step 1:
สิ่งนี้จะกำหนดรูปแบบภาษาโดยอัตโนมัติเพื่อจัดระเบียบห่วงโซ่การให้เหตุผลในขั้นตอนที่มีหมายเลข (ขั้นตอนที่ 1: XYZ STEP2: ABC ... ) โครงสร้างนี้สามารถใช้งานได้ง่ายสำหรับการย่อยสลายขั้นตอน
PS+ ( ps
) - นี่คือแผน Zero -shot และการแก้ปัญหา (เวอร์ชัน PS+) ที่แนะนำใน [3] การสลายตัวของสายใหม่ใช้คล้ายกับ cot
chain-of-thoughts ( cot_tab
)-นี่คือการแจ้งเตือนแบบตารางค็อตเป็นศูนย์ที่แนะนำใน [4]- n|step|subquestion|process|result|n
เป็นวิธีง่ายๆในการสร้างขั้นตอนการให้เหตุผลแบบตารางแบบตาราง เราใช้ Newline สำหรับการสลายตัวอีกครั้ง แต่แตกต่างจากก่อนหน้านี้การสลายตัวใหม่มีความหมายมากขึ้นที่นี่ - เพราะแต่ละบรรทัดใหม่ที่สลายตัวจะสอดคล้องกับขั้นตอนในตาราง
struct ( struct
) - พรอมต์นี้ใช้องค์ประกอบของพรอมต์ข้างต้นจำนวนมาก มันให้คำแนะนำโดยละเอียดเพื่อย่อยสลายการแก้ปัญหา/คำตอบเป็นขั้นตอนและ substeps (พร้อมการระบุปัญหาย่อยข้อเท็จจริงที่เกี่ยวข้องและการแก้ปัญหา) สิ่งนี้ให้ผลลัพธ์ที่มีโครงสร้างสูงและสามารถย่อยสลายได้ตามโครงสร้างที่คล้ายกับ cot
รายละเอียดของพรอมต์สามารถพบได้ใน prompt.py
และรหัสการสลายตัวสามารถพบได้ใน node_transition.py
struct minimal ( struct_min
) - มันคล้ายกับ struct ที่มี substep น้อยกว่าหนึ่ง รายละเอียดใน prompt.py
ฉันไม่ได้เรียกใช้ตัวแปรนี้ - อาจมีข้อบกพร่อง
คุณสามารถแก้ไข prompt.py
เพื่อเพิ่มพรอมต์ช็อตสองสามครั้ง
รหัสการค้นหาทั้งหมดสามารถพบได้ใน Search/
none
- วิธีนี้ไม่ได้ใช้กลยุทธ์การค้นหาใด ๆ นอกเหนือจากการถอดรหัสโลภแบบอัตโนมัติแบบอัตโนมัติ สิ่งนี้สามารถรวมกับ SC=True
สำหรับความสอดคล้องของตนเองด้วยการสุ่มตัวอย่างหลายครั้งMultiSearch
- กลยุทธ์นี้ใช้การสุ่มตัวอย่างแบบหลายครั้ง จากนั้นรางวัลสำหรับแต่ละตัวอย่าง (รางวัลสะสมสำหรับแต่ละขั้นตอนที่สลายตัว) จะถูกสร้างขึ้นหลังจากข้อเท็จจริง รางวัลใช้สำหรับการลงคะแนนคำตอบในรูปแบบต่าง ๆ ที่จะอธิบายในภายหลังMultiGreedy
- กลยุทธ์นี้ใช้การค้นหาโลภ แต่ในระดับของขั้นตอน (ไม่เหมือน none
) ในการทำซ้ำทุกครั้งที่ได้รับห่วงโซ่ประวัติศาสตร์ของขั้นตอนการให้เหตุผลแบบจำลองจะสร้างผู้สมัครขั้นตอนต่อไป K ต่อไป จากนั้นผู้สมัคร K แต่ละคนจะได้รับคะแนน (กำหนดรางวัล) จากนั้นเลือกผู้สมัครที่ให้คะแนนสูงสุด กลยุทธ์นี้ใช้ในแบบคู่ขนานสำหรับหลาย ๆ ตัวอย่างของขั้นตอนการให้เหตุผลเริ่มต้นซึ่งนำไปสู่ผลการค้นหาหลายอย่างซึ่งสามารถใช้สำหรับความสอดคล้องกันได้ กลยุทธ์การค้นหานี้สามารถคิดได้ว่าคล้ายกับ DFS จาก Tree of Thought [5] แต่ไม่มีการย้อนรอยใด ๆBeamSearch
- นี่คือเวอร์ชันการค้นหาลำแสงด้านบน การดำเนินการได้รับแรงบันดาลใจจาก [6] ยิ่งไปกว่านั้นวิธีนี้สามารถคิดได้ว่าคล้ายกับวิธี BFS (กับเขตแดนที่ถูกตัดทอน) ที่ใช้ในต้นไม้แห่งความคิด [5]DivBeamSearch
- นี่เป็นเช่นเดียวกับการค้นหาลำแสง แต่ส่งเสริมความหลากหลายในรุ่นโดยการ จำกัด พี่น้อง ในการวนซ้ำแต่ละครั้งจะอนุญาตให้พี่น้องได้สูงสุด (m <<<< ขนาดลำแสง (ฉันใช้ m = 2)) พี่น้องได้รับอนุญาต หากมีพื้นที่ว่างในขนาดลำแสงหลังจากเลือกผู้สมัครทั้งหมดตามการ จำกัด ผู้สมัครที่เหลือจะถูกเพิ่มขึ้นตามรางวัลของพวกเขา ความคิดนั้นมีความคล้ายคลึงกันในจิตวิญญาณ [7] แต่เราไม่ได้ปรับเปลี่ยนสมการของการให้คะแนนด้วยการลงโทษ - แต่ใช้ข้อ จำกัด ที่ยากขึ้นตามที่อธิบายไว้MCTS
- นี่คือการค้นหาต้นไม้ Monte Carlo การดำเนินการตามโครงสร้างที่นี่โดยประมาณ ต้องใช้แรงบันดาลใจจาก [8]SPMCTS
- การใช้งานนี้ (Semi -Parallel Monte Carlo Tree Search) ขนานกับ MCTs อีกเล็กน้อย มันเลือกหลายใบในครั้งเดียวและม้วนออกหลายเส้นทางในครั้งเดียว ดังนั้นจึงต้องใช้การวนซ้ำต่อเนื่องน้อยลง ผลลัพธ์ที่ได้คือจำนวนตัวอย่างที่ใกล้เคียงกันกับ MCTS การใช้งานไม่ได้มีการคำนวณเทียบเท่าและไม่ได้มีวัตถุประสงค์หมายเหตุในขณะที่วิธีการบางอย่างได้รับแรงบันดาลใจจากงานก่อนหน้าพวกเขาจะไม่พยายามที่จะนำไปใช้อย่างซื่อสัตย์อย่างสมบูรณ์ของเอกสารเหล่านั้น
เช่นเดียวกับ [6,8] รางวัลสำหรับแต่ละขั้นตอนจะถูกคำนวณตามการประเมินตนเองและความเชื่อมั่นในการสร้างขั้นตอน (ขึ้นอยู่กับ logprobs) เทคนิคการประเมินตนเองใช้ LLM เพื่อประเมินรุ่นของตัวเองโดยการถามคำถามหลายทางเลือก (MCQ) เกี่ยวกับความช่วยเหลือ/ความถูกต้องของขั้นตอน (คำถามการประเมินตนเองสามารถพบได้ใน rewards.py
)
ประเภทของรางวัลและคอมโบที่แตกต่างกันมีอยู่เป็นอาร์กิวเมนต์ใน argparse.py
confidence
- ใช้ความมั่นใจเท่านั้น (ขึ้นอยู่กับ logprobs) เป็นรางวัลcorrectness
- ใช้ความน่าจะเป็นคำตอบจาก MCQ ที่เกี่ยวข้องกับความถูกต้องขั้นตอนเป็นรางวัลhelpfulness
- ใช้ความน่าจะเป็นคำตอบจาก MCQ ที่เกี่ยวข้องกับความช่วยเหลือเป็นขั้นตอนเป็นรางวัลboth
- ใช้ทั้ง correctness
และ helpfulness
confidence+correctness
- ใช้ทั้ง confidence
และ correctness
confidence+helpfulness
- ใช้ทั้ง confidence
และ helpfulness
confidence+both
- ใช้ confidence
correctness
และ helpfulness
ทั้งหมด NB: รูปแบบที่รวดเร็ว struct
และ struct-min
ปฏิบัติตามกฎที่แตกต่างกัน พวกเขามีโครงสร้าง substep ละเอียดและใช้รางวัลที่เหมาะสมสำหรับสิ่งเหล่านั้น subproblem identification substep ใช้รางวัลที่เกี่ยวข้องกับความช่วยเหลือเท่านั้น (เพราะในทางเทคนิคไม่ใช่ขั้นตอนการให้เหตุผลที่จะถูกต้อง/ไม่ถูกต้อง) และขั้นตอนการแก้ปัญหาใช้คำถามที่เกี่ยวข้องกับความถูกต้องเท่านั้น การแก้ปัญหา)
MCQs ที่ใช้สำหรับพรอมต์ที่แตกต่างกันและประเภทรางวัลที่แตกต่างกันสำหรับการประเมินตนเองสามารถพบได้ใน reward.py
กลไกการลงคะแนนคำตอบหลายประเภทจะถูกนำไปใช้และติดตามโดยอัตโนมัติพร้อมกันใน main.py
(ไม่เกี่ยวข้องกับตัวเลือกใด ๆ argparse.py
) พวกเขาคือ:
Voted Answer
ในบันทึก) - เพียงแค่การลงคะแนนเสียงข้างมากง่าย ๆ [1]Reward Voted Answer
ในบันทึก) - คล้ายกับการลงคะแนนเสียงข้างมาก แต่มูลค่าของการโหวตแต่ละครั้งคือรางวัล ( Top K Reward Voted Answer
ในบันทึก) - เลือก Top k (เราใช้ k = 5) คำตอบที่ได้รับรางวัลสูงสุดแล้วใช้การลงคะแนนรางวัลในหมู่พวกเขา สิ่งนี้จะช่วยให้การกรองคำตอบ "ไม่ดี" ที่อาจได้รับรางวัลต่ำซึ่งอาจเพิ่มลงในโหวตได้Max Reward Answer
ในบันทึก) - เลือกคำตอบด้วยรางวัลสูงสุดnode_transition.py
อีกเล็กน้อย (โดยเฉพาะการคำนวณรางวัล) แต่ไม่ได้รับประโยชน์มากนักในค่าใช้จ่ายเชิงประจักษ์none
(ซึ่งปัจจุบันเร็วที่สุด) แต่สิ่งนี้อาจต้องมีการปรับเปลี่ยน VLLM และ HuggingFace Transformers[1] ความสม่ำเสมอของตนเองช่วยปรับปรุงห่วงโซ่การให้เหตุผลทางความคิดในรูปแบบภาษา
@inproceedings{
wang2023selfconsistency,
title={Self-Consistency Improves Chain of Thought Reasoning in Language Models},
author={Xuezhi Wang and Jason Wei and Dale Schuurmans and Quoc V Le and Ed H. Chi and Sharan Narang and Aakanksha Chowdhery and Denny Zhou},
booktitle={The Eleventh International Conference on Learning Representations },
year={2023},
url={https://openreview.net/forum?id=1PL1NIMMrw}
}
[2] โมเดลภาษาขนาดใหญ่เป็นเหตุผลที่ไม่มีการยิง
@inproceedings{NEURIPS2022_8bb0d291,
author = {Kojima, Takeshi and Gu, Shixiang (Shane) and Reid, Machel and Matsuo, Yutaka and Iwasawa, Yusuke},
booktitle = {Advances in Neural Information Processing Systems},
editor = {S. Koyejo and S. Mohamed and A. Agarwal and D. Belgrave and K. Cho and A. Oh},
pages = {22199--22213},
publisher = {Curran Associates, Inc.},
title = {Large Language Models are Zero-Shot Reasoners},
url = {https://proceedings.neurips.cc/paper_files/paper/2022/file/8bb0d291acd4acf06ef112099c16f326-Paper-Conference.pdf},
volume = {35},
year = {2022}
}
[3] การแจ้งเตือนแผนและการแก้ปัญหา: การปรับปรุงการใช้เหตุผลแบบโซ่-ช็อตเป็นศูนย์โดยแบบจำลองภาษาขนาดใหญ่
@inproceedings{wang-etal-2023-plan,
title = "Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models",
author = "Wang, Lei and
Xu, Wanyu and
Lan, Yihuai and
Hu, Zhiqiang and
Lan, Yunshi and
Lee, Roy Ka-Wei and
Lim, Ee-Peng",
booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
month = jul,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.acl-long.147",
pages = "2609--2634",
abstract = "Large language models (LLMs) have recently been shown to deliver impressive performance in various NLP tasks. To tackle multi-step reasoning tasks, Few-shot chain-of-thought (CoT) prompting includes a few manually crafted step-by-step reasoning demonstrations which enable LLMs to explicitly generate reasoning steps and improve their reasoning task accuracy. To eliminate the manual efforts, Zero-shot-CoT concatenates the target problem statement with {``}textit{Let{'}s think step by step}{''} as an input prompt to LLMs. Despite the success of Zero-shot-CoT, it still suffers from three pitfalls: calculation errors, missing-step errors, and semantic misunderstanding errors. To address the missing-step errors, we propose Plan-and-Solve (PS) Prompting. It consists of two components: first, devising a plan to divide the entire task into smaller subtasks, and then carrying out the subtasks according to the plan. To address the calculation errors and improve the quality of generated reasoning steps, we extend PS prompting with more detailed instructions and derive PS+ prompting. We evaluate our proposed prompting strategy on ten datasets across three reasoning problems. The experimental results over GPT-3 show that our proposed zero-shot prompting consistently outperforms Zero-shot-CoT across all datasets by a large margin, is comparable to or exceeds Zero-shot-Program-of-Thought Prompting, and has comparable performance with 8-shot CoT prompting on the math reasoning problem. The code can be found at https://github.com/AGI-Edgerunners/Plan-and-Solve-Prompting.",
}
[4] Tab-Cot: Zero-Shot Tabular Chain of Thought
@inproceedings{ziqi-lu-2023-tab,
title = "Tab-{C}o{T}: Zero-shot Tabular Chain of Thought",
author = "Ziqi, Jin and
Lu, Wei",
booktitle = "Findings of the Association for Computational Linguistics: ACL 2023",
month = jul,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2023.findings-acl.651",
pages = "10259--10277",
abstract = "The chain-of-though (CoT) prompting methods were successful in various natural language processing (NLP) tasks thanks to their ability to unveil the underlying complex reasoning processes.Such reasoning processes typically exhibit highly structured steps.Recent efforts also started investigating methods to encourage more structured reasoning procedures to be captured (cite least to most).In this work, we propose Tab-CoT, a novel tabular-format CoT prompting method, which allows the complex reasoning process to be explicitly modeled in a highly structured manner.Despite its simplicity, we show that our approach is capable of performing reasoning across multiple dimensions (i.e., both rows and columns).We demonstrate our approach{'}s strong zero-shot and few-shot capabilities through extensive experiments on a range of reasoning tasks.",
}
[5] ต้นไม้แห่งความคิด: การแก้ปัญหาโดยเจตนาด้วยรูปแบบภาษาขนาดใหญ่
@misc{yao2023tree,
title={Tree of Thoughts: Deliberate Problem Solving with Large Language Models},
author={Shunyu Yao and Dian Yu and Jeffrey Zhao and Izhak Shafran and Thomas L. Griffiths and Yuan Cao and Karthik Narasimhan},
year={2023},
eprint={2305.10601},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
[6] การสลายตัวช่วยเพิ่มการใช้เหตุผลผ่านการรับรู้ตนเอง
@misc{xie2023decomposition,
title={Decomposition Enhances Reasoning via Self-Evaluation Guided Decoding},
author={Yuxi Xie and Kenji Kawaguchi and Yiran Zhao and Xu Zhao and Min-Yen Kan and Junxian He and Qizhe Xie},
year={2023},
eprint={2305.00633},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
[7] อัลกอริทึมการถอดรหัสที่เรียบง่ายและรวดเร็วสำหรับการสร้างระบบประสาท
@misc{li2016simple,
title={A Simple, Fast Diverse Decoding Algorithm for Neural Generation},
author={Jiwei Li and Will Monroe and Dan Jurafsky},
year={2016},
eprint={1611.08562},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
[8] การให้เหตุผลกับรูปแบบภาษาคือการวางแผนกับโมเดลโลก
@misc{hao2023reasoning,
title={Reasoning with Language Model is Planning with World Model},
author={Shibo Hao and Yi Gu and Haodi Ma and Joshua Jiahua Hong and Zhen Wang and Daisy Zhe Wang and Zhiting Hu},
year={2023},
eprint={2305.14992},
archivePrefix={arXiv},
primaryClass={cs.CL}
}