Skip to content
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

Update instruction prompt to enforce using tools name as action #1737

Conversation

xluo-aws
Copy link
Member

@xluo-aws xluo-aws commented Dec 6, 2023

Description

[Although the prompt tells LLM to use one of the tool's name configured in agent as action, LLM may still return an action that doesn't match any of the tool's name, add more wording (do NOT use any other name for action except the tool names) to prompt to enforce the use of tool names]

Issues Resolved

#1735

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --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.

…dress the problem that LLM returns other information as action.

Signed-off-by: Xuesong Luo <[email protected]>
@xluo-aws xluo-aws temporarily deployed to ml-commons-cicd-env December 6, 2023 03:10 — with GitHub Actions Inactive
@xluo-aws xluo-aws had a problem deploying to ml-commons-cicd-env December 6, 2023 03:10 — with GitHub Actions Failure
@xluo-aws xluo-aws temporarily deployed to ml-commons-cicd-env December 6, 2023 03:10 — with GitHub Actions Inactive
@xluo-aws xluo-aws temporarily deployed to ml-commons-cicd-env December 6, 2023 03:10 — with GitHub Actions Inactive
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 32 lines in your changes are missing coverage. Please review.

Comparison is base (bb86968) 68.60% compared to head (94112c3) 68.98%.
Report is 3 commits behind head on feature/agent_framework_dev.

Files Patch % Lines
...nsearch/ml/engine/tools/AbstractRetrieverTool.java 74.19% 14 Missing and 2 partials ⚠️
...a/org/opensearch/ml/engine/tools/VectorDBTool.java 0.00% 11 Missing ⚠️
...g/opensearch/ml/engine/tools/NeuralSparseTool.java 86.48% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##             feature/agent_framework_dev    #1737      +/-   ##
=================================================================
+ Coverage                          68.60%   68.98%   +0.37%     
- Complexity                          2591     2610      +19     
=================================================================
  Files                                239      241       +2     
  Lines                              12757    12815      +58     
  Branches                            1284     1288       +4     
=================================================================
+ Hits                                8752     8840      +88     
+ Misses                              3404     3370      -34     
- Partials                             601      605       +4     
Flag Coverage Δ
ml-commons 68.98% <73.77%> (+0.37%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ylwu-amzn
Copy link
Collaborator

LGTM, please test if this new prompt can work or not.

@ylwu-amzn ylwu-amzn merged commit ef9cf66 into opensearch-project:feature/agent_framework_dev Dec 6, 2023
4 of 6 checks passed
@xluo-aws
Copy link
Member Author

xluo-aws commented Dec 7, 2023

LGTM, please test if this new prompt can work or not.

Thanks, Yaliang, it's working, the problem I can consistently reproduce is no longer there. LLM returns the right tool name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants