見出し画像

【AutoGPT】英語解説を日本語で読む【2023年4月21日|@Replit】

AutoGPTの解説です。
00:13 自律型エージェントって何?
01:04 OpenAI APIキーの取得
01:58 Replitで紡ぎ出す。
02:30 どのヘッドホンがいいのか?
06:24 何が間違っているのでしょうか?
08:47 Tailwindは使う価値があるのか?
公開日:2023年4月21日
※動画を再生してから、インタビューを読むのがオススメです。


So, what are autonomous agents?

さて、自律型エージェントとは何でしょうか?

Well, they're pieces of software that use LLMs to chain together thought, so they can come up with a question and try and solve it.

LLMを使って思考を連鎖させ、質問を思いつき、それを解決しようとするソフトウェアの一部です。

And in fact, this new paradigm of AI software is a real, real boon for those of us that do any kind of research or want anything done, because these autonomous agents have access to your file system and have access to your local machine.

実際、この新しいパラダイムのAIソフトウェアは、何らかの研究をしている人や何かを成し遂げたい人にとって、本当に本当に有益なものです。なぜなら、自律エージェントはファイルシステムにアクセスでき、ローカルマシンにアクセスできるからです。

Now, that might terrify a few of you and certainly terrified me for just a fraction of a second before I remembered that each REPL you spin up is its own computer in the cloud.

REPLを起動すると、クラウド上にあるそれぞれのコンピュータにアクセスできることを思い出すまで、私はほんの一瞬だけ恐怖を感じた。

So, if you're using an autonomous agent on REPL it, you really haven't got much to worry about because the only thing it can damage is itself.

つまり、REPL上で自律型エージェントを使用している場合、心配することはあまりありません。なぜなら、自律型エージェントがダメージを与えられるのは、自分自身だけだからです。

In fact, the big boy that was released last week is AutoGPT.

実際、先週リリースされた大物はAutoGPTです。

AutoGPT comes in a GitHub repository.

AutoGPTはGitHubのリポジトリで提供されています。

And honestly, it's a bit of a pain to set up if you were doing it in your local machine.

正直なところ、ローカル・マシンでそれを行う場合、セットアップに少々手間がかかる。

Well, thanks to our developer advocate, we have a fantastic new template where you can spin up AutoGPT in minutes.

しかし、私たちの開発者アドボケートのおかげで、AutoGPTを数分で立ち上げることができる素晴らしい新しいテンプレートができました。

Let's give it a go and explore what an autonomous agent can actually do for us.

さっそく試してみて、自律型エージェントが実際にどんなことをやってくれるのか、探ってみましょう。

Now, of course, the first thing we have to do is go to OpenAI login and get our OpenAI key.

さて、もちろん、最初にしなければならないのは、OpenAIログインしてOpenAIキーを取得することです。

You can do that by going to your profile, clicking on view API keys.

自分のプロフィールに行き、APIキーを見るをクリックすることでできます。

And hopefully if you created one, you know what it is.

そして、もし作成したのであれば、それが何であるかを知っていることを期待します。

Otherwise, click create new key, give it a name, click create secret key and copy this.

そうでなければ、新しいキーの作成をクリックし、名前をつけて、シークレットキーの作成をクリックし、これをコピーします。

Now, don't forget that if you sign up for a free account, your first six months, you get a number of dollars of credit to use for your API calls for free.

無料アカウントに登録すると、最初の6ヶ月間は、APIコールに使用できる数ドルのクレジットが無料で手に入ることを忘れないでください。

Otherwise, you will have to connect this to a credit card back on replica.

それ以外の場合は、レプリカに戻ってこれをクレジットカードに接続する必要があります。

And let's see how easy it is to spin up AutoGPT.

そして、AutoGPTをスピンアップするのがどれほど簡単なのか見てみましょう。

We're going to follow the link to the AutoGPT template.

AutoGPTのテンプレートへのリンクをたどっていきます。

When we get there, we simply going to fork it, make sure to make it private if you want your OpenAI key to stay private.

OpenAIのキーを非公開にしたい場合は、非公開にすることを確認してください。

And the forking process happens reasonably quickly.

フォーク処理はすぐに終わります。

Now we do have a README.md file tell you what to do to set it up.

さて、README.mdファイルには、セットアップのために何をすべきかが書かれています。

But actually, the main thing we've got to do is go to secrets and put in our OpenAI API key without being click run.

しかし、実際には、secretsにアクセスして、OpenAIのAPIキーをクリックせずに入力することが主な作業です。

