-
Notifications
You must be signed in to change notification settings - Fork 184
Add Context Manager to PER #4379
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
Add Context Manager to PER #4379
Conversation
Signed-off-by: Mingshi Liu <[email protected]> change context management passing from query parameters to payload Signed-off-by: Mingshi Liu <[email protected]> pass hook registery into PER Signed-off-by: Mingshi Liu <[email protected]> apply spotless Signed-off-by: Mingshi Liu <[email protected]> initiate context management api with hook implementation Signed-off-by: Mingshi Liu <[email protected]>
86a3623 to
67ad592
Compare
.../main/java/org/opensearch/ml/engine/algorithms/agent/MLPlanExecuteAndReflectAgentRunner.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mingshi Liu <[email protected]>
Signed-off-by: Mingshi Liu <[email protected]>
ml-algorithms/src/main/java/org/opensearch/ml/engine/agents/AgentContextUtil.java
Show resolved
Hide resolved
ml-algorithms/src/main/java/org/opensearch/ml/engine/agents/AgentContextUtil.java
Show resolved
Hide resolved
ml-algorithms/src/main/java/org/opensearch/ml/engine/agents/AgentContextUtil.java
Outdated
Show resolved
Hide resolved
| private static final int DEFAULT_PRESERVE_RECENT_MESSAGES = 10; | ||
| private static final String DEFAULT_SUMMARIZATION_PROMPT = | ||
| "You are a tool interactions summarization agent. Summarize the provided tool interactions concisely while preserving key information and context."; | ||
| "You are a interactions summarization agent. Summarize the provided interactions concisely while preserving key information and context."; |
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.
Is this the expected prompt to not include Tool-Specific Details? I think this would cause some Verbose Summaries.
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.
we now use summarization manager for two sub agents in PER. for planner, summarization manager summarizes the completed steps, and for the executor, summarization manager summarizes the tool used results. So I try to make the prompt general to summarize interactions.
ml-algorithms/src/main/java/org/opensearch/ml/engine/agents/AgentContextUtil.java
Show resolved
Hide resolved
|
CI failed not related to code changes |
Signed-off-by: Mingshi Liu <[email protected]>
f588a24
into
opensearch-project:feature/context_manager_hooks
Description
Add Context Manager to PER,
for planner agent, I added in a PRE_LLM hook, and for executor agent, which is a conversational agent, it would use the same PRE_LLM hook and POST_TOOL hook for conversational runner.
Related Issues
Add Context Manager to PER
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.