自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃 精華

發(fā)布于 2024-5-9 10:43
瀏覽
0收藏

在AI規(guī)劃領(lǐng)域,傳統(tǒng)的規(guī)劃器(如Fast Downward)雖然功能強(qiáng)大,但它們需要將輸入任務(wù)建模為PDDL(Problem Domain Definition Language)格式,這是一個(gè)繁瑣且容易出錯(cuò)的過(guò)程。相比之下,使用大型語(yǔ)言模型(LLMs)進(jìn)行規(guī)劃可以接受幾乎任何文本輸入,但不保證計(jì)劃的質(zhì)量和完整性。為了結(jié)合這兩種方法的優(yōu)點(diǎn),一些研究工作開(kāi)始利用LLMs自動(dòng)化PDDL創(chuàng)建過(guò)程的部分內(nèi)容。然而,這些方法仍然需要不同程度的專(zhuān)家輸入。

為此提出了NL2Plan,這是一個(gè)首個(gè)與領(lǐng)域無(wú)關(guān)的離線LLM驅(qū)動(dòng)規(guī)劃系統(tǒng)。NL2Plan使用LLM逐步從簡(jiǎn)短的文本提示中提取必要信息,然后創(chuàng)建一個(gè)完整的PDDL描述,包括領(lǐng)域和問(wèn)題描述,最終由傳統(tǒng)規(guī)劃器求解。

NL2Plan及其六個(gè)步驟的流程圖。在“類(lèi)型提取”步驟中,生成一組對(duì)象類(lèi)型,然后由“類(lèi)型層級(jí)”步驟將其結(jié)構(gòu)化為樹(shù)形結(jié)構(gòu)。接下來(lái),“動(dòng)作提取”步驟創(chuàng)建一個(gè)自然語(yǔ)言動(dòng)作描述的列表,而“動(dòng)作構(gòu)建”步驟則在PDDL(規(guī)劃領(lǐng)域定義語(yǔ)言)中將其形式化?!叭蝿?wù)提取”是最后一個(gè)由大型語(yǔ)言模型(LLM)驅(qū)動(dòng)的步驟,它創(chuàng)建初始狀態(tài)和目標(biāo)描述。最后,“規(guī)劃”步驟使用自動(dòng)規(guī)劃器生成計(jì)劃或顯示所建模的任務(wù)無(wú)法解決。在每個(gè)由LLM驅(qū)動(dòng)的步驟中,人類(lèi)或LLM實(shí)例都可以選擇性地對(duì)解決方案提供進(jìn)一步的反饋。用戶只需要與NL2Plan交互以提供自然語(yǔ)言任務(wù)。

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃-AI.x社區(qū)


NL2Plan的六個(gè)步驟:

  1. 類(lèi)型提取 (Type Extraction):
  • 利用LLM定義任務(wù)中應(yīng)包含的對(duì)象類(lèi)型。
  • 例如,對(duì)于物流規(guī)劃問(wèn)題,可能需要定義城市、位置、機(jī)場(chǎng)、飛機(jī)、卡車(chē)和包裹等類(lèi)型。
  1. 層次結(jié)構(gòu)構(gòu)建 (Hierarchy Construction):
  • 組織在類(lèi)型提取步驟中定義的類(lèi)型,形成層級(jí)結(jié)構(gòu)。
  • 確定哪些類(lèi)型是其他類(lèi)型的子類(lèi)型,例如,飛機(jī)和卡車(chē)可以是車(chē)輛的子類(lèi)型。
  1. 動(dòng)作提取 (Action Extraction):
  • 描述基于已定義類(lèi)型和世界知識(shí),任務(wù)中應(yīng)該可用的動(dòng)作。
  • 動(dòng)作以名稱(chēng)、描述和使用示例的形式呈現(xiàn),LLM還可以推理出應(yīng)包含哪些其他動(dòng)作。
  1. 動(dòng)作構(gòu)建 (Action Construction):
  • LLM一次定義一個(gè)動(dòng)作,生成其參數(shù)、前提條件和效果。
  • 動(dòng)態(tài)創(chuàng)建新謂詞以供當(dāng)前和后續(xù)動(dòng)作使用,并通過(guò)自動(dòng)驗(yàn)證工具進(jìn)行驗(yàn)證。
  1. 任務(wù)提取 (Task Extraction):
  • 生成PDDL問(wèn)題規(guī)范,包括對(duì)象、初始狀態(tài)和目標(biāo)條件。
  • 接受自然、非結(jié)構(gòu)化的初始狀態(tài)和目標(biāo)條件描述,與以前的方法相比,NL2Plan不需要程序化和結(jié)構(gòu)化地生成這些狀態(tài)。
  1. 規(guī)劃 (Planning):
  • 使用經(jīng)典規(guī)劃器解決生成的PDDL任務(wù)。
  • 如果規(guī)劃器未能找到計(jì)劃,NL2Plan會(huì)得出結(jié)論,即建模的PDDL任務(wù)無(wú)法解決,并返回“未找到計(jì)劃”。?

