[논문리뷰]Exploring Large Language Model Based Intelligent Agents : Definitios, Methods, and Prospects

·2025년 1월 12일
0

논문리뷰

목록 보기
6/19

논문 제목 : Exploring Large Language Model Based Intelligent Agents : Definitios, Methods, and Prospects

논문 링크 : https://arxiv.org/pdf/2401.03428

Abstract

  • 현재 상황

llm-based agent는 robust generalization capabilities를 보여주고 있다.

  • 흐름

1 ) definition

2 ) single - agent

3 ) multi - agent system

: 어떻게 multi - agent 시스템을 사용할 수 있는지?

4 ) envision prospecs for llm-based agents !

1. Introduction

1.1 Intelligent Agents

  • agent란?

= any entity capable of perceiving its environment and taking action!

= 결국, 환경을 인식하고 행동을 취하는 그 모든 것이 agent가 될 수 있다는 의미이다.

  • agent가 가지는 특징

autonomy / perception / decision - making / action

= 독립적으로 환경을 판단하고, 결정을 내리고, 이런것들이 다 자유로 이루어짐 / sensor를 통해서 그들의 환경에 대한 정보를 얻을 수 있다 / 지각된 정보에 대해 결정을 내릴 수 있따 / agent들은 그들의 환경을 바꿀수 있는 행동을 취할 수 있음.

  • agent의 종류

1 ) simple reflix agents

2 ) model based reflex agents

3 ) goal - based agents

4 ) utility - based agents

5 ) learning agents : RL-based agents와 LLM-based agents

그러면 어떤 agent를 learning agents라고 하는건데?

특징 : learn and improve their behavior based on experience.
⇒ 다른 agents들(1,2,3,4번) 이 가지고 있는 limitation( lack of autonomous learning capabilities , multi-step decision problem을 관리하는 데에 어려움)을 해결할 수 있다.
(왜냐면 걔네들은 고정된 rule, simple한 모델에 의존하기 때문에…그래서 일반화 이런 게 잘 안됨)

⇒ 애초에 agent는 존재하는 개념이었고, autonomous하게 알아서 학습하는 애들을 learning agents라고 하는 것이다.

1.2 RL-based Agents

목적 : 누적된 reward를 극대화하도록 action을 취하게끔 guide하는 것

현재는, gaming, robot control, autonomous driving에 considerable sucess를 이루어냈따!!!

하지만, 현재 RL-based Agents의 문제점이 속속들이 드러나고 있다.

1 ) Training Time

: RL 알고리즘이 stable하고 만족할만한 성과를 얻기까지에는 상당한 시간이 걸린다.

2 ) Sample Efficiency

: RL-based agents들은 효과적인 정책을 찾기 위해서는 무조건 그 환경과 많은 상호작용을 해야한다. 따라서 로보틱스나 실제 세계에서는 구체적인 application을 위해서는 데이터를 정말 많이 수집해야하는데 그 데이터 수집이 매우매우 어렵고 시간이 오래 걸린다…

3 ) Stability

: RL에서는 학습이 매우 unstable하다. 그래서 성능이 왔다갔다 하거나 발산할 수 가 있음.

이게, non-stationary environment를 맞닥뜨렸을 때 엄청나게 이슈가 될 것.

4 ) Generalizability

: 특정 task에 specialized 되었기 때문에 새로운 환경에 일반화를 할 수가 없다… ㅜ왜냐면 새로운 문제가 있다면, 새로운 에이전트를 애초에 처음부터! 트레이닝을 시켜야하기 때문에…
그러면 transfer learning 하면 되는 거 아니야??

⇒ 하지만 아직가지,,,transfer learning을 전이학습에 적용하는 것은 challenge로 남아있따ㅠㅠ

1.3 LLM-based Agents

최근의 연구에는 llm을 굉장히 많이 쓰고 있따.

하지만 그럼에도 불구하고, numerous obstacles가 사실은…남아있다ㅠ

llm 자체의 문제점은 ?

1 ) Context Length Constraint

: 중간에 있는 것을 무시하고 앞,끝에 있는 것들을 중시하는 경향이…

2 ) Protracted Knowledge Update

: llm은 computational resource가 너무 많이 든다. 그래서 knowledge update가 매우 느릴 수도.

3 ) Absence of Direct Tool Utilization

: 계산기, sql executor이런 것들을 쓸 수 없다.

⇒ 근데 이러한 문제점들을 llm agent로 해결 할 수 있다 ! ! ! !

LLM-based agents의 장점은?

1 ) potent natural language processing and comprehensive knowledge

: 엄청나게 많은 양의 데이터를 가지고 학습을 했기 때문에, llm은상식을 가지고 있고, domain-spcific expertise가 될 수 있다.

⇒ natural language task의 array를 조정할 수 있는 것이다.

2 ) Zero-shot or Few-shot Learning

: 이미 다양한 데이터를 training때 얻었기 때문에, llm-based agents는 그냥 minimal sample들만 필요로 함. 걔네들은 일반화 성능이 엄청나게 좋다.

3 ) Organic Human-Computer Interaction

: natural language를 이해하기 때문에, 인간과 intelligent agent를 natural language를 통해서 interaction을 할 수 있다.

스크린샷 2025-01-11 16.11.25.png

  • section 2 : llm-based agent system
  • section 3 : llm-based agent system framework
  • section 4 : 이와 관련한 dataset, 그리고 evaluation
  • section 5 : llm-based agent application ! ! !
  • section 6 : llm-based agent multimodal로 사용된다면??

2 Overview

llm-based agent들은 두가지로 나눌 수 있다.

🚩 요렇게 나뉘는 이유는?

⇒ application이나, data 요건이나, 이런 것들이 다 다르기 때문에!!

2.1 Single-Agent System

스크린샷 2025-01-11 16.41.31.png

V = (L,O,M,A,R)

V = llm-based agent

L = llm = distinct domain-specific llm이 필요하다. 하지만 no supplementary training은 필요 없다고 가정할 수 있다. 근데, inference parameter, 즉 temerature와 같은 애들은 동적으로 조정이 될 수 있다.

O = objective = agent가 무조건 달성해야하는 condition 혹은 teminal state !

A = action = 행하는 액션!

M = Memory = short혹은 long-term 메모리

R = rethink = 그걸 가지고 바로 action을 하는 게 아니라 한번 생각을 거쳐서!

2.2 Multi-Agent System

single-agent system과는 다르게, MAS(multi-agent=-system)은 multiple interacting agents로 구성이 되어 있다.

민스키의 SOM[23]과 natural language-based SOM[24]에 inspired되어서, MAS는 다양한 agent의 coordination을 가능하게 함.

각각의 agent들이 specific한 도메인 전문가가 되는 것이지!!!

Decker[25]라는 사람이, 4차원 framework를 제시함

1 ) Granularity of Agents

2 ) Heterogenity in Agent Knowledge

3 ) Mechanisms for Distribution of Control

4 ) Varieties of Communication Protocol

  • 원문 (근데 뭔말하는지 모르겟음) Decker [25] outlines a four-dimensional framework for an MAS. The dimensions encompass: 1) Granularity of Agents,
    ranging from coarse to acceptable configurations; 2) Heterogeneity in Agent Knowledge, comparing agents with
    redundant knowledge to those with specialized expertise; 3) Mechanisms for the Distribution of Control, which can
    be categorized as benevolent or competitive, team-oriented or hierarchical, and may involve static or shifting role
    assignments; 4) Varieties of Communication Protocols, differentiating between the blackboard and message-based
    systems and specifying the gradation from low-level to high-level contents

Parunak[26]이라는 사람은, MAS를 ,

1 ) System Function

2 ) System Architecture

3 ) Agent Architecture

⇒ 얘는 결국, agent-level과 system-level 특성을 나눈 것이 메인 컨트리뷰션!

Stone and Veloso는 MAS를 ,

1 ) homogeneous non-communicating agents

2 ) heterogeneous non-communicating agents

3 ) homogeneous communicating agents

4 ) heterogeneous communicating agents

Hu et al은 single agnet paradigm에서 벗어나서 multi-agent learning algorighm(MARL)를 ,

1 ) task mode : cooperative-like / competitive-like

2 ) agents type : heterogeneous / homogeneous

3 ) learning style : independent learning / centralized training / decentralized execution / fully centralized

4 ) knowledge sharing : agent level / scenario level / task level

