-
Notifications
You must be signed in to change notification settings - Fork 102
Hint use agent #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hint use agent #316
Conversation
… into generic_agent_hinter
Hints retrieval in generic agent
Refactor Hint Retrieval
* Make LLM retreival topic index selection more robust
#310) * add new flag to skip hints with the current goal in the hint source traces
* rename generic_agent_hinter to hint_use_agent for clarity * Add deprecation warning and module alias for generic_agent_hinter * improve module aliasing for submodules * Add todo rename agent name * black * bugfix: check for hint_db only when use_task_hint is true. * fix: address missing initialization and correct args reference in choose_hints method * black
* address comments * format
* add env variable for ray port * document env variables
| hint_index_type: str = "sparse" | ||
| hint_query_type: str = "direct" | ||
| hint_index_path: str = "indexes/servicenow-docs-bm25" | ||
| hint_retriever_path: str = "google/embeddinggemma-300m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is missing some params such as hint_retrieval_model, hint_level, hint db path.
| @@ -0,0 +1,19 @@ | |||
| import importlib, sys, warnings | |||
|
|
|||
| OLD = __name__ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amanjaiswal73892 We can remove generic_agent_hinter files from this PR, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a temporary alias of hint_use_agent for backward compatibility. Some existing pickled traces may still use the old namespace.
hnekoeiq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This pull request introduces a new "hint use agent" implementation for AgentLab, refactors the generic agent hinter module, and adds scripts for running generic and hinter agents. The changes improve agent modularity, configuration flexibility, and documentation, while also updating environment variable documentation. The most important changes are grouped below.
Added Hint-Use Agent
GenericAgentimplementation insrc/agentlab/agents/hint_use_agent/generic_agent.py, featuring modular hint retrieval (docs, sparse/dense, database), agent configuration, and robust error handling. This agent is designed to be the baseline for ServiceNow papers and supports various hinting modes.src/agentlab/agents/generic_agent_hinter/__init__.pyto alias its submodules to the newhint_use_agentmodule and warn about the upcoming deprecation, improving code organization and forward compatibility.src/agentlab/agents/hint_use_agent/__init__.pythat exposes agent configurations and the new agent class, consolidating the baseline agent API.Experiment scripts
experiments/generic/run_generic_agent.pyandexperiments/generic/run_generic_agent.shfor launching generic agents with configurable benchmarks, LLMs, and parallelization options. [1] [2]experiments/hinter/run_hinter_agent.pyandexperiments/hinter/run_hinter_agent.shfor running hinter agents with flexible hinting parameters and parallelization, supporting both debug and relaunch modes. [1] [2]Documentation and configuration
README.mdto fix theOPENAI_API_KEYtypo and document new Ray dashboard environment variables, improving setup clarity for users.