And we've actually got AutoGPT working already.

そして、AutoGPTはすでに動作しています。

You see, it's asking us for us to continue the previous model, which was an example one.

ほら、前のモデル(例1)を継続するかどうか聞いている。

I'm just going to say no to that.

これにはノーと言うしかありません。

And you'll see the first thing it prompts me is to give it a name.

そして、最初に名前をつけるよう促されるのがおわかりいただけるでしょう。

So I know what I'm looking for.

つまり、自分が何を求めているのかがわかったわけです。

Well, let's have a think about what these autonomous agents are good for.

では、この自律型エージェントは何に適しているのか、考えてみましょう。

They're very good for doing independent research and just getting on with stuff.

自律型エージェントは、独自の研究を行い、物事に取り組むのに非常に適しています。

They're very good at finding and creating stuff and coming to a conclusion from using Google and using a web browser like a human would.

人間のようにGoogleやウェブブラウザを使って、何かを見つけたり、作ったり、結論を出したりするのは得意です。

But it's best at chaining things together and creating questions to generate an answer for you.

しかし、物事を連鎖させ、質問を作り出し、答えを導き出すという点では、最も優れています。

Let's start with something quite simple.

まずは、とてもシンプルなことから始めてみましょう。

Finding the best headphones for a certain budget.

ある予算で最高のヘッドホンを見つけることです。

We give it its main goal.

私たちは、その主な目標を与えます。

And in this case, my main goal is going to be to find the best wireless headphones for under $200.

この場合、私の主な目標は、200ドル以下で最高のワイヤレスヘッドホンを見つけることです。

And then it's going to ask me for a couple of goals.

そして、いくつかの目標を私に尋ねます。

So first goal would be to find the best headphones all around for under $200.

最初の目標は、200ドル以下で最高のヘッドホンを見つけることです。

That are wireless.

ワイヤレスであること。

Goal two, maximise battery life, should have noise cancellation, be comfy, someone with a big head should be aesthetically pleasing.

目標2:バッテリー寿命を最大にすること、ノイズキャンセリング機能があること、快適であること、頭の大きい人は美的感覚に優れていること、などなど。

Now, autonomous agents do spend a lot of time thinking.

さて、自律型エージェントは、考えることに多くの時間を費やしています。

And this is because they're coming up with questions to meet the prompts and meet the needs of your topic.

これは、プロンプトを満たすために、またトピックのニーズを満たすために、質問を考え出すからです。

You'll see here what it does is it comes up with a question, what it wants to do next, some reasoning and some of its own criticism.

ここでは、質問、次にやりたいこと、推論、そして自分自身の批判を考えていることがわかります。

All you need to do is say yes or no to whether it should follow that prompt.

あなたがすべきことは、そのプロンプトに従うべきかどうか、イエスかノーかを言うことだけです。

Someone say yes and let it do its business.

誰かが「イエス」と言えば、その通りにしてくれます。

You can see that it goes off and gets articles, goes off and searches the web and then does more thinking and more analysis based on that.

このように、記事を探し、ウェブで検索し、それをもとにさらに考え、分析することがわかります。

Now you might be wondering why it's asking me each time to authorise its request.

さて、なぜ毎回私に許可を求めるのか不思議に思うかもしれません。

And the reason for that is, as you can imagine, an autonomous AI agent sending requests back and forth to OpenAI's API gets quite expensive, quite fast.

その理由は、ご想像の通り、自律型AIエージェントがOpenAIのAPIにリクエストを送り返すと、かなり高価で、かなり速くなるからです。

This model is running on GPT 3.5, so it's reasonably inexpensive, but you do get the best results from running on GPT-4.

このモデルはGPT 3.5で動作しているので、それなりに安価ですが、GPT-4で動作させると最良の結果を得ることができます。

GPT-4 is a very expensive way of running this.

GPT-4は非常に高価な実行方法です。

And if we just said, yeah, go for it and let it run for as long as it wanted, we could rack up a bill without really realising.

GPT-4は非常に高価な動作方法です。もし私たちが、そうだ、やってみよう、と言って好きなだけ動作させていたら、気づかないうちに請求書が溜まっていたかもしれません。

I'm going to try now to tell it to carry on and just keep going for a few.

私は今、「続けろ」と言って、少しばかり続けてみようと思っています。

I'm going to give it 10 more requests.

もう10回くらいリクエストしてみようかな。

So you'll see that using why and then a number flag allows me to tell it how many times just get on with it.