llm-agents in MAS를 G(V,E)로 represent할 수 있다고 봤다.

V = set of nodes

Vi = llm-based agent

E = set of edges

Eij = message passing and relationship between Vi and Vj

자료구조할 때! graph!!

따라서, 우리는 multi-role coordination과 planning type에 따라서 분류를 해보겠다!!

  • Multi-Role Coordination: Cooperative, Competitive, Mixed, and Hierarchical;
  • Planning Type: Centralized Planning Decentralized Execution (CPDE) and Decentralized Planning Decentralized
    Execution (DPDE)

스크린샷 2025-01-11 17.19.07.png

MAS, MARL, llm-based agents in MAS 등등에 관해 기존의 학자들이 분류를 해놓은 분류체계?(taxonomy)가 있는데, 그걸 바탕으로 우리는 llm-based agent

2.3 Agent System Template

다행히도, agent를 개발하기 위한 그런 solution들을 개발해두었다!

  • AutoGPt
  • XLang
  • LangChain
  • MiniAGI
  • XAgent

⇒ 이런 애들은 think, plan, review

  • AgentGPT

⇒ fine-tuning models 그리고 local data를 model의 training process에 추가!!

3. LLM-based Agent System Framework

3.1 LLM-based Single Agent System

single-agent system을 총 5개의 key component로 나누었다!

Planning , Memory, Rethinking , Environment, Action ! ! !

3.1.1 Planning

  • 정의

= ability to devise action sequences based on set objectives and existing environment constraints.

= action의 sequence를 고안해낼 수 있는 능력! 조건에 따라!

그렇다면 이전에는 뭘 썼는데?

다익스트라 알고리즘, POMDP…

스크린샷 2025-01-11 20.06.02.png

그러면, llm-based agents는 natural language나 specific text로 하는 거니까, planning은 못하는 거 아니야?

아니다. 다행히도, 최근의 연구 트렌드는 llms를 thinking and planning 하는 데에 쓰는 것은 중요한 direction이라고 한다.

  • In-context Learning(ICL) Methods

정의 : natural language prompts를 써서 planning을 하는 것

  1. CoT : thought-guided prompting
  2. Self-consistency :multiple reseasoning pathway 중에서 투표를 통해서 합리적인 정답찾기!
  3. Least-to-Most : 복잡한 문제들을 sub-problem들로 나누기
  • External Capabilities Methods

정의 : tool이나 algorithm 혹은 simulation technique를 써서 planning하는 것!

  1. LLM + P : classical planner PPDL ⇒ natural language

    여기서, PDDL이란?
    Planning Domain Definition Language
    == 계획 문제를 정의하기 위해 사용되는 표준 언어
    Problem ⇒ Problem Description

    스크린샷 2025-01-12 16.12.27.png

    pddl 논문 : https://www.researchgate.net/profile/Craig-Knoblock/publication/2278933_PDDL_-_The_Planning_Domain_Definition_Language/links/0912f50c0c99385e19000000/PDDL-The-Planning-Domain-Definition-Language.pdf

    스크린샷 2025-01-12 16.15.36.png

    1. 도메인 정의(Domain Definition): 문제에서 사용할 수 있는 객체, 연산자(또는 행동), 그리고 그들의 속성을 정의합니다. 예를 들어, 로봇이 특정 작업을 수행해야 하는 경우, 로봇과 관련된 행동들을 정의합니다.
    2. 문제 정의(Problem Definition): 특정 도메인에서의 초기 상태와 목표 상태를 정의합니다. 예를 들어, 로봇이 방의 특정 위치에서 다른 위치로 이동해야 한다면, 초기 위치와 목표 위치를 설정합니다.

    (define (domain robot-world)
    (:predicates (at ?robot ?location)
    (connected ?loc1 ?loc2))

    (:action move
    :parameters (?robot ?from ?to)
    :precondition (and (at ?robot ?from) (connected ?from ?to))
    :effect (and (not (at ?robot ?from)) (at ?robot ?to))))

    결국, problem ⇒ problem description ⇒ natural language!

  2. LLM - DP : LLM은 환경에 대한 액션의 임팩트를 이해하고, symbolic planner는 solution-finding을 잘하고!

  3. RAP :

  • Multi-stage Methods

