Large 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/.
翻译:大型语言模型(LLMs)在自然语言理解与生成方面展现了令人瞩目的能力,因而被用于聊天机器人和虚拟助手等应用中。然而,现有LLM框架在处理包含丰富数据结构的领域特定数据分析任务时存在局限性。此外,它们在满足用户多样化需求的灵活性方面也存在不足。为解决这些问题,本文提出TaskWeaver——一种用于构建基于LLM的自主智能体的代码优先框架。该框架将用户请求转换为可执行代码,并将用户定义的插件视为可调用函数。TaskWeaver支持丰富的数据结构、灵活的插件使用以及动态插件选择,并利用LLM的编码能力处理复杂逻辑。它通过示例整合领域特定知识,确保生成代码的安全执行。TaskWeaver为创建能够处理复杂任务并适应领域特定场景的智能对话智能体提供了一种强大且灵活的框架。代码已在https://github.com/microsoft/TaskWeaver/开源。