论文 | ART: Automatic multi-step reasoning and tool-use for large language models

 摘要:

  • LLM 在进行多步推理和工具使用时存在局限性,例如需要大量标注数据或专门训练。
  • 现有的 CoT 提示和工具使用方法难以扩展到新任务和工具。
  • 本文介绍了 ART 框架,该框架使用冻结的 LLM 自动生成推理步骤,并选择和调用外部工具。
  • ART 在 BigBench 和 MMLU 基准测试中取得了显著的性能提升,并可以接受人类反馈进行改进。

 主要内容

  • ART 框架
    • 任务库 (Task Library): 存储了来自不同任务的程序,这些程序展示了如何将任务分解为多个步骤,并使用工具进行计算。
    • 工具库 (Tool Library): 提供了可用的外部工具,例如搜索引擎、代码生成器、代码执行器和知识库查询工具。
    • 自动推理引擎 (Automatic Reasoning Engine): 解析 LLM 生成的程序,并根据程序中的工具调用节点自动调用工具。
    • 人类反馈 (Human Feedback): 用户可以添加新的任务和工具到库中,并通过编辑程序来改进性能,并提供调试工具。
  • ART 的优势
    • 模块化设计: ART 采用模块化设计,每个模块都独立运作,易于扩展和改进。
    • 灵活性和可扩展性: 用户可以轻松地添加新的任务和工具到库中,并定义相应的程序。
    • 可解释性: 生成的程序使用 PeG 语法,具有明确的结构,易于理解。
    • 人类反馈: 用户可以提供调试和改进意见,使 ART 的性能不断提升。

实验结果: 

  • 在 BigBench 和 MMLU 基准测试中,ART 在未见过的任务上取得了显著的性能提升,甚至超过了人工编写的 CoT 提示。
  • 工具使用在测试任务上平均提高了 12.3 个百分点。
  • 通过人类反馈,可以进一步改进 ART 的性能,使其超过 GPT-3 的最佳结果。

 结论

        ART 是一个强大的框架,可以显著提高 LLM 在多步推理和工具使用方面的能力。它可以轻松地扩展到新的任务和工具,并通过人类反馈进行改进,为 LLM 的发展和应用开辟了新的可能性。 

个人思考: 

  • ART 框架展示了 LLM 未来的发展方向,即通过结合任务库、工具库和自动推理机制,实现更强大的智能。
  • 人类反馈在改进 LLM 性能方面发挥着重要作用,未来需要探索更有效的反馈机制。
  • LLM 的应用前景广阔,未来需要在更多领域进行探索和实验。

 

 

### Chain-of-Thought Prompting Mechanism in Large Language Models In large language models, chain-of-thought prompting serves as a method to enhance reasoning capabilities by guiding the model through structured thought processes. This approach involves breaking down complex problems into simpler components and providing step-by-step guidance that mirrors human cognitive processing. The creation of these prompts typically includes selecting examples from training datasets where each example represents part of an overall problem-solving process[^2]. By decomposing tasks into multiple steps, this technique encourages deeper understanding and more accurate predictions compared to traditional methods. For instance, when faced with multi-hop question answering or logical deduction challenges, using such chains allows models not only to generate correct answers but also articulate intermediate thoughts leading up to those conclusions. Such transparency facilitates better interpretability while improving performance on various NLP benchmarks. ```python def create_chain_of_thought_prompt(task_description, examples): """ Creates a chain-of-thought prompt based on given task description and examples. Args: task_description (str): Description of the task at hand. examples (list): List containing tuples of input-output pairs used for demonstration purposes. Returns: str: Formatted string representing the final prompt including both instructions and sample cases. """ formatted_examples = "\n".join([f"Input: {ex[0]}, Output: {ex[1]}" for ex in examples]) return f""" Task: {task_description} Examples: {formatted_examples} Now try solving similar questions following above pattern. """ # Example usage examples = [ ("What color do you get mixing red and blue?", "Purple"), ("If it rains tomorrow, will we have our picnic?", "No") ] print(create_chain_of_thought_prompt("Solve logic puzzles", examples)) ```
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值