Source-linked AI summary

OpenAGI: When LLM Meets Domain Experts

Yingqiang Ge, Wenyue Hua, Kai Mei, Jianchao Ji, Juntao Tan, Shuyuan Xu, Zelong Li, Yongfeng Zhang

arXiv:2304.04370v6cs.AIcs.CLcs.LG

TL;DR

OpenAGI addresses the challenge of using general-purpose LLMs and specialized expert models to solve complex, multi-step tasks. It provides an open platform whose LLM-generated plans compose external models and resources, and adds RLTF to learn from task outcomes. Evaluations report that smaller LLMs can potentially outperform larger ones when paired with suitable learning approaches such as RLTF.

  • Problem

    LLMs have promising reasoning abilities but complex real-world tasks require combining reusable skills and specialized domain expertise.

  • Method

    OpenAGI combines benchmark and open-ended multi-step tasks with LLM-controlled selection, synthesis, and execution of domain-expert models, and uses RLTF to guide planning from task feedback.

  • Results

    Smaller-scale LLMs can potentially outperform larger models when combined with an appropriate learning approach such as RLTF.

  • Takeaways & Limitations

    OpenAGI offers an open-source platform for developing and evaluating LLM task-solving through diverse tasks, models, datasets, benchmarks, and evaluation methods.

  • Takeaways & Limitations

    Ethically sound plan generation remains a potential solution that requires incorporating ethical constraints into the planning process to mitigate misuse risks.

Abstract

from arXiv · show

Human Intelligence (HI) excels at combining basic skills to solve complex tasks. This capability is vital for Artificial Intelligence (AI) and should be embedded in comprehensive AI Agents, enabling them to harness expert models for complex task-solving towards Artificial General Intelligence (AGI). Large Language Models (LLMs) show promising learning and reasoning abilities, and can effectively use external models, tools, plugins, or APIs to tackle complex problems. In this work, we introduce OpenAGI, an open-source AGI research and development platform designed for solving multi-step, real-world tasks. Specifically, OpenAGI uses a dual strategy, integrating standard benchmark tasks for benchmarking and evaluation, and open-ended tasks including more expandable models, tools, plugins, or APIs for creative problem-solving. Tasks are presented as natural language queries to the LLM, which then selects and executes appropriate models. We also propose a Reinforcement Learning from Task Feedback (RLTF) mechanism that uses task results to improve the LLM's task-solving ability, which creates a self-improving AI feedback loop. While we acknowledge that AGI is a broad and multifaceted research challenge with no singularly defined solution path, the integration of LLMs with domain-specific expert models, inspired by mirroring the blend of general and specialized intelligence in humans, offers a promising approach towards AGI. We are open-sourcing the OpenAGI project's code, dataset, benchmarks, evaluation methods, and the UI demo to foster community involvement in AGI advancement: https://github.com/agiresearch/OpenAGI.

1 Introduction

OpenAGI frames complex task-solving as adaptive composition of reusable domain-expert models, with LLMs generating plans that orchestrate these models across benchmark and open-ended tasks. The platform combines multi-step tasks, extensible resources, execution, and evaluation, while RLTF uses task feedback to improve planning.

  • Motivation: OpenAGI models each reusable tool, module, network, plugin, or API as a domain-expert skill that can be synthesized into task-specific plans.Different inputs may require distinct combinations of expert models.
  • Pipeline: The pipeline converts a natural-language task into an LLM-generated plan, selects and synthesizes expert models, executes them, and evaluates the results against ground truth.The example uses GPT-3.5, while the framework can use other LLMs and external tools, APIs, and models.
  • Task design: OpenAGI uses benchmark tasks for consistent comparison and open-ended tasks for more extensible model, tool, plugin, and API combinations.Benchmark tasks are supported by task-specific datasets and evaluation metrics.
  • Platform: OpenAGI provides complex multi-step tasks, datasets, evaluation methods, and extensible models for quantifying LLM planning and task-solving abilities.Its resources include models and datasets drawn predominantly from Hugging Face, GitHub, and LangChain.

2 Related Work

Related work establishes LLMs as capable language reasoners that remain limited on specialized tasks, motivating augmented systems that use external resources. OpenAGI addresses this landscape with extensibility, nonlinear planning, quantitative evaluation, and task-feedback-based learning.

  • Large Language Models and AI Agents: LLMs offer strong language understanding and reasoning but can produce plausible inaccuracies and struggle with problems requiring specialized domain expertise.Augmented Language Models address these limitations by enabling external-resource use.
  • Large Language Models and AI Agents: Reasoning with tools decomposes intricate assignments into smaller sub-tasks that LLMs can tackle independently or collaboratively.This provides the conceptual basis for combining language models with external capabilities.
  • OpenAGI: OpenAGI targets extensibility, nonlinear task planning, and quantitative evaluation, while introducing RLTF and nonlinear planning within its learning schema.The stated goals include addressing OOD generalization, optimal planning, and AI self-improvement.
  • Reinforcement Learning from Human Feedback: RLTF uses task feedback rather than human intervention to guide LLM learning toward improved and more efficient strategies.This contrasts with RLHF, whose effectiveness depends on feedback from skilled human labelers.

