BabyBeeAGIを触ってみる
BabyBeeAGIについての投稿されていたので、触ってみます。
BabyAGIよりも複雑なプロンプトを用いているとのことで、タスク管理エージェントが担当する特定の機能は次のようなものとのこと
完全なタスクリストと完了/不完全なステータスを追跡する
タスク間の依存関係の割り当て
目標を達成するために新しいタスクがいつ必要かを決める
各タスクに使用するツールを割り当てる
クリーンなJSONとして結果を提供する
ソースコードは下記においてあります。
300行ぴったりで書かれていました。
google-search-resultsでは、SerpApi(https://serpapi.com/)のAPIkeyが必要になります。ですので、非常に少ない無料枠と、課金したとしてもMAX1万クエリー/日 のなかで実施することになりそうです。
SerpAPiのアカウントを作るとキーが得られます。
単体で遊びたい場合は、以下が参考になります。
プロンプトを眺めてみる
鍵となるプロンプトについて説明します。
タスク処理エージェント
Complete your assigned task based on the objective: {OBJECTIVE}.
Your task: {task['task']}
The previous task ({dependent_task['id']}. {dependent_task['task']})
result: {dependent_task_result}
Response:
日本語に訳すと
タスク管理エージェント
You are a task management AI tasked with cleaning the formatting of and reprioritizing the following tasks: {minified_task_list}.
Consider the ultimate objective of your team: {OBJECTIVE}.
Do not remove any tasks. Return the result as a JSON-formatted list of dictionaries.
Create new tasks based on the result of last task if necessary for the objective. Limit tasks types to those that can be completed with the available tools listed below. Task description should be detailed.The maximum task list length is 7. Do not add an 8th task.The last completed task has the following result: {result}.
Current tool option is [text-completion] {websearch_var} and [web-scrape] only.
For tasks using [web-scrape], provide only the URL to scrape as the task description. Do not provide placeholder URLs, but use ones provided by a search step or the initial objective.
For tasks using [web-search], provide the search query, and only the search query to use (eg. not 'research waterproof shoes, but 'waterproof shoes')
dependent_task_id should always be null or a number.
Do not reorder completed tasks. Only reorder and dedupe incomplete tasks.
Make sure all task IDs are in chronological order.
Do not provide example URLs for [web-scrape].
Do not include the result from the last task in the JSON, that will be added after..
The last step is always to provide a final summary report of all tasks.
An example of the desired output format is: [{"id": 1, "task": "https://untapped.vc", "tool": "web-scrape", "dependent_task_id": null, "status": "incomplete", "result": null, "result_summary": null}, {"id": 2, "task": "Analyze the contents of...", "tool": "text-completion", "dependent_task_id": 1, "status": "incomplete", "result": null, "result_summary": null}, {"id": 3, "task": "Untapped Capital", "tool": "web-search", "dependent_task_id": null, "status": "incomplete", "result": null, "result_summary": null}].
日本語に訳すと
実行させてみる
OpenAPIキーとSarpキーをセットして実行させてみます。
私はローカルに落として、必要なモジュールをインストールして
実行しました。
まず動かしてみる
説明にある通りかなり低速です。
おぉ、タスクの処理状況や、依存タスクも可視化されました!
運転免許証に関するタスクは失敗…
コンテキストが長すぎると、耐えきれないみたいです
気を取り直して、もっと簡単そうなタスクを選定
ふむふむ。今回はできるかな?頑張ってくれ
3: 利用可能なVISAカードの種類を調べる [web-search]
おぉ、カード入手要件理解したようだ。すばらしい
4: 各カードの特徴と利点を比較する [text-completion]
5: 個人のニーズに最適なオプションを決定する [text-completion]
お勧めします。と言われたて、completeになっているが、意思決定はしたのか??
6: 選択したVISAカードのオンライン申請を作成する [text-completion]
これは私が情報与えないと完了できないような?
[complete]になって、前進するが大丈夫か?
7: 申請と必要な追加書類を提出する [text-completion]
どう収束するのか?
新たなタスクが3つ生成されました。
8: VISAカード申請の状況を確認する方法 [web-search]
9: VISAカードが承認された後の手続き [text-completion]
最後の最後で、コンテキストの長さが足りなくなってしまい、停止..
まとめ
OpenAIのAPIで含められるトークン数に限界があるので、途中で止まってしまいましたが、
・タスクの依存関係や最大タスクを7つにセットして順次進めていく形、
・タスクの処理状況が可視化される点など、
実験的な試みとしては大変面白かったです。
処理にはお金がかかるので、どの程度コストがかかったのかもザッとみられたり、実行前に時間や料金の見積もりがあると面白いかもしれません。
ここまで読んでいただき、ありがとうございました!
今後も、BabyAGIやAutoGPTの可能性を継続して追いかけていきます!
人間とAIの協働をテーマとした次世代型のタスク管理システム「PATHWORK(パスワーク)」を運営しています。ぜひ応援してください。
この記事が気に入ったらサポートをしてみませんか?