-
Notifications
You must be signed in to change notification settings - Fork 138
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
Fix prompt passing for Bedrock by passing a single string prompt for … #1490
Conversation
…Bedrock models. (opensearch-project#1476) Signed-off-by: Austin Lee <[email protected]>
Tested this locally on Docker. This is the "input" part of the prompt RAG is sending to Bedrock:
This is what's coming back from Bedrock
|
Using this blueprint:
|
CloudTrail event for the above call:
|
Signed-off-by: Austin Lee <[email protected]>
Also tested with the conversation enabled. |
Signed-off-by: Austin Lee <[email protected]>
Codecov Report
@@ Coverage Diff @@
## 2.11 #1490 +/- ##
============================================
+ Coverage 79.77% 79.98% +0.20%
- Complexity 2440 2452 +12
============================================
Files 196 197 +1
Lines 9740 9796 +56
Branches 975 985 +10
============================================
+ Hits 7770 7835 +65
+ Misses 1508 1492 -16
- Partials 462 469 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
|
...main/java/org/opensearch/searchpipelines/questionanswering/generative/prompt/PromptUtil.java
Show resolved
Hide resolved
...src/main/java/org/opensearch/searchpipelines/questionanswering/generative/llm/LlmIOUtil.java
Show resolved
Hide resolved
@dhrubo-os anything else? |
...ssors/src/main/java/org/opensearch/searchpipelines/questionanswering/generative/llm/Llm.java
Show resolved
Hide resolved
Signed-off-by: Austin Lee <[email protected]>
#1490) * Fix prompt passing for Bedrock by passing a single string prompt for Bedrock models. (#1476) Signed-off-by: Austin Lee <[email protected]> * Add unit tests, apply Spotless. Signed-off-by: Austin Lee <[email protected]> * Check if systemPrompt is null. Signed-off-by: Austin Lee <[email protected]> * Address review comments. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> (cherry picked from commit e18f249)
#1490) * Fix prompt passing for Bedrock by passing a single string prompt for Bedrock models. (#1476) Signed-off-by: Austin Lee <[email protected]> * Add unit tests, apply Spotless. Signed-off-by: Austin Lee <[email protected]> * Check if systemPrompt is null. Signed-off-by: Austin Lee <[email protected]> * Address review comments. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> (cherry picked from commit e18f249)
#1490) (#1496) * Fix prompt passing for Bedrock by passing a single string prompt for Bedrock models. (#1476) Signed-off-by: Austin Lee <[email protected]> * Add unit tests, apply Spotless. Signed-off-by: Austin Lee <[email protected]> * Check if systemPrompt is null. Signed-off-by: Austin Lee <[email protected]> * Address review comments. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> (cherry picked from commit e18f249) Co-authored-by: Austin Lee <[email protected]>
#1490) (#1497) * Fix prompt passing for Bedrock by passing a single string prompt for Bedrock models. (#1476) Signed-off-by: Austin Lee <[email protected]> * Add unit tests, apply Spotless. Signed-off-by: Austin Lee <[email protected]> * Check if systemPrompt is null. Signed-off-by: Austin Lee <[email protected]> * Address review comments. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> (cherry picked from commit e18f249) Co-authored-by: Austin Lee <[email protected]>
opensearch-project#1490) (opensearch-project#1497) * Fix prompt passing for Bedrock by passing a single string prompt for Bedrock models. (opensearch-project#1476) Signed-off-by: Austin Lee <[email protected]> * Add unit tests, apply Spotless. Signed-off-by: Austin Lee <[email protected]> * Check if systemPrompt is null. Signed-off-by: Austin Lee <[email protected]> * Address review comments. Signed-off-by: Austin Lee <[email protected]> --------- Signed-off-by: Austin Lee <[email protected]> (cherry picked from commit e18f249) Co-authored-by: Austin Lee <[email protected]> Signed-off-by: TrungBui59 <[email protected]>
…Bedrock models. (#1476)
Description
#1476
Issues Resolved
#1476
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.