-
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
fix: add prompt field in RAGTool #130
Conversation
Signed-off-by: SuZhou-Joe <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
============================================
+ Coverage 80.83% 80.85% +0.01%
- Complexity 195 196 +1
============================================
Files 13 13
Lines 1002 1008 +6
Branches 133 134 +1
============================================
+ Hits 810 815 +5
Misses 141 141
- Partials 51 52 +1 ☔ View full report in Codecov by Sentry. |
So will we have a default prompt for RAG tool? |
if the prompt is going to add in when register a tool, we should either check if empty prompt then throw exception, or give the prompt a default. |
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 (prompt.trim().isEmpty() || prompt == null) {
throw new IllegalArgumentException("prompt cannot be empty");
}
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Can we set a default prompt for claude model? like #125 |
I once heard that we should never put prompt in our code, it should be a config from user. Will add a validation in Tool. |
Based on discussion with @mingshl , we decide to add a validation on prompt field instead of adding a default prompt as the prompt may contain claude-specific template like: |
Hi @SuZhou-Joe , IMO, it's better the the based on the previous testing on ml-commons feature branch, the RAGToold without the prompt in the constructor was working, I would like to double check if the setting of the RAGTool might lead to issue #132 |
Yes. I think we could add a default prompt if the prompt is empty like #125 |
Description
[Describe what this change achieves]
Issues Resolved
#132
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.