정의 : planning process를 distinct stage로 구분하는 것.

  1. SwiftSage :
    Swift 모드에서는 rapid, intuitive thinking
    Sage 모드에서는 deliberative thinking

    <aside>
    ✅
    
    swiftsage란??
    
    We introduce SWIFTSAGE, a novel agent framework inspired by the dual-process theory of human cognition, designed to excel in action planning for complex interactive reasoning tasks.
    
    ![스크린샷 2025-01-12 16.28.42.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/1b3046c7-d319-4217-906f-41923c1c1242/aa1ade6f-21b8-4813-ae44-62553cfcffb3/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA_2025-01-12_16.28.42.png)
    
    ![스크린샷 2025-01-12 16.30.13.png](https://prod-files-secure.s3.us-west-2.amazonaws.com/1b3046c7-d319-4217-906f-41923c1c1242/4ea05190-4cdc-460e-80e7-9dde0c6aa8e0/%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA_2025-01-12_16.30.13.png)
    
    </aside>
  2. DECKARD :

    Dream 모드에서는 llm이 task를 sub-goal로 decompose하게 만든다.

    Awake 모드에서는 각각의 sub-goal에 해당하는 전략을 배운다!

    DECKARD
    https://proceedings.mlr.press/v202/nottingham23a/nottingham23a.pdf

    Reinforcement learning (RL) agents typically
    learn tabula rasa, without prior knowledge of the
    world. However, if initialized with knowledge of
    high-level subgoals and transitions between sub-
    goals, RL agents could utilize this Abstract World
    Model (AWM) for planning and exploration. We
    propose using few-shot large language models
    (LLMs) to hypothesize an AWM, that will be veri-
    fied through world experience, to improve sample
    efficiency of RL agents. Our DECKARD agent
    applies LLM-guided exploration to item craft-
    ing in Minecraft in two phases: (1) the Dream
    phase where the agent uses an LLM to decom-
    pose a task into a sequence of subgoals, the hy-
    pothesized AWM; and (2) the Wake phase where
    the agent learns a modular policy for each sub-
    goal and verifies or corrects the hypothesized
    AWM. Our method of hypothesizing an AWM
    with LLMs and then verifying the AWM based
    on agent experience not only increases sample
    efficiency over contemporary methods by an or-
    der of magnitude but is also robust to and cor-
    rects errors in the LLM—successfully blending
    noisy internet-scale information from LLMs with
    knowledge grounded in environment dynamics.
    : 이말인 즉슨, LLMs를 활용하여 RL agents의 sample efficeincy를 늘리도록 하여 추상적인 세계 모델링을 하겠다…!!!

    그 step1이 dream, step2가 wake phase ! !

    스크린샷 2025-01-12 16.39.00.png

3.1.2 Memory

memory system이 llm-based agents에 존재하는 이유는, 바로 knowledge를 보존하고 조절하기 위함이다 ! ! !
( 그 knowledge == reference와 modification용!)

스크린샷 2025-01-11 20.43.49.png

  • short-term memory

저장 - 제한된 정보만 저장 !

사용 - input text + input과 연관된 데이터만!

ChatDev
https://aclanthology.org/2024.acl-long.810.pdf
( 내가 마침 눈여겨보고 있던 논문이었는데…! )

Software development is a complex task that
necessitates cooperation among multiple mem-
bers with diverse skills. Numerous studies used
deep learning to improve specific phases in a
waterfall model, such as design, coding, and
testing. However, the deep learning model
in each phase requires unique designs, lead-
ing to technical inconsistencies across various
phases, which results in a fragmented and in-
effective development process. In this paper,
we introduce ChatDev, a chat-powered soft-
ware development framework in which special-
ized agents driven by large language models
(LLMs) are guided in what to communicate
(via chat chain) and how to communicate (via
communicative dehallucination). These agents
actively contribute to the design, coding, and
testing phases through unified language-based
communication, with solutions derived from
their multi-turn dialogues. We found their uti-
lization of natural language is advantageous
for system design, and communicating in pro-
gramming language proves helpful in debug-
ging. This paradigm demonstrates how linguis-
tic communication facilitates multi-agent col-
laboration, establishing language as a unify-
ing bridge for autonomous task-solving among
LLM agents. The code and data are available
at https://github.com/OpenBMB/ChatDev.

스크린샷 2025-01-12 17.03.21.png

딥러닝 모델이 design이나 coding, testing등 다양한 spcific phases를 improve할 수 있다. 하지만, 각각의 단계에서의 딥러닝 모델들은 유니크하게 해야함…ㅠ
⇒ 여기서는, ChatDev를 제시하였음!

스크린샷 2025-01-12 17.04.13.png

(ChatDev논문에서 발췌한 내용! ChatDev에서는 이렇게 short-term memory를 했따 ! )

  • long-term memory

저장 : 외부 knowledge base와의 interaction 필요 !

( 예시 : knoweledge graph, vector database , relational database queries , api call )

ExpeL

https://ojs.aaai.org/index.php/AAAI/article/view/29936

(2024 aaai 따끈따끈 논문!)

The recent surge in research interest in applying large lan-guage models (LLMs) to decision-making tasks has flour-ished by leveraging the extensive world knowledge embed-ded in LLMs. While there is a growing demand to tailor LLMs for custom decision-making tasks, finetuning them
for specific tasks is resource-intensive and may diminish the model’s generalization capabilities. Moreover, state-of-the-art language models like GPT-4 and Claude are primarily ac-cessible through API calls, with their parametric weights re-maining proprietary and unavailable to the public. This sce-
nario emphasizes the growing need for new methodologies that allow learning from agent experiences without requir-ing parametric updates. To address these problems, we intro-duce the Experiential Learning (ExpeL) agent. Our agent au-
tonomously gathers experiences and extracts knowledge us-ing natural language from a collection of training tasks. At inference, the agent recalls its extracted insights and past ex-periences to make informed decisions. Our empirical results highlight the robust learning efficacy of the ExpeL agent, in-
dicating a consistent enhancement in its performance as it ac-cumulates experiences. We further explore the emerging ca-pabilities and transfer learning potential of the ExpeL agent through qualitative observations and additional experiments.
이 논문은, autonomous하게 experience를 gather하고 training task 중에서 collection을 자연어로 뽑아낸다…

스크린샷 2025-01-12 17.18.53.png

Reflexion
(요것도 뉴립스 2024…확실히 에이전트가 대세이긴한가봄)

스크린샷 2025-01-12 18.31.16.png

스크린샷 2025-01-12 18.31.54.png

Large language models (LLMs) have been increasingly used to interact with exter-nal environments (e.g., games, compilers, APIs) as goal-driven agents. However, it remains challenging for these language agents to quickly and efficiently learn from trial-and-error as traditional reinforcement learning methods require exten-sive training samples and expensive model fine-tuning. We propose Reflexion, a
novel framework to reinforce language agents not by updating weights, but in-stead through linguistic feedback. Concretely, Reflexion agents verbally reflect
on task feedback signals, then maintain their own reflective text in an episodic memory buffer to induce better decision-making in subsequent trials. Reflexion is
flexible enough to incorporate various types (scalar values or free-form language) and sources (external or internally simulated) of feedback signals, and obtains
significant improvements over a baseline agent across diverse tasks (sequential decision-making, coding, language reasoning). For example, Reflexion achieves a
91% pass@1 accuracy on the HumanEval coding benchmark, surpassing the previ-ous state-of-the-art GPT-4 that achieves 80%. We also conduct ablation and analysis studies using different feedback signals, feedback incorporation methods, and agent
types, and provide insights into how they affect performance. We release all code, demos, and datasets at https://github.com/noahshinn024/reflexion.

⇒ trial-and-error로부터 효율적으로 배우기가 매우 어렵다…

⇒ 따라서, Reflexion을 제시한다.

⇒ 그 Reflexion이 뭔데?

linguistic feedback으로부터 weight를 업데이트 하는 것…
구체적으로는, reflexion agents들이 말로 task feedback signal을 reflect함 → 그들의 reflective text를 메모리 버퍼에다가 넣음

그렇다면, short-term memory와 long-term memory의 차이는 뭘까?

→ short-term memory가 vital information을 encapsulate해서 그걸 long-term memory에 동적으로 저장을 하는 것이다…

  • memory retrieval

RAG(Retrieval-augmented generation) :

memory 검색 기능 + llm ⇒ reliable output ! ! !

( 메모리를 단순히 검색하는 게 아니라, llm이 붙어서 ! )

→ 그렇다면 어떻게 가능한데 ?

  • LaGR-SEQ: SEQ(Sample Efficient Query)라는 기법을 사용하여, 보조 RL(강화 학습) 에이전트가 LLM에 언제 질의할지를 결정하도록 훈련.
  • REMEMBER: LLM에 long-term 메모리를 추가해 과거 경험을 활용할 수 있도록 하며, 강화 학습과 경험 메모리를 통해 메모리를 업데이트.
  • Synapse: 작업과 관련 없는 정보를 제거하여 제한된 컨텍스트 내에서 더 많은 샘플을 처리할 수 있도록 돕고, 유사성 검색을 통해 샘플 임베딩을 검색
  • DT-Mem: 분산 메모리 저장소를 기반으로 다양한 작업에 필요한 정보를 저장하고 검색할 수 있는 내부 메모리 모듈을 제안

결국, 이런 방법들을 통해서 memory type을 선택하고 llm-based agents들을 고안해낼 수 있따…!

3.1.3 Rethinking

스크린샷 2025-01-11 20.44.23.png

rethinking이란?

→ 별거 아니고 그냥 이전의 decision들을 평가하는 것!

→ llm agents들이 깊게 그 행동, 의사결정, 이런 것들을 다 찬찬히 살펴보게 한다 ! !

  • In-Context Learning Methods

= task-specific linguistic prompts를 강화학습에 사용을 한다 !

ReAct

스크린샷 2025-01-12 20.20.13.png

In this work, we present ReAct, a general paradigm to combine reasoning and acting with language
models for solving diverse language reasoning and decision making tasks.

⇒ 결국, 매 step마다 저 prompt가 주어지니까, 그 prompt가 in-context learning인 것이다

  • Supervised Learning Methods

= llm이나 다른 외부 knowledge

CoH

: 이전의 output들이 모델의 self-enhancement로 들어간다.

(챗GPT생각하면 될듯!)

  • Reinforcement Learning Methods

: 역사적인 경험들을 통해서 지식을 얻는 것이다!!

Retroformer
과거 모델의 학습을 통해 정책 경사(Policy Gradients)를 사용하여 LLM 기반 에이전트의 프롬프트를 조정…!!

  • Modular Coordination Methods

: 여러 모듈들이 동작하여 planning을 하고 introspection을 한다! !

DEPS

descriptor, interpreter,goal selector들을 통해서 llm planner들과 상호작용을 한다 ! !

스크린샷 2025-01-12 21.00.14.png

3.1.4 Environments

정말 다양한 환경에서, feedback을 통해서 interact하고 배울 수 있다.

⇒ computer,gaming,code,실제 세계 등 정말 다양한 세계…!

  • Software Interaction

정의: LLM 에이전트는 워드 프로세서나 그래픽 디자인 도구 같은 소프트웨어와 상호작용하여 작업을 효율적으로 수행

예시: 사용자가 자연어로 명령을 내리면, LLM이 이를 해석하고 소프트웨어에서 해당 작업을 실행. ex ) "문서에서 글씨 크기를 키워줘"라고 하면 워드 프로세서에서 글씨 크기를 키우는 작업을 수행

  • database queries

정의: 데이터베이스에 접근하고 데이터를 업데이트할 수 있어, 실시간 데이터 처리와 관리가 가능

예시: LLM이 자연어로 "오늘의 판매량을 보여줘"라는 요청을 받으면, 데이터베이스에서 필요한 정보를 조회하고 결과를 반환

  • game environment

정의: 게임 속 가상 캐릭터나 객체와 상호작용하여 주어진 임무를 수행ㄱㄴ

예시: 게임에서 "캐릭터가 앞으로 가고 점프해"라는 명령을 내리면, LLM이 캐릭터를 움직이고 점프하는 동작을 수행…

⇒ 캐릭터 컨트롤(move,jump,attack) / 환경 상호작용(pick up, use) / 상태정보 인지하기(character position,item count)

  • coding environment

정의: LLM 에이전트는 코드 작성, 수정, 실행을 통해 다양한 작업을 처리 가능

예시: "Python으로 간단한 계산기를 만들어줘"라고 하면 LLM이 해당 코드를 생성하고 오류가 있으면 이를 수정하는 기능도 제공

  • real-world environment

정의: LLM 기반 에이전트는 실제 장치나 센서와 상호작용하여 작업을 수행

예시: 로봇이 물건을 쌓는 작업을 할 때, LLM은 센서 데이터를 분석하고 로봇 팔을 제어하여 작업을 수행가능