NL2Plan步驟的說(shuō)明性輸入輸出對(duì)

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃-AI.x社區(qū)


自動(dòng)LLM驅(qū)動(dòng)的類(lèi)型提取反饋?zhàn)硬襟E的說(shuō)明性示例。檢查清單在NL2Plan的不同步驟中會(huì)有所不同

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃-AI.x社區(qū)


NL2Plan在四個(gè)規(guī)劃領(lǐng)域上進(jìn)行了評(píng)估,成功解決了10個(gè)任務(wù)中的15個(gè),明顯優(yōu)于直接應(yīng)用LLM的鏈?zhǔn)剿伎纪评矸椒ǎ笳邇H解決了2個(gè)任務(wù)。此外,NL2Plan在兩個(gè)失敗案例中沒(méi)有返回?zé)o效計(jì)劃,而是報(bào)告未能解決任務(wù)。

生成計(jì)劃的總結(jié)。勾號(hào)表示成功的計(jì)劃,叉號(hào)表示失敗的計(jì)劃,而“~”表示有疑問(wèn)的計(jì)劃。在后兩種情況下,描述了缺陷。

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃-AI.x社區(qū)

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃-AI.x社區(qū)

使用PDDL表示還允許用戶理解NL2Plan如何解釋任務(wù)以及它為什么以某種方式進(jìn)行規(guī)劃,這使得生成的計(jì)劃是可解釋的,并減少了應(yīng)用LLMs的黑箱特性。NL2Plan從簡(jiǎn)單輸入生成PDDL的能力,也使其成為協(xié)助人類(lèi)為新領(lǐng)域創(chuàng)建領(lǐng)域描述的工具。

附錄:

Blocksworld領(lǐng)域的任務(wù)和計(jì)劃示例。CoT(任務(wù)描述)動(dòng)作描述和NL2Plan名稱(chēng)已被縮短。成功的計(jì)劃用綠色標(biāo)記。失敗的計(jì)劃及其第一個(gè)無(wú)效動(dòng)作用紅色標(biāo)記??赡芘c用戶意圖不同或類(lèi)似的可疑計(jì)劃用橙色標(biāo)記。

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃-AI.x社區(qū)

ISR領(lǐng)域的任務(wù)和計(jì)劃示例。CoT動(dòng)作描述和NL2Plan名稱(chēng)已被縮短。成功的計(jì)劃用綠色標(biāo)記。失敗的計(jì)劃及其第一個(gè)無(wú)效動(dòng)作用紅色標(biāo)記。可能與用戶意圖不同或類(lèi)似的可疑計(jì)劃用橙色標(biāo)記?!皩㈨旤c(diǎn)添加到集合”的動(dòng)作被實(shí)現(xiàn)為“重新配置集合”的動(dòng)作,將第一個(gè)參數(shù)添加到集合中并移除第二個(gè)參數(shù)。

NL2Plan: 基于最小文本描述的魯棒性大模型驅(qū)動(dòng)任務(wù)規(guī)劃-AI.x社區(qū)