このように、理由と数字の旗を使うことで、何度でも「続けろ」と指示できることがおわかりいただけると思います。

And I just said, go through 10 more iterations, go through 10 more thought processes and see what you get.

さらに10回反復し、10回の思考プロセスを経て、何が得られるかを確認するのです。

Now autonomous agents are not perfect.

自律型エージェントは完璧ではありません。

They are a brand new technology.

まったく新しい技術です。

In fact, they're really a brand new paradigm in AI software.

実際、AIソフトウェアにおける全く新しいパラダイムなのです。

That means at the moment they do need a little bit of massaging, a little bit of help and they can go down rabbit holes.

つまり、現時点では、ちょっとしたマッサージや手助けが必要で、ウサギの穴に入り込んでしまうこともあるのです。

When I first encountered these, I asked it to do a big research project on which was the best computer science GCSE in the UK.

私が初めてこのソフトに出会ったとき、「英国で最も優れたコンピュータサイエンスのGCSEはどれか」という大きな研究プロジェクトを依頼しました。

And it went down a massive rabbit hole of degree level qualifications before I stopped it and prompted it to get back on the right track.

すると、私が止めて正しい道に戻るように促すまで、学位レベルの資格という巨大なウサギの穴に入り込んでしまったのです。

These things need to be babied a lot at the moment, but they are only a week old.

今のところ、このようなものには多くの子育ての必要がありますが、まだ生まれて1週間です。

So I think that's fair.

だから、それはフェアだと思う。

Okay.

なるほど。

So it's shut down.

では、シャットダウンしているのですね。

Has it come to a conclusion?

結論は出たのでしょうか?

So let's see what it finally decided after compiling a distant research in each option, including battery life and comfort for some of the big head determined that the Audio Technica ATH MX50X BT2 is the best choice.

それでは、最終的に、バッテリーの寿命やいくつかの大きな頭のための快適さを含む、各オプションで遠くの研究をまとめた後、オーディオテクニカATH MX50X BT2が最良の選択であることを決定したものを見てみましょう。

Not only does it offer 40 hours of battery life, but also known for its level of comfort even for people with a big head.

40時間の電池寿命だけでなく、頭の大きい人でも快適に使えるレベルであることも知られています。

That's me.

それは私です。

Additionally, we're user saying the overall sound quality is excellent.

さらに、全体的な音質が優れていると言っているのは、ユーザーです。

Now that's great.

これは素晴らしいことです。

I mean, when I go on a shopping spree and I want the best of something, I normally spend hours and hours of my life researching things under certain criteria, comparing reviews.

というか、私は買い物に行くとき、最高のものが欲しいと思ったら、普通は何時間も何時間もかけて、ある基準で物事を調べ、レビューを比較します。

This autonomous agent might not be the most efficient thing in the world, but it's gone off and done something like that and found me a result on its own.

この自律型エージェントは、世界で最も効率的なものではないかもしれませんが、そのようなことをやってのけて、勝手に結果を出してくれるのです。

Whilst I could be doing something else and something more productive with my time.

私は、自分の時間を使ってもっと生産的な別のことをすることができたかもしれないのに。

This is an amazing new technology, but let's see what else it can do.

これは驚くべき新技術ですが、他にどんなことができるのか見てみましょう。

Okay.

なるほど。

I've got something going on here that I've always wanted to do, but never really had the time to achieve.

ずっとやりたかったんだけど、なかなか時間がなくて実現できなかったことを、ここでやってみます。

I've created a folder in my Ripple called Audio, and I filled it full of a bunch of MP3 files.

Rippleの中にAudioというフォルダを作り、その中にMP3ファイルをたくさん入れています。

Now, something I'd really like to have in a Ripple is an RSS podcast feed that I can bring into my phone of audio files that I just drop in myself.

Rippleで実現したいのは、RSSポッドキャストフィードで、自分で落としたオーディオファイルを携帯電話に取り込むことができる。

I've never really had the time to research the podcast format, make the XML file, or even spend the time to get this working correctly.

しかし、ポッドキャストのフォーマットについて調べたり、XMLファイルを作成したり、正しく動作させるために時間をかけたりしたことがありませんでした。

So let's see if AutoGPT can do this for me.

そこで、AutoGPTが私のためにこれをやってくれるかどうか試してみることにしましょう。

So I have no idea this will work, but I'll try to outline the problem as best I can see it.

というわけで、これがうまくいくとは全く思えないのですが、わかる範囲で問題の概要を説明します。

