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

Optimize the default prompt and make prompt customizable for create anomaly detector tool #399

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

gaobinlong
Copy link
Contributor

@gaobinlong gaobinlong commented Sep 4, 2024

Description

Optimize the prompt feed to LLM when executing the CreateAnomalyDetectorTool, the change are:

  1. Add (long, integer, double, float, short etc.).
  2. Add you should give at most 3 aggregation fields and corresponding aggregation methods

, and also make the prompt customizable, users can use their customized prompt.

Related Issues

#337

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@gaobinlong
Copy link
Contributor Author

@zane-neo @xinyual please help to review this PR, thank you!

@gaobinlong gaobinlong changed the title Optimize the prompt for create anomaly detector tool Optimize the prompt and make prompt customizable for create anomaly detector tool Sep 29, 2024
@gaobinlong gaobinlong changed the title Optimize the prompt and make prompt customizable for create anomaly detector tool Optimize the default prompt and make prompt customizable for create anomaly detector tool Sep 29, 2024
Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: gaobinlong <[email protected]>
Copy link

codecov bot commented Sep 29, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.65%. Comparing base (2b76e3c) to head (477ec5a).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
...nsearch/agent/tools/CreateAnomalyDetectorTool.java 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #399      +/-   ##
============================================
- Coverage     81.78%   77.65%   -4.14%     
- Complexity      193      260      +67     
============================================
  Files            11       15       +4     
  Lines           961     1383     +422     
  Branches        137      197      +60     
============================================
+ Hits            786     1074     +288     
- Misses          121      232     +111     
- Partials         54       77      +23     
Flag Coverage Δ
77.65% <66.66%> (?)

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.

@gaobinlong
Copy link
Contributor Author

The test case ./gradlew ':integTest' --tests "org.opensearch.integTest.RAGToolIT.testRAGToolWithNeuralQuery" always fails on MacOS, but not relates to this PR.

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.

1 participant