You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.5 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # GAIA Benchmark
  2. This scenario implements the [GAIA](https://arxiv.org/abs/2311.12983) agent benchmark. Before you begin, make sure you have followed instruction in `../README.md` to prepare your environment.
  3. ### Setup Environment Variables for AgBench
  4. Navigate to GAIA
  5. ```bash
  6. cd benchmarks/GAIA
  7. ```
  8. Create a file called ENV.json with the following (required) contents (If you're using MagenticOne)
  9. ```json
  10. {
  11. "BING_API_KEY": "REPLACE_WITH_YOUR_BING_API_KEY",
  12. "HOMEPAGE": "https://www.bing.com/",
  13. "WEB_SURFER_DEBUG_DIR": "/autogen/debug",
  14. "CHAT_COMPLETION_KWARGS_JSON": "{\"api_version\": \"2024-02-15-preview\", \"azure_endpoint\": \"YOUR_ENDPOINT/\", \"model_capabilities\": {\"function_calling\": true, \"json_output\": true, \"vision\": true}, \"azure_ad_token_provider\": \"DEFAULT\", \"model\": \"gpt-4o-2024-05-13\"}",
  15. "CHAT_COMPLETION_PROVIDER": "azure"
  16. }
  17. ```
  18. You can also use the openai client by replacing the last two entries in the ENV file by:
  19. - `CHAT_COMPLETION_PROVIDER='openai'`
  20. - `CHAT_COMPLETION_KWARGS_JSON` with the following JSON structure:
  21. ```json
  22. {
  23. "api_key": "REPLACE_WITH_YOUR_API",
  24. "model": "gpt-4o-2024-05-13"
  25. }
  26. ```
  27. You might need to add additional packages to the requirements.txt file inside the Templates/MagenticOne folder.
  28. Now initialize the tasks.
  29. ```bash
  30. python Scripts/init_tasks.py
  31. ```
  32. Note: This will attempt to download GAIA from Hugginface, but this requires authentication.
  33. The resulting folder structure should look like this:
  34. ```
  35. .
  36. ./Downloads
  37. ./Downloads/GAIA
  38. ./Downloads/GAIA/2023
  39. ./Downloads/GAIA/2023/test
  40. ./Downloads/GAIA/2023/validation
  41. ./Scripts
  42. ./Templates
  43. ./Templates/TeamOne
  44. ```
  45. Then run `Scripts/init_tasks.py` again.
  46. Once the script completes, you should now see a folder in your current directory called `Tasks` that contains one JSONL file per template in `Templates`.
  47. ### Running GAIA
  48. Now to run a specific subset of GAIA use:
  49. ```bash
  50. agbench run Tasks/gaia_validation_level_1__MagenticOne.jsonl
  51. ```
  52. You should see the command line print the raw logs that shows the agents in action To see a summary of the results (e.g., task completion rates), in a new terminal run the following:
  53. ```bash
  54. agbench tabulate Results/gaia_validation_level_1__MagenticOne/
  55. ```
  56. ## References
  57. **GAIA: a benchmark for General AI Assistants** `<br/>`
  58. Grégoire Mialon, Clémentine Fourrier, Craig Swift, Thomas Wolf, Yann LeCun, Thomas Scialom `<br/>`
  59. [https://arxiv.org/abs/2311.12983](https://arxiv.org/abs/2311.12983)