autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Add SQL agent and Spider environment

Open byronxu99 opened this issue 1 year ago • 5 comments

Why are these changes needed?

Related issue number

Checks

  • [ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
  • [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
  • [ ] I've made sure all auto checks have passed.

byronxu99 avatar Jan 12 '24 16:01 byronxu99

Hi @byronxu99 Can you provide details about this SQL agent and Spider environment, as well as their benefits? The test dir is generally reserved for test scripts to be run by pytest or by users. New agents generally belong under agentchat/contrib.

rickyloynd-microsoft avatar Jan 12 '24 16:01 rickyloynd-microsoft

Hi @byronxu99 Can you provide details about this SQL agent and Spider environment, as well as their benefits? The test dir is generally reserved for test scripts to be run by pytest or by users. New agents generally belong under agentchat/contrib.

Hi @rickyloynd-microsoft I moved the agent into the notebook directory as an example, hopefully that's a better place.

zwd-ms avatar Jan 12 '24 17:01 zwd-ms

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (fd0094c) 32.48% compared to head (5274ade) 32.48%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1218   +/-   ##
=======================================
  Coverage   32.48%   32.48%           
=======================================
  Files          41       41           
  Lines        4907     4907           
  Branches     1120     1120           
=======================================
  Hits         1594     1594           
  Misses       3187     3187           
  Partials      126      126           
Flag Coverage Δ
unittests 32.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jan 12 '24 17:01 codecov-commenter

Hi @byronxu99 Can you provide details about this SQL agent and Spider environment, as well as their benefits? The test dir is generally reserved for test scripts to be run by pytest or by users. New agents generally belong under agentchat/contrib.

Hi @rickyloynd-microsoft I moved the agent into the notebook directory as an example, hopefully that's a better place.

Yes, it's simpler. Is this PR just adding a notebook example of how to use SpiderEnv through function calling and SQL? The loop at the bottom of the nb would be convenient if it were inside a .py file, but in the nb it would be better to replace the for loop with a few example turns to illustrate and document the responses that are expected. The other notebooks are organized this way.

Where is spider_env defined? Did that file get dropped from the PR?

At the top of the PR, there should be some explanation of the benefits. ("Why are these changes needed?")

rickyloynd-microsoft avatar Jan 12 '24 18:01 rickyloynd-microsoft

Is this the Spider nl2sql benchmark? That would probably fit better under autogenbench

afourney avatar Jan 12 '24 23:01 afourney

@rickyloynd-microsoft Hi, we have updated the notebook and PR description. spider_env is a Python pip package, and the notebook provides the command for installing it.

@afourney This PR will just be the demo notebook. Any integration with autogenbench would be for future work.

The PR should now be ready to be merged.

byronxu99 avatar Jan 25 '24 18:01 byronxu99

Could you add a link in https://microsoft.github.io/autogen/docs/Examples ? That will help with the discoverability.

sonichi avatar Jan 26 '24 17:01 sonichi

I am okay with this notebook. However, the agent is designed for "Spider" benchmark, which is not used generally for actual product. For instance, when users want to use a SQL agent, they would not expect to give "reward" or "score" for the answer, as they may not even know the answer.

So, I would suggest to include the name "spider" into the notebook file name.

BeibinLi avatar Jan 26 '24 18:01 BeibinLi

@sonichi @BeibinLi The requested changes have been made.

byronxu99 avatar Jan 26 '24 21:01 byronxu99