NL2Plan Step Prompt Schemas and Examples

  • Type Extraction step

# Role
Your task is to identify the different types of objects which exist and are relevant in a domain. [Further task details.]
# Example
[Chain-of-Thought Example]
# Task
## Domain
The AI agent here is a logistics planner that has to plan to transport packages within the locations in a city through a truck and
between cities through an airplane. In a city, all the locations are connected. Similarly, cities are directly connected allowing airplanes
to travel between them. Also, there is no limit to how many packages a truck or plane can carry.
Currently, I’ve got four packages to ship. . .
## Types
First, we need types related to locations and transportation.
‘‘‘
- city: Each city contains an airport and other locations.
- location: Places within cities trucks can visit.
- airport: A location where planes land and take off.
‘‘‘
Next, we consider the transportation vehicles.
‘‘‘
- plane: A type of vehicle used for transporting packages between cities.
- truck: A type of vehicle used for transporting packages within a city.
‘‘‘
Lastly, we need the to define the items being transported.
‘‘‘
- package: An item that needs to be transported from one location to another.
‘‘‘
  • Type Hierarchy step

# Role
Your task is to identify the different types of objects which exist and are relevant in a domain. [Further task details.]
# Example
[Chain-of-Thought Example]
# Task
## Domain
The AI agent here is a logistics planner that has to plan to transport packages within the locations in a city through a truck and
between cities through an airplane. In a city, all the locations are connected. Similarly, cities are directly connected allowing airplanes
to travel between them. Also, there is no limit to how many packages a truck or plane can carry.
Currently, I’ve got four packages to ship. . .
## Types
First, we need types related to locations and transportation.
‘‘‘
- city: Each city contains an airport and other locations.
- location: Places within cities trucks can visit.
- airport: A location where planes land and take off.
‘‘‘
Next, we consider the transportation vehicles.
‘‘‘
- plane: A type of vehicle used for transporting packages between cities.
- truck: A type of vehicle used for transporting packages within a city.
‘‘‘
Lastly, we need the to define the items being transported.
‘‘‘
- package: An item that needs to be transported from one location to another.
‘‘‘
  • Action Extraction step

# Role
Your task is to identify what actions an AI Agent would have available in a domain. [Further task details.]
# Example
[Chain-of-Thought Example]
# Task
## Domain
The AI agent here is a logistics planner that has to plan to transport packages. . .
Currently, I’ve got four packages to ship. . .
##Types:
- object: Everything is an object
- city: Each city contains. . .
- location: Places within cities. . .
- airport: A location where planes. . .
- vehicle: Vehicles transport packages.
- truck: A type of vehicle. . . .
- plane: A type of vehicle. . .
- package: An item that needs to. . .
##Actions
###Package related actions
Packages need to be loaded onto vehicles and unloaded at the destination.
‘‘‘
load package
A package is loaded onto a vehicle at a location. Requires that the package and the truck to be at the same location. Example:
package 1 is loaded onto truck 1 at location 1.
‘‘‘
‘‘‘
unload package
A package is unloaded from a vehicle at a location. Requires the package to be on the vehicle and the vehicle to be at the destination
location. Example: package 2 is unloaded from plane 1 at airport 1.
‘‘‘
[Further headers and actions.]
  • Action Construction step

