Integrate AgentOptimizer
Why are these changes needed?
AgentOptimizer, a new class for training AutoGen agents in the era of LLMs as a service. AgentOptimizer is able to prompt autogen agents to iteratively optimize their function/skills according to historical conversation and performance.
Currently, it only supports training one Assistant-UserProxy agent pair and is subject to be extended to a large scenario in the future.
Why we need to separate agents and AgentOptimizer?
We dedicate to give users more room for customization in their own scenarios. The AgentOptimizer is solely for generating functions/skills, how/which/when to register should be decided by users.
TODO:
- [x] Determine API for Agentoptimizer, which is the basic for
- [x] Add notebooks to introduce the concept of agent training
- [x] Add test and corresponding documentation
Currently. this PR is a draft intended for facilitating discussions related to API interfaces. Any suggestions especially on the API design are appreciated.
Related issue number
N/A
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.
Codecov Report
Attention: Patch coverage is 0% with 149 lines in your changes are missing coverage. Please review.
Project coverage is 47.63%. Comparing base (
59a7790) to head (b8192ee). Report is 1 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| autogen/agentchat/contrib/agent_optimizer.py | 0.00% | 148 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1767 +/- ##
===========================================
+ Coverage 36.73% 47.63% +10.89%
===========================================
Files 69 70 +1
Lines 7134 7283 +149
Branches 1557 1717 +160
===========================================
+ Hits 2621 3469 +848
+ Misses 4280 3516 -764
- Partials 233 298 +65
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 47.49% <0.00%> (+10.76%) |
:arrow_up: |
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.
@qingyun-wu @sonichi This PR is ready to merge.
The code looks good. But not sure if this should live in "extensions".
The code looks good. But not sure if this should live in "extensions".
we can move to contrib?
@JieyuZ2 agree, contrib is better. @qingyun-wu what do you think?
The code looks good. But not sure if this should live in "extensions".
done. move to contrib
Would love to have a topic page under /docs/topics/ on research related topics like continuous improvement.