Language Language Models (LLMs) have shown impressive abilities in natural language understanding and generation, leading to their use in applications such as chatbots and virtual assistants. However, existing LLM frameworks face limitations in handling domain-specific data analytics tasks with rich data structures. Moreover, they struggle with flexibility to meet diverse user requirements. To address these issues, TaskWeaver is proposed as a code-first framework for building LLM-powered autonomous agents. It converts user requests into executable code and treats user-defined plugins as callable functions. TaskWeaver provides support for rich data structures, flexible plugin usage, and dynamic plugin selection, and leverages LLM coding capabilities for complex logic. It also incorporates domain-specific knowledge through examples and ensures the secure execution of generated code. TaskWeaver offers a powerful and flexible framework for creating intelligent conversational agents that can handle complex tasks and adapt to domain-specific scenarios. The code is open-sourced at https://github.com/microsoft/TaskWeaver/.
翻译:语言大模型(LLM)在自然语言理解与生成方面展现出令人瞩目的能力,已广泛应用于聊天机器人和虚拟助手等场景。然而,现有LLM框架在处理具有丰富数据结构的领域特定数据分析任务时存在局限,且在满足多样化用户需求方面缺乏灵活性。针对这些问题,本文提出TaskWeaver——一种代码优先的LLM驱动自主智能体框架。该框架将用户请求转化为可执行代码,并将用户定义的插件视为可调用函数。TaskWeaver支持丰富的数据结构、灵活的插件调用以及动态插件选择,并利用LLM的编码能力处理复杂逻辑。此外,其通过示例融入领域特定知识,同时确保生成代码的安全执行。TaskWeaver为创建能够处理复杂任务并适配领域场景的智能对话智能体提供了强大且灵活的框架。代码已在https://github.com/microsoft/TaskWeaver/开源。