-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: knowledge base tool (do not review now) #353
feat: knowledge base tool (do not review now) #353
Conversation
308bbd7
to
ed36bed
Compare
Can you please add UT and IT? |
} | ||
ArrayList<Map<String, Object>> retrievedDocuments = (ArrayList<Map<String, Object>>) dataAsMap.get("retrievalResults"); | ||
StringBuilder formattedDocuments = new StringBuilder(); | ||
for (Map<String, Object> retrievedDocument : retrievedDocuments) { |
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.
If knowledge base endpoint returns an error like exceed limitation (I don't know, we may need a survey), we will return empty result, does this meet expectation?
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.
Any idea to mock an error exception from bedrock knowledge base?
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.
Any idea to mock an error exception from bedrock knowledge base?
We can make a easy real environment exception by remove the model access to the embedding model and then call the API.
Maybe return the origin exception information is enough?
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.
Good idea. I can start testing once we have plan to merge this PR. I will mark this PR as draft.
It's a POC for now. We are not in a hurry to merge this PR, so I will ad UT and IT later. |
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.
How should we assure that the input parameter model_id is a valid knowledge base connector?
A simple idea is: fetch model and connector configuration from the model_id. Then, check the url from the connector. Just wondering whether PPLTool or other tools has this kind of model_id validation @xinyual |
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
ed36bed
to
521e2b9
Compare
can we leverage existing MLModelTool or ConnectorTool |
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
============================================
- Coverage 81.78% 77.02% -4.77%
- Complexity 193 222 +29
============================================
Files 11 16 +5
Lines 961 1197 +236
Branches 137 171 +34
============================================
+ Hits 786 922 +136
- Misses 121 211 +90
- Partials 54 64 +10 ☔ View full report in Codecov by Sentry. |
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
No need to review this PR now. This PR is just a POC for alert analysis workflow. |
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: Songkan Tang <songkant@amazon.com>
Signed-off-by: Songkan Tang <songkant@amazon.com>
Signed-off-by: Songkan Tang <songkant@amazon.com>
Signed-off-by: Songkan Tang <songkant@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Closing this PR as knowledge base tool is no longer needed. |
Description
POC for knowledge base tool. You can use the knowledge base tool with the following steps:
Related Issues
POC for knowledge base tool
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.