Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.1k stars 43.98k forks source link

Auto-GPT excessively searches the web, even for information GPT already knows #114

Closed rogeriosmorais closed 11 months ago

rogeriosmorais commented 1 year ago

GPT already knows way too much stuff, there's no need to search the web for every little sub-task that comes up. For example, if you ask GPT what the rules for texas hold'em poker are, it knows and is able to detail it without any issues. When using Auto-GPT, instead of using this already known knowledge, Auto-GPT enters an infinite loop of searching the web and getting 404s and looking for more links, etc. All of that is unnecessary.

So, maybe you should ask GPT if the information is already known BEFORE making the decision to search the web?

syntex01 commented 1 year ago

It can't know if it already knows something. Gpt4 should not be used as a knowledge source, because it can be wrong.

syntex01 commented 1 year ago

It could however search in its own memory in case it looked the information up already.

TheWaler commented 1 year ago

To build on @syntex01's point, GPT works best when we don't need to rely on it knowing things but just being able to understand things. It's mostly because we don't have a good understanding of how well is GPT's epistemological self-reflection (i.e. how well does it understand how well it knows something). So wherever possible, we want the agent to get its information from external sources and then be the glue between contextual knowledge and actions. What we probably can and should do here is default more heavily (in a configurable way?) to locally storing knowledge and retrieving it instead of going out to the web - so we'll be able to reduce the number of external calls.

stefangrotz commented 1 year ago

Maybe you could add an additional command: "draft from model knowledge", "guess by GPT" or something similar that can be enabled or disabled? It could be usefull in many use cases.

st4s1k commented 1 year ago

Basically you need some kind of caching mechanism.

Edit: Why not ask Auto-GPT to implement it?

tatsuiman commented 1 year ago

Could these problems be solved by the following PR? It is possible to read information from vectorized memory. https://github.com/Torantulino/Auto-GPT/pull/122

rogeriosmorais commented 1 year ago

To build on @syntex01's point, GPT works best when we don't need to rely on it knowing things but just being able to understand things. It's mostly because we don't have a good understanding of how well is GPT's epistemological self-reflection (i.e. how well does it understand how well it knows something).

The same argument can be said about google searching. GPT doesn't have a good understanding on how reliable a website is. When the information you need isn't either new or complex, you are better off relying on GPT's own understanding than a shallow google search. Back to my example, a lot of searches ended up bringing up 404s or poker strategies, which are different from the game's actual set of rules. In the end is just a waste of time and tokens.

st4s1k commented 1 year ago

@rogeriosmorais how about limiting the search to a given set of websites? (wikipedia, reddit, stackoverflow, etc.)

rogeriosmorais commented 1 year ago

@rogeriosmorais how about limiting the search to a given set of websites? (wikipedia, reddit, stackoverflow, etc.)

I tried to include that limitation as one of the 5 goals. "Get the poker game rules from wikipedia" or something like that. But it seems it was not treated as a hard rule, instead more like a light suggestion, so it ended up on other websites.

st4s1k commented 1 year ago

@rogeriosmorais how about limiting the search to a given set of websites? (wikipedia, reddit, stackoverflow, etc.)

I tried to include that limitation as one of the 5 goals. "Get the poker game rules from wikipedia" or something like that. But it seems it was not treated as a hard rule, instead more like a light suggestion, so it ended up on other websites.

I meant having a hardcoded website whitelist, or a web_search_whitelist.txt, or a config file, or something else, and filtering the websites that the bot can access.

https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list#request

image

image

MarcusRobbins commented 1 year ago

What is the goal here? GAI or a search bot that can provide references? If GPT knows the answer it shouldn't go off on Google searches.

st4s1k commented 1 year ago

What is the goal here? GAI or a search bot that can provide references? If GPT knows the answer it shouldn't go off on Google searches.

How should it decide if it should search the web or not? How does it know if the answer it knows is correct? Maybe it should search the web only if the user asks? Maybe it should search the web if the answer is "I don't know"?

LuposX commented 1 year ago

https://arxiv.org/abs/2207.05221 this goes in that direction.

alreadydone commented 1 year ago

How should it decide if it should search the web or not? How does it know if the answer it knows is correct?

The Toolformer approach (the original paper includes two search engines):

We only keep generated API calls if adding the API call and its result reduces the loss by at least t, compared to not doing any API call or obtaining no result from it. We then want to fine-tune the model on a new dataset that contains our text with API calls.

Finetuning would necessitate an open model (cf. https://github.com/tloen/alpaca-lora, https://huggingface.co/eachadea/ggml-toolpaca-13b-4bit), since fine-tuning of GPT-3.5-turbo or GPT-4 isn't available yet.

Pwuts commented 1 year ago

Is this solved sufficiently with the long-term memory implementations we have now? (Pinecone, Redis, Milvus)

Boostrix commented 1 year ago

this still does happen, for instance it may repeatedly re-invoke lsb_release -a to query its environment, rather than recalling/caching previous invocations

Pwuts commented 1 year ago

We'll be addressing this issue in reworking the agent loop and the memory / retrieval system. For those who are interested, you can keep an eye on #3536

github-actions[bot] commented 11 months ago

This issue was closed automatically because it has been stale for 10 days with no activity.