AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Wikipedia Search Command

Open pierluigi-failla opened this issue 1 year ago • 3 comments

Background

Wikipedia Search could provide the capability of searching for encyclopedia-like information and, in this sense, I think is a very relevant and general command to have. I will be more than happy to update it later to the plugin template once will be merged to stable.

Changes

Added Wikipedia Search command.

Documentation

The new command wikipedia_search will search in Wikipedia for relevant information. The resulting string is a json.dumps of a list of len num_results containing dictionaries with the following structure: {'title': <title>, 'summary': <summary>, 'url': <url to relevant page>}.

Test Plan

As far as this is a very simple functionality I not added tests as per some other similar functionality.

PR Quality Checklist

  • ✔️ My pull request is atomic and focuses on a single change.
  • ✔️ I have thoroughly tested my changes with multiple different prompts.
  • ✔️ I have considered potential risks and mitigations for my changes.
  • ✔️ I have documented my changes clearly and comprehensively.
  • ✔️ I have not snuck in any "extra" small tweaks changes

pierluigi-failla avatar Apr 18 '23 16:04 pierluigi-failla

this may be superset by the fact that chatGPT knows it can just google a subject and click on the wikipedia link, to be honest

rocks6 avatar Apr 18 '23 18:04 rocks6

@rocks6 my2cents are: Google indexes website while Wikipedia is an online encyclopedia. Your point is correct and indeed in my tests GPT discriminates quite well when to use google_search (e.g. searching articles, news, general comments...) or wikipedia_search (e.g. look for definition, factual information, historical facts...), if we have only google_search relevant Wikipedia pages may be not in the top few results.

pierluigi-failla avatar Apr 18 '23 18:04 pierluigi-failla

That makes sense, if the model knows wikipedia is an authoritative source for information it may be more inclined to search it directly to improve its results

rocks6 avatar Apr 18 '23 19:04 rocks6

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Apr 20 '23 00:04 github-actions[bot]

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 20 '23 06:04 github-actions[bot]

I messed up with conflicts I will create a clean pr.

pierluigi-failla avatar Apr 20 '23 07:04 pierluigi-failla

Hello!

We sincerely appreciate your contribution to our project. Please note that only essential features will be merged into the main repository. Thus, we encourage you to open a pull request in the Auto-GPT-Plugins repository.

If you encounter any difficulties in converting your code into a plugin, please do not hesitate to seek assistance from the #plugins-chat on our Discord Server.

We look forward to your contribution to the Plugins repository, and we apologize for any inconvenience this may have caused.

hdkiller avatar Apr 23 '23 19:04 hdkiller