I want it to automatically scan my audio folder and build an iTunes compatible XML file that can then be hosted online.

オーディオ・フォルダーを自動的にスキャンして、iTunesと互換性のあるXMLファイルを作成し、それをオンラインでホストしてほしいのです。

I also want it to create a file called podcast.py that I can run for myself.

また、Podcast.pyというファイルを作成し、自分で実行できるようにしたい。

This is pretty cool.

これはかなりクールです。

The first thing it's doing is looking for an extension library.

まず最初に、拡張ライブラリの検索を行います。

Once again, I'm going to do Y and probably give it 10 chances to get things working.

もう一度言いますが、私はYを実行し、おそらく10回のチャンスを与えて、物事を動かすようにするつもりです。

So this is interesting there.

これが面白いんです。

It is actually trying to do things with the file system.

これは実際にファイルシステムで何かをしようとしているのです。

Now, its first go, podgen.py, hasn't worked, so it's going to try something different.

さて、最初に作ったpodgen.pyはうまくいかなかったので、違うものを試しています。

This is interesting.

これは面白いです。

It's having some trouble installing the podgen library via pip, and that's perfectly normal because library installation in a Ripple is best achieved with a package manager.

Rippleでのライブラリのインストールはパッケージマネージャを使うのが一番良いので、これは完全に正常です。

Of course, it doesn't know it's running on Ripple.

もちろん、Rippleで動作していることは知りません。

It doesn't know there's a package manager available to it, and this is why you need to massage them.

もちろん、Ripple上で動作していることは知りませんし、パッケージマネージャが利用できることも知りません。

So let's try running that again and continuing with it, but this time we'll try and prompt it slightly differently.

では、もう一度これを実行し、続けてみましょう。しかし、今度は少し違った方法でプロンプトを出してみましょう。

We'll continue with this, and when it decides to try and use pip this time, we'll tell it not to.

このまま続けて、今度はpipを使おうとしたら、そうしないように指示します。

You see here I can give it some feedback, and in this case it was getting stuck on that podgen library.

この場合、Podgenライブラリで行き詰っていることがわかります。

So let's see what it does when I tell it to use something different.

では、別のものを使うように指示したときにどうなるか見てみましょう。

You see here it's getting stuck in a loop, and this is one of the common problems with these at the moment.

ループにはまり込んでいるのがわかりますが、これは現在、このようなライブラリによくある問題の1つです。

It's sort of worked out what it needs to do, but it's having some difficulty, and it's struggling with that.

何をすべきか一応はわかっているのですが、ちょっと難しくて苦労しているようです。

So I'm going to give it some feedback.

そこで、いくつかフィードバックしてみます。

Again, so it's getting a bit confused here.

ここでも、少し混乱しています。

It's trying to see if feedgen's installed, and it's not actually doing that.

feedgenがインストールされているかどうかを確認しようとしているのですが、実際にはそうなっていないのです。

Okay, it's getting stuck in a bit of a loop there, but you can see the potential of this.

ちょっとループにはまりそうですが、この可能性を見てください。

If I can talk it out of that loop, I can get it to actually set everything up for me and build everything, which would be pretty cool.

このループから抜け出すことができれば、実際にすべてをセットアップし、すべてを構築することができるようになります。

But let's try something a little bit different.

でも、ちょっと違うことをやってみましょう。

I've heard a lot about Tailwind .css recently, and let's see if it can justify to me if I should be using it or not.

最近、Tailwind .cssについてよく耳にするようになったので、それを使うべきかどうか、正当化できるかどうか見てみましょう。

So I'm going to give it ten chances to get it right and loop through, because what I've asked it to do is find out what Tailwind.css is, compare it to similar products, give me a list of pros and cons, and tell me whether it's worth me changing over to use it or not.

Tailwind.cssとは何か、類似品と比較し、長所と短所を列挙して、これを使うことに変更する価値があるかどうかを教えてほしいということです。

And you can see that it does a reasonable job of its first stab of finding out about what it is.

そして、Tailwind.cssが何であるかを知るための最初の一刺しとして、妥当な仕事をしたことがおわかりいただけると思います。

Now it's going to take a look and browse some websites to find out a little bit about it.

次に、いくつかのウェブサイトを閲覧して、それについて少し調べてみることにします。

And you can see the cool thing about it is it's got a big website that was bigger than the amount of tokens that we could use with GPT, and it's just used chunking to summarise it in different parts.

