• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
Montreal AI Ethics Institute

Montreal AI Ethics Institute

Democratizing AI ethics literacy

  • Articles
    • Public Policy
    • Privacy & Security
    • Human Rights
      • Ethics
      • JEDI (Justice, Equity, Diversity, Inclusion
    • Climate
    • Design
      • Emerging Technology
    • Application & Adoption
      • Health
      • Education
      • Government
        • Military
        • Public Works
      • Labour
    • Arts & Culture
      • Film & TV
      • Music
      • Pop Culture
      • Digital Art
  • Columns
    • AI Policy Corner
    • Recess
  • The AI Ethics Brief
  • AI Literacy
    • Research Summaries
    • AI Ethics Living Dictionary
    • Learning Community
  • The State of AI Ethics Report
    • Volume 6 (February 2022)
    • Volume 5 (July 2021)
    • Volume 4 (April 2021)
    • Volume 3 (Jan 2021)
    • Volume 2 (Oct 2020)
    • Volume 1 (June 2020)
  • About
    • Our Contributions Policy
    • Our Open Access Policy
    • Contact
    • Donate

Responsible Generative AI: A Reference Architecture for Designing Foundation Model-based Agents

February 14, 2024

馃敩 Research Summary by Dr. Qinghua Lu, the team leader of the Responsible AI science team at CSIRO’s Data61 and is the winner of the 2023 APAC Women in AI Trailblazer Award.

[Original paper by Qinghua Lu, Liming Zhu, Xiwei Xu, Zhenchang Xing, Stefan Harrer, and Jon Whittle]


Overview: Foundation models, such as large language models (LLMs), have been widely recognized as transformative AI technologies due to their capabilities to understand and generate content, including plans with reasoning capabilities. Foundation model-based agents derive their autonomy from the capabilities of foundation models, which enable them to autonomously break down a given goal into manageable tasks and orchestrate task execution to meet the goal. This paper presents a pattern-oriented reference architecture that serves as guidance when designing foundation model-based agents. We evaluate the completeness and utility of the proposed reference architecture by mapping it to the architecture of two real-world agents.


Introduction

Foundation models (FMs), such as large language models (LLMs), have been widely recognized as transformative generative artificial intelligence (AI) technologies due to their remarkable capabilities to understand and generate content. Recently, a rapidly growing interest has been in the development of FM-based autonomous agents, such as Auto-GPT and BabyAGI. With autonomous agents, users only need to provide a high-level goal rather than providing explicit step-by-step instructions. These agents derive their autonomy from the capabilities of FMs, enabling them to autonomously break down the given goal into manageable tasks and orchestrate task execution to fulfill the goal. Nevertheless, the architectural design of the agents has not yet been systematically explored. Many reusable solutions have been proposed to address the diverse challenges of designing FM-based agents, which motivates the design of a reference architecture for FM-based agents. Therefore, we have performed a systematic literature review on FM-based agents. A collection of architectural components and patterns have been identified to address different challenges of agent design. This paper presents a pattern-oriented reference architecture that provides architecture design guidance for designing FM-based agents. We evaluate the completeness and utility of the proposed reference architecture by mapping it to the architecture of two real-world agents.

Key Insights

We provide an architectural overview of an agent-based ecosystem. Users define high-level goals for the agents to achieve. The agents can be categorized into two types: agent-as-a-coordinator and agent-as-a-worker. Agents in the coordinator role primarily formulate high-level strategies and orchestrate the execution of tasks by delegating task execution responsibilities to other agents, external tools, or non-agent systems. On the other hand, agents in the worker role need to generate strategies and execute specific tasks in line with those strategies. To complete these tasks, agents in the worker role may need to cooperate or compete with other agents or call external tools or non-agent AI/non-AI systems.

Interaction engineering comprises two components: context engineering and prompt/response engineering. Context engineering is designed to collect and structure the agent’s context to understand the user’s goals. In contrast, prompt/response engineering generates prompts/responses, enabling the FM-based agents to successfully achieve the human’s goals. 

Two patterns can be applied for comprehending and shaping the goals: passive goal creator and proactive goal creator. Passive goal creator analyses the user’s articulated goals, as described through text prompts submitted by the user via the dialogue interface. Conversely, a proactive goal creator goes beyond the explicit user text prompt and anticipates the user’s goals by understanding the user interface (UI) of relevant tools and human interaction.

The agent鈥檚 memory stores current context information, historical data, and knowledge accumulated over time to inform planning and actions. The memory is structured using short-term memory and long-term memory. Short-term memory refers to the information within the context window of the FM, which is in context and can be accessed by the FM during inference. To enhance the storage capacity of memory, long-term memory refers to the information maintained outside the context window of the FM.

To achieve the user鈥檚 goal, the agent needs to work out strategies and make a plan accordingly. There are two design patterns for plan generation: single-path plan generator and multi-path plan generator. The single-path plan generator orchestrates the generation of intermediate steps to achieve the user鈥檚 goal. Each step is designed to have only one subsequent step. On the other hand, a multi-path plan generator allows multiple choices at each step. Each intermediate step may lead to multiple subsequent steps.

Once the plan is determined, the role of the execution engine is to put the plan into action. The task executor is responsible for performing the tasks outlined in the plan. Within the task executor, a task monitor is necessary to monitor the task鈥檚 execution status and manage the tasks queued for execution. The tool/agent selector can search in the tool/agent registry/marketplace or on the web to find the relevant tools and agents to complete the tasks. An FM-based ranker can be applied to analyze the performance of the tools/agents and identify the best ones. The tool/agent generator can automatically create tools and agents based on natural language requirements.

A set of patterns can be adopted as plugins to ensure responsible AI. A continuous risk assessor continuously monitors and assesses AI risk metrics to prevent the agent’s misuse and to ensure the agent’s trustworthiness. A black box recorder records the runtime data, which can then be shared with relevant stakeholders to enable transparency and accountability. All these data must be kept as evidence with the timestamp and location data, e.g., using a blockchain-based immutable log. A human or AI verifier is responsible for ensuring whether the final or intermediate outputs meet the specified requirements, such as topic or trustworthiness requirements. A specific type of monitoring is called guardrails, a layer between FMs or fine-tuned FMs and other components or systems. Guardrails can be built on an RAI knowledge base, narrow models, or FMs. The RAI FMs can be fine-tuned or call upon a knowledge base to support RAI controls. The explainer鈥檚 role is to articulate the agent鈥檚 roles, capabilities, limitations, the rationale behind its intermediate or final outputs, and ethical or legal implications. The external systems, including tools, agents, and FMs, can be associated with an AI Bill Of Materials (AIBOM) that records their supply chain details, including AI risk metrics or verifiable responsible AI credentials. As there will be more rapid releases about fine-tuned FMs, there is a trend that multiple FM variations co-exist and are serviced at the same time. The co-versioning registry can be applied to co-version the AI components, such as FMs and fine-tuned FMs.

Between the lines

The contribution of this research project includes a reference architecture for FM-based agents that can be used as a template to guide the architecture design and a collection of architectural patterns that can be utilized in the architecture design of FM-based agents to ensure trustworthiness and address responsible AI-related software quantities.

This reference architecture functions as an architecture design template and enables responsible-AI-by-design. We evaluate the correctness and utility of our proposed reference architecture by mapping it to the architecture of two existing real-world agents. In future work, we plan to develop decision models for selecting patterns to assist FM-based agents’ design further.

Want quick summaries of the latest research & reporting in AI ethics delivered to your inbox? Subscribe to the AI Ethics Brief. We publish bi-weekly.

Primary Sidebar

馃攳 SEARCH

Spotlight

ALL IN Conference 2025: Four Key Takeaways from Montreal

Beyond Dependency: The Hidden Risk of Social Comparison in Chatbot Companionship

AI Policy Corner: Restriction vs. Regulation: Comparing State Approaches to AI Mental Health Legislation

Beyond Consultation: Building Inclusive AI Governance for Canada’s Democratic Future

AI Policy Corner: U.S. Executive Order on Advancing AI Education for American Youth

related posts

  • 10 Takeaways from the State of AI Ethics in Canada & Spain

    10 Takeaways from the State of AI Ethics in Canada & Spain

  • ABScribe: Rapid Exploration of Multiple Writing Variations in Human-AI Co-Writing Tasks using Large ...

    ABScribe: Rapid Exploration of Multiple Writing Variations in Human-AI Co-Writing Tasks using Large ...

  • Bias Amplification Enhances Minority Group Performance

    Bias Amplification Enhances Minority Group Performance

  • Responsible and Regulatory Conform Machine Learning for Medicine: A Survey of Challenges and Solutio...

    Responsible and Regulatory Conform Machine Learning for Medicine: A Survey of Challenges and Solutio...

  • Principios 茅ticos para una inteligencia artificial antropoc茅ntrica: consensos actuales desde una per...

    Principios 茅ticos para una inteligencia artificial antropoc茅ntrica: consensos actuales desde una per...

  • Response to Office of the Privacy Commissioner of Canada Consultation Proposals pertaining to amendm...

    Response to Office of the Privacy Commissioner of Canada Consultation Proposals pertaining to amendm...

  • Automating Extremism: Mapping the Affective Roles of Artificial Agents in Online Radicalization

    Automating Extremism: Mapping the Affective Roles of Artificial Agents in Online Radicalization

  • Prediction Sensitivity: Continual Audit of Counterfactual Fairness in Deployed Classifiers

    Prediction Sensitivity: Continual Audit of Counterfactual Fairness in Deployed Classifiers

  • An Empirical Analysis of Racial Categories in the Algorithmic Fairness Literature

    An Empirical Analysis of Racial Categories in the Algorithmic Fairness Literature

  • Confucius, cyberpunk and Mr. Science: comparing AI ethics principles between China and the EU

    Confucius, cyberpunk and Mr. Science: comparing AI ethics principles between China and the EU

Partners

  • 聽
    U.S. Artificial Intelligence Safety Institute Consortium (AISIC) at NIST

  • Partnership on AI

  • The LF AI & Data Foundation

  • The AI Alliance

Footer


Articles

Columns

AI Literacy

The State of AI Ethics Report


 

About Us


Founded in 2018, the Montreal AI Ethics Institute (MAIEI) is an international non-profit organization equipping citizens concerned about artificial intelligence and its impact on society to take action.

Contact

Donate


  • 漏 2025 MONTREAL AI ETHICS INSTITUTE.
  • This work is licensed under a Creative Commons Attribution 4.0 International License.
  • Learn more about our open access policy here.
  • Creative Commons License

    Save hours of work and stay on top of Responsible AI research and reporting with our bi-weekly email newsletter.