⇒ 데이터 수집 (카메라나 녹음기 이런 애들로 그냥 자동으로 데이터를 수집해버리는 것임)/ 디바이스 컨트롤 (로봇팔이나 이런 애들을 / Human-machine interaction

  • Simulation Environment

(우리가 저번주에 본 게 이거인듯)

정의 :

예시 : economic market이나, 물리 환경이나, transportation system을 represent할 수 있따…!

⇒ Model Manipulation / Data Analysis : simulation에 나온 데이터들을 가지고 패턴이나 트렌드,인사이트를 뽑아낸다. / Optimization

3.1.5 Action

: Action을 할 때, 되게 다양하게 Action을 할 수 있다는 의미임.

뭐 예를 들어서, 그냥 text generation을 할 수도 있고, 아니면 code를 만들어낼 수도 있고, 아니면 뭐 방의 불을 제어할 수도 있고??

  • Tool Employment

HuggingGPT : AI module활용해서 plan, execution,object detection이런 것까지 다 하는 거다.

RestGPT : llm이랑 RESTful APIs써서 user request,online planning,API실행까지…

  • Tool Planning
  • Tool Creation

예시가 더 쉬울 것 같음.

예시)

  • 예시

    Tool Employment

    정의: LLM이 외부 도구(API, 계산기, 코드 해석기 등)를 직접 사용하여 작업을 수행

    예시: 날씨 예측 API 사용

    • 상황: 사용자가 "내일 서울의 날씨는 어때?"라고 물어봅니다.

    • tool employment : LLM은 날씨 API를 호출하여 서울의 날씨 정보를 요청합니다.
      - action: LLM이 날씨 API에 "서울 날씨 정보 요청" 명령을 보내고, API는 그에 대한 응답을 반환합니다.
      - result : LLM은 API 응답을 처리하여 "내일 서울은 맑고 기온은 5도입니다."라고 사용자에게 답변합니다.

      Tool Planning

      정의: LLM이 여러 도구를 조합하고 계획하여 복잡한 작업을 해결하는 방법입니다.

      예시: 코드 생성 및 실행

    • 상황: 사용자가 "두 수를 더하는 Python 코드를 작성해줘"라고 요청합니다.

    • tool planning : LLM은 코드 생성 도구를 사용하여 코드를 작성합니다.

      • action : LLM은 사용자 요청을 이해하고, Python 코드 생성 도구를 통해 두 수를 더하는 함수를 생성합니다.
        python
        코드 복사
        def add(a, b):
            return a + b
        print(add(3, 5))  # 결과는 8
        
      • LLM은 이 코드를 출력하고, 필요하다면 코드 실행 환경을 계획하여 실제로 코드를 실행하도록 합니다.
    • result : 사용자는 "두 수를 더하는 코드"가 자동으로 생성되고 실행되는 것을 확인합니다.

      Tool Creation

      정의: LLM이 새로운 도구를 생성하여 작업을 해결하는 방법입니다.

      예시: 맞춤형 계산기 도구 생성

    • 상황: 사용자가 "이 계산기를 사용하여 두 숫자의 합을 구할 수 있도록 해줘"라고 요청합니다.

    • tool creation : LLM은 "계산기"라는 맞춤형 도구를 생성합니다.

      • action : LLM은 사용자의 요청에 맞는 계산기 도구를 설계하고 생성하는 데 필요한 알고리즘을 작성합니다.
      • 예시 도구:
        python
        코드 복사
        class Calculator:
            def add(self, a, b):
                return a + b
        calc = Calculator()
        result = calc.add(3, 5)
        print(result)  # 결과는 8
        
    • result : 사용자는 새로 생성된 계산기 도구를 사용하여 수학 작업을 수행할 수 있습니다.

profile
한발한발 나아갑니당!

0개의 댓글