-
Notifications
You must be signed in to change notification settings - Fork 143
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 IndexMapping Tool #1891
Add IndexMapping Tool #1891
Conversation
Signed-off-by: Daniel Widdis <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1891 +/- ##
============================================
+ Coverage 82.63% 82.65% +0.02%
- Complexity 5387 5397 +10
============================================
Files 521 522 +1
Lines 21705 21773 +68
Branches 2209 2216 +7
============================================
+ Hits 17935 17996 +61
- Misses 2873 2876 +3
- Partials 897 901 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Can we do manual integration test by adding index mapping tool to chat agent and validate that the tool is able to integrate with LLM as expected?
ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/IndexMappingTool.java
Show resolved
Hide resolved
ml-algorithms/src/main/java/org/opensearch/ml/engine/tools/IndexMappingTool.java
Outdated
Show resolved
Hide resolved
I'm already doing this with the testing framwork currently at https://github.com/joshuali925/observability-langchain but soon to be moved to https://github.com/opensearch-project/skills-eval Sample output, including a hallucination:
|
Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: Daniel Widdis <[email protected]>
JDK 21 test failures are as a result of https://bugs.openjdk.org/browse/JDK-8323659, see opensearch-project/flow-framework#426 |
public static final String TYPE = "IndexMappingTool"; | ||
private static final String DEFAULT_DESCRIPTION = String | ||
.join( | ||
" ", |
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.
Why do we need an empty space?
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.
This is the delimiter in string join, adding a space between the sentences. I thought this syntax was easier to read than a bunch of concatenated strings. It's a one-time static constant so performance isn't really an issue.
I could append the strings with a + and try to remember to add a space at the end or beginning of each subsequent one....
* Add IndexMapping Tool Signed-off-by: Daniel Widdis <[email protected]> * Improve description and make index a required parameter Signed-off-by: Daniel Widdis <[email protected]> * Add some more test coverage Signed-off-by: Daniel Widdis <[email protected]> --------- Signed-off-by: Daniel Widdis <[email protected]> (cherry picked from commit 849fecf)
* Add IndexMapping Tool Signed-off-by: Daniel Widdis <[email protected]> * Improve description and make index a required parameter Signed-off-by: Daniel Widdis <[email protected]> * Add some more test coverage Signed-off-by: Daniel Widdis <[email protected]> --------- Signed-off-by: Daniel Widdis <[email protected]>
Description
Adds an IndexMappingTool. See previous dev branch PR: #1609.
It looks like it's part of pending PR #1812 but needed to unblock end-to-end testing.
Check List
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.