3 The OpenAGI Platform

OpenAGI provides a structured platform for evaluating LLM planning on complex multi-step tasks and extending that planning to open-ended multimodal tasks. It combines reusable domain expert models, task-specific datasets and metrics, and expandable external tools.

  • 3.1.1 Domain Expert Model Set: OpenAGI organizes benchmark tasks around reusable domain expert models and task-specific datasets and evaluation metrics.Users can incorporate their own domain tasks and models, while benchmark tasks support structured comparison of LLM performance.
  • 3.1.2 Multi-step Tasks and Corresponding Datasets Construction: Multi-step tasks combine stages such as denoising followed by super-resolution, object detection followed by text generation, or translation followed by summarization.The platform constructs complex tasks by augmenting raw datasets with Gaussian blur, Gaussian noise, grayscale, low resolution, translation, and word masking.
  • 3.1.2 Multi-step Tasks and Corresponding Datasets Construction: 185 multi-step tasks are provided: 117 linear tasks and 68 non-linear tasks, including complex QA and VQA settings.The tasks are categorized by input and output modalities, including image, text, and multimodal combinations.
  • 3.1.2 Multi-step Tasks and Corresponding Datasets Construction: Benchmark performance is assessed with CLIP Score for text-to-image generation, BERT Score for text outputs, and ViT Score for other image outputs.The scores are assigned according to task categories and normalized for BERT and CLIP evaluations.
  • 3.2 Open-ended Tasks: Open-ended tasks use expandable expert models and tools from sources such as Google Search, Wikipedia, and Wolfram Alpha rather than fixed guidelines or performance metrics.An example creates a traditional Chinese painting, poem, and music in a coordinated sequence around “Gao Shan Liu Shui.”

4 Reinforcement Learning from Task Feedback (RLTF)

RLTF uses task feedback to guide LLM learning for complex task solving, while OpenAGI evaluates planning across benchmark and open-ended settings. Experiments compare learning schemas, prompts, and models, including nonlinear planning cases.

  • RLTF mechanism: RLTF uses task feedback to provide learning signals that improve and make LLM task-solving strategies more efficient.The approach uses REINFORCE and is intended for real-world tasks requiring deeper context and environmental understanding.
  • Experimental settings: OpenAGI experiments compare zero-shot, few-shot, fine-tuning, and RLTF learning schemas across closed-source and open-source LLMs.Open-source LLMs are optimized with LoRA for fine-tuning and RLTF.
  • Experimental results: GPT-4 leads closed-source models under zero-shot and few-shot settings, while LLaMA-2-13B leads open-source models across learning schemas.The reported open-source advantage may be influenced by LLaMA-2-13B’s larger model size.
  • Experimental results: Each evaluated open-source model reaches its highest reported performance under RLTF, and tuned LLaMA-2-13B approaches GPT-3.5 performance.Fine-tuning and RLTF produce noticeable gains over zero-shot and few-shot learning for the open-source models.
  • Non-linear planning: Nonlinear planning varies substantially across models: GPT-3.5 successfully comprehends the task, whereas Flan-T5-Large struggles and Vicuna-7B uses all provided models.The task combines image restoration with English question answering and English-to-German translation.

6 Conclusions and Future Work

The paper presents OpenAGI as an open-source platform for evaluating LLMs on complex multi-step tasks through domain-expert models, tools, plugins, and APIs. It combines this platform with LLM+RLTF and identifies human-in-the-loop, trustworthy, and self-improving agents as future directions.

  • Conclusions: OpenAGI provides tasks, models, datasets, benchmarks, and evaluation methods for LLM-driven manipulation of domain expert models, tools, plugins, and APIs.The platform targets complex, multi-step task solving and evaluation.
  • Conclusions: Evaluations suggest that smaller-scale LLMs can potentially outperform larger models when paired with an appropriate learning approach such as RLTF.This conclusion is stated within the OpenAGI pipeline and its tested learning schemas.
  • Future Work: Future work includes human-in-the-loop agents, trustworthy agents, and self-improving agents.These directions target collaboration with human experts, safety and ethical standards, and automated task generation and training.

Supplementary Material for OpenAGI

The supplementary material identifies research challenges involved in solving complex, multi-step tasks with augmented LLMs.

  • Research challenges: The supplementary material presents research challenges for solving complex, multi-step tasks with augmented LLMs.The challenges are summarized in Figure A.1.

A.1 Research Challenges

OpenAGI identifies OOD generalization and optimal task planning as research challenges, then introduces RLTF to refine planning from task-performance feedback.

  • Research Challenges: OpenAGI highlights OOD generalization, optimal task planning, and multiple valid solutions with varying quality as central challenges.Expert models can depend strongly on training-data distributions, while different model sequences can produce substantially different results.
  • Reinforcement Learning from Task Feedback: RLTF uses performance feedback collected after executing an LLM-generated solution to refine the LLM’s planning strategy.The mechanism is presented as addressing OOD generalization and optimal task planning challenges.

A.2 Original Datasets

OpenAGI draws on established datasets spanning image classification, object understanding, summarization, sentiment analysis, visual question answering, and question answering.

  • Vision Datasets: ImageNet-1K contains approximately 1 million images across 1,000 classes for image classification, object recognition, and transfer learning.It is derived from the broader ImageNet database.
  • Vision Datasets: COCO contains over 200,000 labeled images, 1.5 million object instances, and 80 categories for detection, segmentation, and captioning.Its scenes include multiple objects, varied scales, and diverse contexts.
  • Language Datasets: CNN/Daily Mail provides human-generated abstractive summaries from news articles for text-summarization research.The passage describes scripts for crawling, extracting, and generating question-answer pairs.
  • Language Datasets: SST2 contains 11,855 movie-review sentences and 215,154 annotated phrases for analyzing compositional sentiment.Each phrase was annotated by three human judges.
  • Multimodal and QA Datasets: TextVQA evaluates visual reasoning over text appearing in images, requiring integration of visual and textual cues.The benchmark focuses on answering questions about image-embedded text.
  • Multimodal and QA Datasets: SQuAD consists of question-answer pairs from Wikipedia in which answers can be any token sequence in the corresponding text.Crowdsourcing yields diverse questions and answers.

A.3 Data Augmentation Methods

OpenAGI augments raw datasets to create complex multi-step tasks by applying degradations, transformations, masking operations, and task-specific sample construction.

  • Task Construction: Raw images can be noised and downsampled so recovery requires image denoising and super-resolution before classification.This constructs multi-step datasets from ImageNet-1K examples.
  • Image Augmentations: Gaussian Blur smooths images and reduces noise by convolving them with a Gaussian filter kernel.The resulting output is blurred.
  • Image Augmentations: Gaussian Noise adds noise drawn from a Gaussian distribution.
  • Image Augmentations: Grayscale converts a colorful image into a grayscale image.
  • Image Augmentations: Low Resolution represents images with reduced pixel density measured in pixels per inch.
  • Text Augmentations: Translation converts text between languages, using an English-to-German translator in this work.
  • Text Augmentations: Word Mask randomly replaces one word in a sentence with the “[MASK]” token.

A.4 Evaluation Metrics

OpenAGI uses reference-free and embedding-based metrics to evaluate generated captions, language outputs, and image similarity.

  • Evaluation Metrics: CLIP Score measures correlation between a generated image caption and the image content without requiring a reference caption.The passage states that it correlates strongly with human judgment for image-caption evaluation.
  • Evaluation Metrics: BERT Score compares candidate and reference sentences using contextual BERT embeddings and cosine similarity, with F1 used in this work.It computes precision, recall, and F1 measures.
  • Evaluation Metrics: ViT Score measures visual similarity between two images using cosine similarity of Vision Transformer embeddings.

A.5 Dataset Documentation and Data Samples for Benchmark Tasks

The benchmark dataset evaluates LLM planning with domain expert models through 185 augmented multi-step tasks, covering both linear and non-linear structures. Each benchmark task includes 100 augmented samples, with materials released for transparency and accessibility.

  • 185 multi-step tasks evaluate LLM planning with domain expert models.The collection includes 117 linear tasks and 68 non-linear tasks.
  • 117 tasks follow simple sequences, while 68 allow concurrent or complex step ordering.
  • Each benchmark task is accompanied by a small dataset containing 100 augmented data samples.
  • The dataset enhances standard CV/NLP datasets using varied data-augmentation methodologies.
  • A machine-translation example applies Word Mask augmentation to clozed English text before step-by-step English-to-German translation.

A.6 Details of RLTF

RLTF treats the OpenAGI platform as an environment where an LLM generates executable model plans and receives dataset performance as reward. Constrained generation restricts plans to valid model names and modality-compatible sequences, while the framework also addresses safety and future expansion.

  • RLTF objective: RLTF fine-tunes the LLM using task performance on augmented datasets as a reinforcement-learning reward.The LLM generates a solution for task t, executes it on dataset D_t, and uses the resulting performance as reward R.
  • RLTF objective: The LLM maximizes expected reward on the training set, while REINFORCE updates parameters because the reward is non-differentiable.
  • RLTF optimization: A moving-average baseline reduces the high variance of the gradient estimate.
  • Constrained generation: Constrained beam search restricts decoding to model names and enforces valid model sequences through input-output modality matching.A prefix trie represents allowable model-name continuations, while modality constraints determine permissible next models.
  • Constrained generation: Zero-shot prompting often produces invalid plans, whereas manually labeled few-shot plans improve generation guidance.The passage specifically reports repetitive outputs from GPT-3.5 and unreasonable plans from Vicuna-7B and Flan-T5-Large in the zero-shot setting.
  • Broader impacts and future directions: The framework incorporates plan constraints intended to guide agents toward ethically sound and benign solutions for complex tasks.
Loading 2304.04370v6…