# Role
You are defining the preconditions and effects (represented in PDDL format) of an AI agent’s actions. [Further task details.]
# Example
[Chain-of-Thought Example]
# Task
## Domain
The AI agent here is a logistics planner that has to plan to transport packages. . .
Currently, I’ve got four packages to ship. . .
##Types:
- object: Everything is an object
- city: Each city contains. . .
- location: Places within cities. . .
- airport: A location where planes. . .
- vehicle: Vehicles transport packages.
- truck: A type of vehicle. . . .
- plane: A type of vehicle. . .
- package: An item that needs to. . .
## Future actions
The following actions will be defined later and together they make up the entire domain:
- load package: A package is loaded. . .
- unload package: A package is unloaded. . .
[Remaining actions.]
## Action
load package
A package is loaded onto a vehicle at a location. Requires that the package and the truck to be at the same location. Example:
package 1 is loaded onto truck 1 at location 1.
### Available Predicates
No predicate has been defined yet.
### Action Parameters
First, we need to know which vehicle and package are being loaded:
‘‘‘
- ?v - vehicle: The vehicle being loaded.
- ?p - package: The package being loaded.
‘‘‘
Lastly, we need to know where the loading is taking place:
‘‘‘
- ?l - location: The location where the loading happens.
‘‘‘
### Action Preconditions
To be able to load at ?l it’s specified that:
1: The vehicle is at the location.
2: The package is at the location.
For this we need a predicate:
- “at” to define where something is. This should work for both packages and vehicles, so let’s define “(at ?o - object ?l - location)”
Let’s specify this in PDDL:
‘‘‘
(and ; All these have to hold
(at ?v ?l) ; The vehicle is at the location
(at ?p ?l) ; The package is at the location
)
‘‘‘
### Action Effects
So, what happens when the action is performed?
- The package is no longer at the location
- The package is instead inside the vehicle
For this, we need a new predicate
- “l(fā)oaded” to specify when and where a package is loaded. “(loaded ?p - package ?v - vehicle)”
Specifying this in PDDL we get:
‘‘‘
(and ; All these have to hold
(not (at ?p ?l)) ; The package is not at the location
(loaded ?p ?v) ; The package is instead loaded in the vehicle
)
‘‘‘
### New Predicates
We used two new predicates. Those have to be specified and re-iterated:
‘‘‘
- (at ?o - object ?l - location): true if the object ?o (a vehicle or package) is at the location ?l
- (loaded ?p - package ?v - vehicle): true if the package ?p is loaded in the vehicle ?v
‘‘‘
  • Task Extraction step

# Role
Your task is to estimate the initial state and the goal state for a PDDL problem based on a domain description and the available
actions. [Further task details.]
# Example
[Chain-of-Thought Example]
# Task
## Domain
The AI agent here is a logistics planner that has to plan to transport packages. . .
Currently, I’ve got four packages to ship. Two are in a London storage and the rest in Paris. Those from London should be
sent to Addr1 in Berlin and to Addr2 in Paris. Those from Paris should both be moved to the London storage.
##Types:
- object: Everything is an object
- city: Each city contains. . .
- location: Places within cities. . .
- airport: A location where planes. . .
- vehicle: Vehicles transport packages.
- truck: A type of vehicle. . . .
- plane: A type of vehicle. . .
- package: An item that needs to. . .
## Predicates
- (at ?o - object ?l - location): true if the object ?o (a vehicle or package) is at the location ?l
- (loaded ?p - package ?v - vehicle): true if the package ?p is loaded in the vehicle ?v
[Further predicates.]
## Object Instances
There are four packages. The first two start in London, and the remaining two start in Paris:
‘‘‘
- L1 - package: The first London package
- L2 - package: The second London package
- P1 - package: The first Paris package
- P2 - package: The second Paris package
‘‘‘
[Further object instances.]
## State
The London packages all start in the London storage:
‘‘‘
(at L1 LStorage): The first London package location
(at L2 LStorage): The second London package location
‘‘‘
[Further initial predicates.]
## Goal
The goal is for L1 to go to Addr1 and for L2 to be delivered to Addr2, as well as for both P1 and P2 to be transported to London
storage. Here’s how we can define the goal:
‘‘‘
(and ; All these have to hold
(at L1 Addr1)) ; L1 is delivered
(at L2 Addr2)) ; L1 is delivered
(at P1 LStorage)) ; L1 is delivered
(at P2 LStorage)) ; L1 is delivered
)
‘‘‘


NL2Plan: Robust LLM-Driven Planning from Minimal Text Descriptions
https://arxiv.org/pdf/2405.04215

本文轉(zhuǎn)載自 ??PaperAgent???,作者: PaperAgent

收藏
回復(fù)
舉報(bào)
回復(fù)
相關(guān)推薦