GPTで使用できるトークンの量よりも大きなウェブサイトがあり、チャンキングを使ってさまざまな部分に要約しています。

So it's got that understanding.

つまり、そのような理解をしているのです。

And this is why these autonomous agents are so good.

そして、これが自律型エージェントが優れている理由です。

It is using and working around the limitations of RLMs to get them to actually think about things, and basically chain together thought, which is absolutely amazing to see in practice.

RLMの制限を回避して、実際に物事を考えさせ、基本的に思考を連鎖させているのですから、実際に見てみると本当にすごいことです。

So you'll see here that it's been writing the pros and cons to a file.

このように、RLMの長所と短所をファイルに書き出しているのがおわかりいただけると思います。

Take a look at our outputs folder for that.

出力フォルダを見てみてください。

So we leave it working in the background.

このままバックグラウンドで作業させます。

It's already generated this document for me.

すでにこの文書が生成されています。

Pros and cons, so we've got that, which is great, because I've got an executive summary, basically, of the research it's done so far.

長所と短所、これは素晴らしいことです。基本的に、これまでの研究のエグゼクティブ・サマリーを手に入れたのですから。

Oh, has it produced a markdown table for me?

マークダウン・テーブルも作成してくれましたか?

It has.

そうです。

Let's open that in a preview and see.

プレビューでそれを開いて見てみましょう。

Wow, that's pretty cool that it's done that.

うわー、これはかなりクールだ。

That's pretty cool, indeed.

実にクールだ。

Let's see where it is.

どこにあるのか見てみましょう。

Oh, this is interesting.

おお、これは面白い。

So it's actually asked the LLM to justify where its summary was accurate.

LLMの要約がどこまで正確なのか、実際にLLMに質問しているんですね。

It's a nice way of checking your work, isn't it?

自分の仕事をチェックするいい方法でしょう?

I'm just going to ask it to give me a decision because we're not going forever, but there we go.

永遠に続くわけではないので、判断を仰ぐだけですが、これでよしとしましょう。

Well, that was a pretty cool example, actually, and it could have gone on for a while, but this is the beauty of an autonomous agent.

まあ、実際、かなりクールな例で、しばらく続けられたかもしれませんが、これが自律型エージェントの良さなんです。

I'm not spending that time myself.

私自身はその時間を使っていません。

I could give it 100 chances to go through and get the data and go and do something else.

私自身がその時間を費やしているわけではありません。私は、データを取得し、他のことをするために100回のチャンスを与えることができます。

In fact, if I turn my report always on, I could just close it and come back to it at a different time and see what was happening.

実際、レポートを常にオンにしておけば、いったん閉じて、また別の機会に戻ってきて、何が起きているのか見ることができます。

It is amazing how much work these things can do and automate for you.

このようなことができるようになり、自動化できるようになったのは驚くべきことです。

And in fact, we are at the very cutting edge of what we can do with them.

実際、私たちはこのツールでできることの最先端にいるのです。

In fact, most things you attempt with it will probably be the first time anyone's even attempted that.

実際、このソフトでやろうとすることは、おそらく誰もやったことがないようなことでしょう。

In fact, when I was using this yesterday to compare different GCSE courses in the UK, it is quite likely it's the first time anyone's done it to compare academic courses ever.

実際、昨日、私がこのソフトを使ってイギリスのGCSEコースを比較したところ、アカデミックなコースを比較したのはおそらく初めてでしょう。

These things are a week old.

このようなことは1週間前のことです。

It's amazing.

すごいことです。

Why don't you get onto Replet, fork that template, pop in your open API key, and see what an autonomous agent can do for you.

Repletにアクセスして、テンプレートをフォークし、オープンAPIキーを入力して、自律型エージェントがあなたのために何ができるかを見てみませんか?

And don't forget, one of the really amazing things about Replet is you can do all these from the mobile app on your phone.

そして忘れてはいけないのは、Repletの本当に素晴らしいところは、携帯電話のモバイルアプリからこれらすべてを実行できることです。

In fact, that's what I'm going to do next.

実は、次にやるのはこれなんです。

Because if there's one thing that autonomous agents is good for, it's research.

自律型エージェントが得意なことといえば、それは研究ですからね。

And as you'll see, I need to do a serious bit of research whilst I'm getting back to my vacation.

そして、お分かりのように、私は休暇に戻る間、真剣に少し研究する必要があるのです。

See you next time, guys.

それではまた次回、お会いしましょう。


この記事が気に入ったらサポートをしてみませんか?