10 ms·
BabyAGI: An Autonomous and Self-Improving Agent
- sthatipamala 3y agoWhy is this linked to a fork of Yohei’s original repo?
- bugglebeetle 3y agoWhy does every one of these example use pinecone when that costs money and Faiss[0] is free? If you’re going to let something run a bunch of fee-per-use API calls on its own, why double up on getting charged? [0] https://github.com/facebookresearch/faiss https://github.com/facebookresearch/faiss
- amrrs 3y agoThe code in this tutorial uses Faiss. Also you can experiment swapping the LLMs thanks to LangChain https://youtu.be/WosPGHPObx8 https://youtu.be/WosPGHPObx8
- digdugdirk 3y agoThis is run and accessed local-only, correct? I've been looking for a local-only vector database for LLM agent work like these.
- bugglebeetle 3y agoYup, it’s local and free! Best of both worlds!
- digdugdirk 3y agoI'll check it out! Any notable issues/differences between this and pinecone that I should keep an eye out for when getting started?
- bugglebeetle 3y agoI almost exclusively use Faiss, so I can’t really say. Apologies. Maybe someone else can weigh in.
- yinser 3y agoUsing langchain I’ve been introduced to chroma which uses a local store and it’s perfect. Check out their question and answer demo, the VectorstoreIndexCreator utilizes chroma and duckdb it seems. https://python.langchain.com/en/latest/use_cases/question_answering.html https://python.langchain.com/en/latest/use_cases/question_an...
- leobg 3y agoBecause FAISS and hnswlib don’t have “pine cronies” as advocates on HN, I guess.
- SomaticPirate 3y agoAlso pg_vector seems to be gaining traction
- spacetime_cmplx 3y agoUnless you have several hundred million documents, just write a simple encoder that serializes the embedding vectors to a flat binary file. Writing code from scratch to process and search 200k unstructured documents -- parsing, cleaning, chunking, OpenAI embedding API, serialization code, linear search with cosine similarity, and the actual time to debug, test and run all this -- took me less than 3 hours in Go. The flat binary representation of all vectors is under 500 MB. I even went ahead and made it mmap-friendly for the fun of it even though I could read it into all into memory. Even the dumb linear search I wrote takes just 20-30ms per query on my Macbook for the 200k documents. The search results are fantastic.
- dnadler 3y agoLess than 3 hours is impressive, but it took me less than 10 minutes to do the same with Chroma.
- qualudeheart 3y agoCould you share the code with us?
- spacetime_cmplx 3y agoSure! https://pastebin.com/xm7D1c30 https://pastebin.com/xm7D1c30 I didn't bother cleaning it so it's just a code dump, but it's fairly straightforward. Not included are a Python script to parse and clean the raw documents into JSON files (used in `summarize` to output results), code to read these files and get the embeddings from OpenAI for use in `newEmbeddingJSON `, and a bunch of random parallelization shell scripts that I didn't save. To use it, I call newDBFromJSON from a directory of JSON embedding vectors and serialize the binary representation. This takes a few minutes mostly because parsing JSON is slow, but you I only needed to do this once. When I need to search for the top 10 documents most similar to document X, I call `search` with the embedding vector for that doc. Alternatively if I need to do semantic search with natural language, I'll call the OpenAI API to get the embedding vector for the query and call `search` with that vector. It's pretty fast thanks to Go concurrency maxing out my CPU. It's super accurate with the search results thanks to OpenAI's embeddings. It's nowhere close to production-ready (it's littered with panics), but it was good enough for me. Hope this helps! Edit: oh and don't use float64 (OpenAI's vectors are float16)
- aledalgrande 3y agoWhy using the AGI term? It is already overloaded
- hosh 3y agoI had been thinking of ideas such as memory compaction (summerize things), or using the LLM to translate into an execution language for the automation.
- omneity 3y agoFrom people running GPT based loops like this one, can you share typical tasks you've been performing & the associated costs?
- lxe 3y agoI've been using AutoGPT, which is the other ChatGPT automation tool, and frankly I'm a bit disappointed. It spends most of its time figuring out why system commands are failing and why javascript is blocked, and/or why selenium can't start.
- Timon3 3y agoOh god, it's really replacing me...
- brookst 3y agoYeah, tried it with trivial goals like "make a 5 second .wav file with a 440hz tone", and after running for an hour and burning tons of openai requests, it had not figured out how to even pip install a module to create audio files. It mostly seems like a massively stoned teenager trapped in thought loops about how to use thought loops to achieve something, without ever hitting on the idea of actually doing something.
- dontwearitout 3y agoI haven't used autoGPT but vanilla chatGPT can happily do this in 25 lines of python.
- vessenes 3y ago@dang might be worth linking to Yohei's original repo, which is definitely HN front page worthy: https://github.com/yoheinakajima/babyagi https://github.com/yoheinakajima/babyagi. This repo is not just a strict fork though, Oliveira seems to be working on making BabyAGI more autonomous.
- spaceman_2020 3y agoSo I’m a tech noob, but I recently finished the Lex Friedman podcast with Max Tegmark. This is a serious person with strong credentials ringing the warning bell about AI. Yet, a lot of people in my tech circle seem to swing between being unconcerned and unimpressed by AI. Where exactly are we with AI as a legitimate threat if we continue down our current path? Are people like Max just jockeying for attention? Or is there merit to their concerns?
- hammyhavoc 3y agoCan you be more specific? A threat to what exactly?
- YZF 3y agoCreating a super-intelligence that kills all of us?
- hammyhavoc 3y agoSci-fi. Worry about human beings being the one to kill us all because that's a threat that's existed for decades with nukes and biological warfare. If it isn't weapons, it'll be self-inflicted climate change, or an asteroid we haven't noticed. SkyNet isn't happening. Six billion human beings of average intelligence are a greater threat than a single hypothetical superintelligence.
- chpatrick 3y agoMaybe watch the video. The argument isn't that it's going evil and going to kill everyone but that we'll be obsolete as a species.
- hammyhavoc 3y agoI'll pass. If it's worth knowing about then there'll be a paper on it that isn't generating someone money as a commercial podcast with sensationalist takes. Hypothetical obsolescence is not the same as being killed by a hypothetical superintelligence. We would be no more hypothetically obsolete than the overwhelming majority of lifeforms.
- digdugdirk 3y agoHow does this compare to AutoGPT? I've been using that so far to explore this space, to little success.
- corobo 3y agoHas anyone got this to actually do anything at all yet? I see all of the half demos where it doesn't complete anything, I've tried it myself and.. well, if we're being honest it was shite. I've seen a whole load of tweet threads saying what it could be used for.. Literally just looking for one example of a successful run. Anything at all. I can definitely see that there may be potential (if not this then the ideas that come off the back of this) but even I don't have a real use case for it yet, I'm just tinkering. I guess my XY question: Am I being suckered into the web3 of AI? Lots of buzz, no use case.
- jazzyjackson 3y agoThere is some magical thinking at play, that once you have what appears to be an intelligence of some kind, simply allowing it to recursively self-critique will lead to singularity, but the other possibility is the signal just degrades, like deep-fried jpgs.
- corobo 3y agoMy testing would definitely lean towards deep fried jpgs aye. Every time it seemed to hit a bump somewhere then got caught up in a loop of googling whatever problem it was having and not finding an answer it was looking for, then going on to look into that problem, etc, etc. I guess you could put a step in to allow the human to nudge the AI back on track but then it's not really autonomous. Also it's really slow at doing anything, even before it goes off into the weeds. I understand it's new and wont be polished but man. Really slow. At least it's a decent motivator! "Oooh this is a task AutoGPT/BabyAGI could do... ehh it'd be quicker to just do it myself" I'll keep an open mind, still eager to see a successful attempt at something. That'd at least open up a chance I'm doing it wrong rather than it not doing anything useful.
- Buttons840 3y agoThis has been reinforcement learning for decades. People say "OMG! The agent is acting and learning and getting better all on its own!" And they're right, in the beginning. Eventually the agent plateaus or collapses. Supervised learning is much more stable. GTP is supervised learning. Once you start letting the agent choose or modify its own training data, then you're moving towards the much less stable realms of reinforcement learning.
- Mizza 3y agoIf you wanna play with some different looping AI architectures yourself, you can try AI Studio: https://aistud.io https://aistud.io and follow along with the AI System patterns series I've just started: https://aistud.io/blog/ai-system-patterns-parallel-conversations https://aistud.io/blog/ai-system-patterns-parallel-conversat...
- freediver 3y agoThis is not AGI by any stretch of imagination. It is does not even appear to be a step on the path to AGI. Furthermore, due to autoregressive nature of GPT models, the more auto-gpt generates (the more it works, the more tasks it performs..) the chance of things going off the right path grow exponentially, and then it is 'doomed' to the end [1]. Thus, chance of this being actually useful for anything longer than what a simple prompt can already do with a tool like ChatGPT is very low. The end result is an impressive concept but a practically unusable tool. And the problem, in general, is that as the auto-gpt improves (which it will at impressive pace), so will our ambition in using it, which will lead to constant disappointment and what we have today will be generally how we feel about it in the future. Always needing "just a bit more", but never really there. We already have a "baby AGI" that has been deployed in production environment for a few years - it is called Tesla self driving. It was supposed to get us from point a to point b completely autonomously. And for 6 years now it has been almost "almost there", but never really there (and arguably never will be). What this does though, is create and inflate a giant FOMO, and the best way of dealing with FOMOs (long term) is to stay on the firm ground, observe, wait for clarity and the right action. [1] Watch in particular Yann LeCun's presentation at https://www.youtube.com/watch?v=x10964w00zk https://www.youtube.com/watch?v=x10964w00zk
- brookst 3y agoI kind of agree but I really don't see Tesla self-driving as even aspirational to AGI. It seems like the poster child for a domain specific AI that nobody has an interest in making general.
- mkl95 3y agoI have a hunch that if AGI ever emerges, it won't be described as "an autonomous and self-improving agent"
- mmh0000 3y agoLessWrong did a post<1> on AutoGPT the other day, seems like a lot of their statements also apply to BabyAGI. <1> https://www.lesswrong.com/posts/566kBoPi76t8KAkoD/on-autogpt https://www.lesswrong.com/posts/566kBoPi76t8KAkoD/on-autogpt